Safe following distance calculator
At 100 km/h, a two-second gap means 55.56 metres to the vehicle ahead, and three seconds about 83.33 metres. Enter your speed in km/h, mph or metres per second to see the gap in metres, feet and car lengths. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Speed
- 100
- Speed unit
- Kmh
- Gap seconds
- 2
- Speed ms
- 27.7777777778
- Speed kmh
- 100
- Speed mph
- 62.1371192237
- Rule
- two_second_rule
Keeping enough space ahead of you is one of the simplest habits that reduces rear-end crashes on open roads and in stop-and-go traffic. Driving instructors, licensing handbooks, and fleet safety programs teach the two-second rule and the three-second rule as practical time-based gaps: pick a fixed landmark the vehicle ahead passes, count seconds until you reach it, and adjust if you arrive too soon. This safe following distance calculator turns that time rule into a concrete distance at any speed. Enter your speed in kilometres per hour, miles per hour, or metres per second, choose a two-second or three-second gap, and receive the recommended following distance in metres and feet plus an approximate count of passenger-car lengths.
How the two-second and three-second rules become a distance
A time-based following rule does not ask you to estimate metres by eye while moving. Instead it asks for a constant time headway: if the vehicle ahead is two seconds of travel time in front of you at your current speed, you have a two-second gap; three seconds is a more conservative cushion often recommended for larger vehicles, wet pavement, night driving, or reduced visibility. Distance follows from speed times time.
Convert your speed into metres per second, multiply by the chosen gap in seconds, and you obtain the recommended gap in metres. From one hundred kilometres per hour the conversion is one hundred divided by three point six, about twenty-seven point seven eight metres per second; times two seconds yields about fifty-five point five six metres, and times three seconds about eighty-three point three three metres. The same speed in miles per hour uses the factor zero point four four seven zero four metres per second per mile per hour.
Feet are metres times about three point two eight zero eight, and car lengths divide metres by four point five, a typical passenger-car length used only as a rough visual aid. Negative speed is rejected because path speed for a following gap is a non-negative magnitude. Zero speed correctly yields a zero gap.
Where following-distance calculators show up in real work
Learner-driver courses and theory tests introduce the two-second rule with landmark counting, then ask students to convert a posted or measured speed into metres so the abstract count becomes a visible gap on the road. Fleet and logistics trainers build toolbox talks and e-learning modules that contrast dry-road two-second gaps with wet-road or heavy-vehicle three-second gaps at highway speeds. Insurance and telematics education pages explain why tailgating shortens reaction margin; a deterministic calculator supplies table values for common speeds without standing up a full traffic model.
If you later need physics-based emergency stopping distance from friction and reaction time, multi-vehicle platoon spacing, or ETA and average-speed trip planning, treat those as separate search intents and landings rather than overloading this following-distance page.
What you can do with it
Learner-driver theory and road-safety lessons
Convert a chosen speed and the two-second or three-second rule into metres, feet, and car lengths so students can check landmark-counting exercises against a trusted oracle.
Fleet toolbox talks and e-learning tables
Generate recommended gaps at highway and urban speeds for dry-road two-second and wet-road three-second guidance without re-deriving unit conversions each session.
FAQ
What is the two-second rule?
A time-based following guideline: when the vehicle ahead passes a fixed landmark, you should take at least two seconds to reach the same landmark at your current speed. This calculator multiplies that time by your speed to report the equivalent distance.
When should I use the three-second rule?
Many handbooks recommend three seconds for larger vehicles, towing, wet or icy roads, night driving, or reduced visibility.
Which speed units are supported?
Kilometres per hour (kmh, default), miles per hour (mph), and metres per second (ms). The response also normalises speed into m/s, km/h, and mph for display.
Is this the same as emergency stopping distance?
No. Following distance here is a time-headway rule of thumb at constant speed. Emergency stopping distance depends on reaction time, friction, grade, and braking performance and is a different calculation.
What does it cost?
The browser tool is free and runs locally.
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/following-distance \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"speed":100}'const res = await fetch("https://api.kit.forhosting.com/travel/following-distance", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"speed": 100
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/travel/following-distance",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"speed": 100
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/travel/following-distance", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"speed":100}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"speed":100}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/travel/following-distance", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"speed": 100
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "travel.following_distance",
"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. |
Technical notes
How the two-second and three-second rules become a distance
The pipeline is deterministic floating-point arithmetic with stable rounding: no random seeds, no wall-clock timestamps, no network calls, and no model drift, so identical inputs always produce identical JSON. Gap seconds must be two or three so the endpoint stays faithful to the classic two-second and three-second teaching rules rather than inventing arbitrary headways.
What you send and what you get back
A short formula string restates that gap metres equal speed in metres per second times gap seconds. Classic checks include one hundred kilometres per hour under the two-second rule for roughly fifty-five and a half metres, sixty miles per hour under the three-second rule for a longer cushion in feet and metres, and zero speed for a stationary queue. Send a required finite non-negative number under the field speed, optionally speed_unit as kmh (default), mph, or ms for metres per second, and optionally gap_seconds as two or three (default two). Aliases such as velocity, unit, seconds, and rule are accepted so forms and SDK wrappers can use familiar names. Missing speed, non-numeric strings, NaN, Infinity, negative speed, unsupported units, and gap values other than two or three fail with invalid_input and are not charged. On success the response echoes the cleaned speed and unit, normalises speed into metres per second, kilometres per hour, and miles per hour for side-by-side display, reports gap_seconds and a rule label of two_second_rule or three_second_rule, and returns following_distance_m, following_distance_ft, and following_distance_car_lengths. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.
Where following-distance calculators show up in real work
Curriculum authors building interactive lessons want the same JSON shape in the browser and the API so offline worksheets and online auto-graders stay aligned. Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.
Integration use cases
SEO widgets and content demos
Power a safe following distance calculator landing with the same pure function as the API so browser demos and automated pipelines never diverge on identical inputs.