Travel time from distance and speed calculator
120 km at 80 km/h takes 1.5 hours, which is 90 minutes or 5,400 seconds: enter a distance and a steady speed in matching units and get the duration in all three forms at once. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Distance
- 120
- Speed
- 80
- Seconds
- 5,400
- Minutes
- 90
- Hours
- 1.5
The travel time calculator converts a known distance and a constant speed into one duration expressed three useful ways: seconds, minutes, and hours. Enter compatible values, such as kilometres with kilometres per hour or miles with miles per hour, and receive a deterministic result suitable for schedules, estimates, worksheets, and trip-planning tools. The calculation uses the familiar relationship time equals distance divided by speed. It does not depend on maps, traffic feeds, a departure date, or the current clock, so the same inputs always produce the same output.
Match the distance and speed units before calculating
Start by choosing one distance unit and keeping it consistent. If distance is entered in kilometres, speed should be kilometres per hour. If distance is entered in miles, speed should be miles per hour.
Nautical miles can be paired with knots because one knot represents one nautical mile per hour. The calculator does not attach a unit label to either input and therefore cannot recognize a mixed pair. Dividing miles by kilometres per hour produces a numeric value, but that value does not represent the intended journey.
Both inputs must be finite positive numbers. Zero speed is rejected because an object that is not moving cannot complete a positive distance in finite time, and negative values do not fit this travel-planning model. The accepted maximums also keep calculations bounded and predictable.
Once the units match, the output hours naturally uses hours because speed is defined per hour. The minute and second values are direct conversions of that same duration, not separate estimates. This makes it easy to select the representation that best fits a timetable, user interface, calculation, or report without recomputing the trip elsewhere.
Understand the formula and the returned durations
The core formula is travel time equals distance divided by speed. A distance of 120 kilometres at 80 kilometres per hour therefore takes 1.5 hours. Multiplying that hour value by 60 gives 90 minutes, and multiplying it by 3,600 gives 5,400 seconds.
For example, a two-and-a-half-hour trip is reported as 2.5 hours, 150 minutes, and 9,000 seconds. No whole-minute approximation is imposed, so short journeys and fractional speeds remain useful. The original normalized distance and speed are included beside the duration, which helps an automated caller audit what was calculated.
The algorithm has no network calls, random behavior, live traffic, or clock dependency. Identical valid inputs always return identical fields in the same shape, making the capability suitable for repeatable tests and downstream calculations.
Use constant-speed time as a planning baseline
A distance-over-speed result is a baseline, not a live routing prediction. Real trips can include acceleration, intersections, congestion, weather, gradients, boarding, refuelling, loading, and rest breaks. Choose a realistic average speed rather than a vehicle's maximum speed or the highest posted limit.
For a mixed road route, an average that reflects slower local segments will usually be more useful than a motorway-only assumption. For walking, cycling, marine, or aviation estimates, use a sustainable average measured in the matching unit per hour. Add expected stop time separately after calculating motion time, and document that allowance when sharing the plan.
The hours value works well for cost or productivity formulas, minutes are convenient for schedules and calendar blocks, and seconds are useful for simulations, countdowns, or software that stores durations in a base unit. You can also compare several speeds against the same distance to understand a range of possible durations. Because the response does not contain an arrival clock time, add the duration to a known departure time in a separate date-aware step when an actual ETA is required.
What you can do with it
Estimate a road-trip duration
Turn route distance and a realistic average driving speed into comparable hour, minute, and second totals.
Build a schedule or countdown
Use total minutes for calendar planning or total seconds for software timers and simulations.
Compare travel scenarios
Calculate the same distance at several sustainable speeds to evaluate possible trip durations.
FAQ
What formula is used?
Travel time is distance divided by speed. The resulting hours are multiplied by 60 for minutes and by 3,600 for seconds.
Which units can I enter?
Use any distance unit as long as speed uses the same distance unit per hour, such as kilometres with km/h or miles with mph.
Are the minute and second results totals?
Yes. They are total elapsed minutes and total elapsed seconds for the full distance, not remainder components.
Does the result account for stops or traffic?
No. It assumes constant travel at the entered speed. Add breaks, traffic allowances, and other delays separately.
Can I use nautical miles and knots?
Yes. A knot is one nautical mile per hour, so a distance in nautical miles with a speed in knots gives a correct duration, just like kilometres with kilometres per hour.
Related tools
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/geo/travel-time \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"distance":120,"speed":80}'const res = await fetch("https://api.kit.forhosting.com/geo/travel-time", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"distance": 120,
"speed": 80
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geo/travel-time",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"distance": 120,
"speed": 80
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geo/travel-time", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"distance":120,"speed":80}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"distance":120,"speed":80}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geo/travel-time", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"distance": 120,
"speed": 80
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geo.travel_time",
"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.
Limits
max_distance | 1000000000000 |
max_speed | 1000000000 |
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. |
Technical notes
Understand the formula and the returned durations
The response returns all three totals as decimal numbers, so minutes and seconds are totals for the entire trip rather than the leftover components of a clock-style duration.
Use constant-speed time as a planning baseline
A successful API calculation costs $0.002, while the browser version can perform the same deterministic arithmetic directly.
Technical questions
How much does the API calculation cost?
Each successful API request uses the published base price of $0.002.