Departure time calculator for a target arrival
To arrive at 17:30 after a 180 km drive at an average of 90 km/h, leave at 15:30: the calculator works backward from your deadline and tells you when departure falls on the day before. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Arrival time
- 17:30
- Distance
- 180
- Average speed
- 90
- Departure time
- 15:30
- Departure hour
- 15
- Departure minute
- 30
- Day offset
- 0
This departure time calculator works backward from the moment you want to arrive. Enter a target arrival on a 24-hour clock, the distance you expect to drive, and a realistic average speed in matching units. The calculator divides distance by speed to estimate driving duration, rounds that duration to the nearest minute, and subtracts it from the arrival time. It also identifies whether departure falls on the same day or an earlier day. The result is deterministic and transparent: it does not use live traffic, maps, your location, the current date, or hidden route assumptions.
Work backward from the arrival commitment
Planning around an appointment, airport check-in, hotel reservation, or delivery window often begins with the arrival deadline rather than a departure time. This calculator reverses the usual estimated-arrival calculation. First, it treats your target arrival as a fixed point on a 24-hour clock.
Next, it calculates driving time by dividing trip distance by expected average speed. Finally, it subtracts the rounded number of travel minutes from the target clock. For example, a 180-kilometre trip at an average of 90 kilometres per hour takes two hours, so a 17:30 arrival requires a 15:30 departure.
If subtraction passes midnight, the response wraps to a valid HH:MM clock and reports a negative day offset. An arrival at 01:00 after three hours of driving therefore produces 22:00 on the previous calendar day. This explicit day relationship matters when you copy the result into a calendar or share it with another traveller.
The calculation contains no current date, time zone, traffic feed, or route lookup, so the same input always returns the same output.
Choose distance and average speed carefully
Distance and speed must use the same measurement family. Pair kilometres with kilometres per hour, or miles with miles per hour. Because the formula uses their ratio, the calculator does not need a separate unit selector, but it also cannot detect a mismatch.
Average driving speed should represent the whole trip rather than the fastest posted limit. Urban roads, junctions, fuel stops, roadworks, and slower sections commonly pull the trip average below motorway speed. If you use an optimistic speed, the recommended departure will be too late.
The tool estimates pure driving duration only; it does not automatically add parking, security, boarding, rest breaks, loading, or a safety margin. Add those commitments by choosing an earlier target arrival, or adjust the result outside the calculator. The exact distance-over-speed duration is exposed in hours, while the working clock uses travel time rounded to the nearest whole minute.
That rule makes the displayed departure stable and easy to place on ordinary schedules. Positive finite values are required for both inputs because zero or negative distance or speed cannot describe a usable forward road trip in this model.
What you can do with it
Reach an airport check-in target
Work backward from the time you want to enter the terminal, using road distance and a conservative whole-trip average speed.
Plan a delivery departure
Convert a receiver's requested arrival clock into a clear dispatch time for a known route distance and expected fleet speed.
Coordinate appointments and pickups
Find the driving departure that supports a fixed meeting or pickup time, including a clear warning when departure is the previous day.
FAQ
How is the departure time calculated?
Travel duration equals distance divided by average speed. The calculator converts that duration to rounded whole minutes and subtracts it from the target arrival clock.
Which distance and speed units should I use?
Use any matching pair, such as kilometres with kilometres per hour or miles with miles per hour. Do not mix measurement systems.
Does it account for traffic and stops?
No. Choose an average speed that already reflects expected conditions, and separately allow time for stops, parking, check-in, or other buffers.
What does a negative day offset mean?
It means the calculated departure occurs before the target arrival day.
What average speed should I enter for the trip?
Use the average for the whole trip, not the fastest posted limit. City roads, junctions, fuel stops and roadworks pull the average below motorway speed, and an optimistic speed makes the suggested departure too late.
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/travel/departure-time-for-arrival \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"arrival_time":"17:30","distance":180,"average_speed":90}'const res = await fetch("https://api.kit.forhosting.com/travel/departure-time-for-arrival", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"arrival_time": "17:30",
"distance": 180,
"average_speed": 90
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/travel/departure-time-for-arrival",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"arrival_time": "17:30",
"distance": 180,
"average_speed": 90
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/travel/departure-time-for-arrival", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"arrival_time":"17:30","distance":180,"average_speed":90}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"arrival_time":"17:30","distance":180,"average_speed":90}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/travel/departure-time-for-arrival", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"arrival_time": "17:30",
"distance": 180,
"average_speed": 90
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "travel.departure_time_for_arrival",
"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 | 1000000 |
max_speed | 10000 |
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
Read the result and use the API safely
A value of zero means leave on the same calendar day. Minus one means leave on the previous day; more negative values describe unusually long multi-day journeys. The response returns the normalized target arrival, the calculated departure as HH:MM, its hour and minute components, and a day_offset measured relative to the arrival day. Send arrival_time, distance, and average_speed in a JSON object; accepted aliases are documented in the input contract for integrations that use terms such as arrive_by or trip_distance. Malformed clock text, missing values, non-finite numbers, and non-positive numbers return invalid_input instead of a misleading schedule. A successful API request costs $0.002; error responses are suitable for validating an integration before relying on the output in a travel workflow.
Technical questions
What does the API request cost?
A successful API request costs $0.002. The same deterministic calculation can run in the free browser tool.