Recalculate Tolls for Driven Routes

It is not always about the planned route. Often you want to know what a trip actually cost in tolls – to check a toll invoice, post-calculate a trip or evaluate empty runs. The vehicle's GPS positions are enough: TollCalc reconstructs the route driven and calculates the toll per country.

→ Try it now: upload a GPS track and calculate the toll – no account needed, the file is only read in your browser.

How it works

  1. Waypoints are selected from the GPS track. The tool takes up to 50 points with a minimum spacing from 1 km; via the API up to 500 points are possible.
  2. The route is calculated through exactly these points – in the right order, on drivable roads.
  3. The route is priced with the tariffs valid at the time of the trip (optionally plannedTripStart for past trips).

Why TollCalc routes instead of just "snapping" the points to the road network is explained in Long Routes & Many Waypoints.

What is different when reconstructing a trip

Reconstructing a driven route is not the same as planning one. TollCalc takes this into account automatically as soon as the request consists only of coordinates and contains at least 10 points.

The roads actually driven count

When planning, TollCalc avoids roads with truck restrictions (through-traffic bans, "access only", weight limits). When reconstructing, that would be wrong: if the truck reached the customer via an access-only road, it demonstrably used it. With truck restrictions, the calculation would create a detour there – in real trips sometimes more than 100 km for a stretch that was only 20 km according to GPS.

For GPS tracks, these access restrictions are therefore not applied. Speeds and motorway preference remain truck-specific. The response then contains "hgv_restrictions_ignored": true.

Turn-around detours are detected and removed

GPS points on a motorway occasionally snap onto the opposite carriageway during routing. The route then drives to the next exit, turns and comes back – 5 to 50 km of detour that never happened and that increase the toll. In our tests with real truck trips, this affected more than half of the trips at least once.

TollCalc detects such sections (route much longer than the straight-line distance between two points), removes the causing point and recalculates. The result is only accepted if

  • the route becomes noticeably shorter and
  • the new route still passes the removed point.

This keeps real detours by the driver (e.g. diversions, a rest area off the road). Removed points are listed in the response field detour_waypoints_removed. The optimisation can be switched off with "optimize_waypoints": false.

Formats supported by the tool

Format Typical source
KML Google Earth, telematics exports (LineString, placemarks, gx:Track)
GPX Navigation devices, tracking apps (tracks, routes, waypoints)
GeoJSON GIS tools, custom exports (LineString, Point, MultiLineString)
Encoded polyline Google/ORS format, precision 5 or 6
Coordinate list one coordinate per line: lat;lon, lat,lon or lat lon

Automate via API

For many trips, the API is the better choice. Positions are passed as coordinates in the format "lat;lon":

curl -X POST https://app.tollcalc.eu/api/calculate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "origin": "50.75308;7.01793",
    "via": ["50.82229;6.96675", "50.93120;6.95210", "…"],
    "destination": "53.51320;10.98120",
    "plannedTripStart": "2026-10-31T21:00:00Z",
    "vehicle": { "weight": 40, "axles": 5, "emission_class": "euro6", "co2_class": "class_1" }
  }'

Additional fields in the response:

Field Meaning
hgv_restrictions_ignored true if the request was treated as a GPS track (coordinates only, ≥ 10 points)
detour_waypoints_removed points removed because of a turn-around detour (omitted if none)

The full description is in the API documentation.

Tips for good results

  1. One trip per request – only the positions between departure and arrival, not the history of several days.
  2. Thin out instead of sending everything: 30–50 points at least 1 km apart reliably represent a long-distance trip. Remove points recorded while standing still (same position) beforehand.
  3. Leave out inaccurate fixes (no GPS fix, very high inaccuracy).
  4. Treat ferries and rail loading as separate requests.
  5. Compare with the odometer: odometer kilometres are typically 2–5 % above the map distance. Much fewer route km suggests missing GPS points, much more a detour in the calculation. The tool shows this comparison when you enter the driven kilometres.

FAQ

Is my GPS data stored?

In the tool, the file is only read in your browser. Only the thinned-out coordinates and the vehicle data are sent to TollCalc – just like any other toll calculation.

Why does a track count twice in the tool?

The tool calculates each track twice – without and with turn-around optimisation – so you can see the difference. Via the API, one calculation is enough.

Why does the result differ from the odometer?

Odometers usually measure a few percent more than the map distance (tyre circumference, manoeuvring in the yard). Deviations of 2–5 % are normal.

Can I calculate past trips with the tariffs valid back then?

Yes. Pass plannedTripStart with the trip date via the API – the tariffs valid at that time are then used.

→ Upload a GPS track and calculate the toll