Skip to main content
tripcost

How we calculate

No black boxes here. Every number on tripcost.co.za comes from a real source and a documented formula. Here's exactly how it works.

Fuel prices effective from: 5 August 2026
Toll prices last verified: 25 August 2026

1. Distance

Distances come from two sources, in order of preference. The busiest inter-city corridors live in a hand-verified route matrix: distance, drive time and the exact toll plazas crossed, checked by a person. Every other pair of places is routed through OpenRouteService, an open-source routing engine with good South African coverage: real road geometry, real road distance, and a drive time derived from the actual route (heavy trucks are routed on the HGV profile). Toll plazas on these routes are matched against the computed road line itself, not guessed from the region.

If the routing engine is unreachable, the planner falls back to the haversine formula (straight-line distance between the two points) multiplied by a road factor of 1.3, with drive time estimated at an average of 100 km/h. That approximation typically lands within 5-10% of the real road distance on major routes. We label it honestly: every calculation reports which method produced it (curated-matrix, ors-v2 or haversine-1.3), and in practice the fallback is rare — our logs show it firing effectively never in normal operation.

When a result says "estimated"

The clay "estimated" pill on a result means your pair of places isn't in the hand-verified matrix. The distance and drive time come from OpenRouteService's real road geometry, and the toll plazas are matched against that computed route line, so the figure is honest; it just hasn't been checked by a person. Treat it as a solid planning number rather than gospel.

Real drive times still vary with traffic, mountain passes, and lekker stops; treat the figure as a moving-time estimate, not a promise.

2. Toll fees

Toll data lives in a manually curated tolls.json file. Every plaza has been cross-checked against at least two official sources. We track four vehicle classes:

ClassDescriptionExamples
1Light vehicle (with or without trailer)Sedan, SUV, bakkie, minibus, motorcycle — car + caravan stays Class 1
2Medium heavy vehicle, 2 axlesLight commercial truck (dual rear wheels)
3Large heavy vehicle, 3–4 axlesRigid truck, coach
4Extra large heavy vehicle, 5+ axlesArticulated truck, interlink

For a given route, we determine which plazas fall on the path between origin and destination and sum their tariffs for the selected vehicle class. Plazas are matched by GPS proximity to the route: a plaza within 500m of the estimated road path is included.

Important: SANRAL increases toll tariffs annually, typically in March. We update tolls.json after each increase and note the verification date on every plaza. Check the "Toll prices last verified" stamp before using figures for financial planning.

Toll data sources

3. Fuel cost

Fuel cost is calculated as:

Fuel cost = (distance km ÷ 100) × vehicle L/100km × pump price (R/L)

Default consumption figures by vehicle type. These are starting points: the planner's consumption stepper lets you set your own L/100km, and that figure is what gets priced.

VehicleL/100kmToll class
Sedan71
SUV101
Bakkie11.51
Motorcycle51
Light commercial truck222
Heavy-duty truck504

Pump prices are sourced from the DMRE monthly petrol-price schedule and verified against fuelsa.co.za. Separate inland and coastal prices are used; the planner auto-selects based on your origin city.

Fuel prices are updated on or shortly after the 1st of each month, following the official DMRE announcement. The "Last fuel update" stamp in the footer shows when we last refreshed.

Fuel data sources

4. Round trip

Simple: when "round trip" is toggled on, every cost component (tolls + fuel) is multiplied by 2. We assume the return journey follows the same route. If your return route differs significantly (for example, if you come back via the N2 instead of the N3), the estimate won't capture that, and you'd want to run two separate calculations.

5. Accuracy and limitations

  • Distance is real road distance (curated matrix or OpenRouteService routing); only the rare fallback path uses a haversine ×1.3 approximation, and each result is labelled with the method that produced it.
  • Tolls are verified manually and may be out of date between our update cycles. SANRAL increases fares annually in March; check the verification stamp.
  • Fuel pump prices vary up to R0.30/L between stations and provinces. The figure shown is the official regulated price for your region.
  • Vehicle consumption varies with load, driving style, altitude, and aircon use. Our defaults are conservative highway estimates.
  • Traffic is not factored into drive time. Add 20-30% on any drive leaving Johannesburg between 15:00 and 18:00 on a Friday before a public holiday.