Route time savings calculator
A shorter route is not always the quicker route. This route time savings calculator compares two options using the distance and average speed of each, then adds any fixed detour, stop, access, or delay penalty.
Run — free
It reports the effective duration of both routes, identifies the faster choice, and shows the absolute and percentage time saved. Use it for driving, cycling, sailing, delivery planning, or any trip where distance alone gives an incomplete answer.
Enter comparable route assumptions
Start with the distance and realistic average speed for route A and route B. Both distances use one selected distance unit, and both speeds use one selected speed unit, so the comparison stays consistent even when those units differ from each other. Average speed should represent the whole moving portion of the journey, not a brief peak shown on a speedometer. For road travel, include the effect of urban streets, junctions, congestion, and lower-speed sections in that average. For cycling or sailing, use an average that reflects terrain, wind, and expected conditions. A route may be longer yet faster because it supports a higher sustained speed. Conversely, a nominally fast road can lose its advantage if the usable average is lower than expected. The calculator accepts zero distance, which is useful for modelling a route whose only cost is a fixed wait or access penalty, but every speed must remain greater than zero so that travel time is mathematically defined.
Add detour and fixed-time penalties
Distance divided by speed captures moving time, but many route choices include delays that do not scale with distance. Enter those delays as detour minutes for the relevant option. A penalty can represent leaving the main road for fuel, walking from a remote parking area, a ferry check-in requirement, a toll plaza, a transfer, a known construction diversion, or the extra time needed to reach a faster highway. Each route has its own penalty, and zero is the default. The calculator first converts distance and speed to compatible internal units, computes travel minutes, and then adds the route-specific penalty. This ordering makes the result easy to audit: the response displays moving time, penalty time, and total time separately for both choices. Use expected values rather than optimistic best cases. If a delay is uncertain, run the comparison more than once with a low and high estimate to see whether the recommended route changes.
Interpret the savings result
The faster route is the option with the lower total time after its detour penalty is included. The reported time saved is the absolute difference between the two totals, so it is never negative. A tie is returned when the unrounded totals are effectively equal. The response also gives savings as a percentage of the slower route's total, which helps distinguish a meaningful improvement from a tiny difference on a long journey. For example, saving ten minutes on a twenty-minute trip is more consequential than saving ten minutes on an eight-hour drive. Numeric fields use your chosen precision, while the formatted duration is rounded to the nearest second for a readable summary. Remember that this is a planning calculation, not live navigation: it does not retrieve traffic, closures, weather, schedules, or road restrictions. Update the average speeds and penalties whenever conditions change, and consider safety, reliability, cost, and legal access alongside the calculated time advantage.
What you can do with it
Compare a shortcut with a faster highway
Measure whether the highway's higher average speed offsets its extra distance and access time.
Plan delivery routes
Include loading, gate, toll, or depot detours when comparing two recurring delivery options.
Evaluate cycling alternatives
Compare a direct slower path with a longer route that supports a steadier average pace.
FAQ
How is route time calculated?
Moving time is distance divided by average speed. The route's detour minutes are then added to produce its total time.
Which route receives the detour penalty?
Each route has its own optional penalty. Enter the extra fixed minutes for route A, route B, both, or neither.
Can distance and speed use different unit systems?
Yes. Select one unit for both distances and one unit for both speeds; the calculator converts them before comparing times.
What happens if both routes take the same time?
The faster_route field returns tie, and the time saved is zero.
Does this use live traffic information?
No. It is a deterministic calculator with no network access. Supply average speeds and penalties that reflect the conditions you expect.
What does an API request cost?
Each API request costs $0.002. The browser calculator uses the same deterministic arithmetic.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/travel/route-time-savings \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"route_a_distance":120,"route_a_speed":80,"route_b_distance":135,"route_b_speed":100}'const res = await fetch("https://api.kit.forhosting.com/travel/route-time-savings", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"route_a_distance": 120,
"route_a_speed": 80,
"route_b_distance": 135,
"route_b_speed": 100
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/travel/route-time-savings",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"route_a_distance": 120,
"route_a_speed": 80,
"route_b_distance": 135,
"route_b_speed": 100
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/travel/route-time-savings", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"route_a_distance":120,"route_a_speed":80,"route_b_distance":135,"route_b_speed":100}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"route_a_distance":120,"route_a_speed":80,"route_b_distance":135,"route_b_speed":100}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/travel/route-time-savings", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"route_a_distance": 120,
"route_a_speed": 80,
"route_b_distance": 135,
"route_b_speed": 100
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "travel.route_time_savings",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |