Velocity calculator
Divide the distance travelled by the time it took and get average velocity in metres per second: 100 m in 20 s is 5 m/s. Useful for checking kinematics homework and stopwatch runs in the lab. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Distance
- 100
- Time
- 20
- Velocity
- 5 m/s
Average velocity is the ratio of the distance an object travels to the time that elapses while it covers that path. This velocity calculator accepts those two quantities in SI units—distance in metres and elapsed time in seconds—and returns the mean velocity in metres per second, the unit used in physics textbooks, lab notebooks, and kinematics homework. A distance of zero with a positive time is rest: velocity zero. The arithmetic is closed-form parse work with no network, no models, and no clocks, so the answer is deterministic.
What average velocity means and how v = d / t is evaluated
Average velocity is the change of position along a path divided by the time required to cover that path. In SI units that statement is the closed formula v equals d over t, with distance d in metres, elapsed time t in seconds, and velocity v in metres per second. Instantaneous speed from a speedometer is a different quantity; this calculator does not differentiate a position-time graph, fit a spline, or report a signed displacement vector.
It reports the single ratio of total distance traveled to total elapsed time, which is what lab reports mean when they ask for average velocity over an interval. Distance here is path length, so it must be finite and non-negative; a negative path length is not a traveled distance. Elapsed time must be a strictly positive finite duration.
The result is a scalar in metres per second. Convert to kilometres per hour only after you have the SI value, by multiplying by 3.6 in your own layer if you need a road-speed display. The engine itself always returns metres per second so homework, APIs, and widgets share one contract.
Where a velocity calculator earns its keep
Classrooms and tutoring platforms use a velocity calculator so learners can check v equals d over t for arbitrary metres and seconds without mixing up unit prefixes by hand. Exam-prep generators need a deterministic oracle that marks wrong the case of zero or negative elapsed time instead of silently returning Infinity that a buggy grader might treat as success. Failed validation does not consume balance.
Keep requests small, pin the rounded velocity in tests, and you get reproducible metres-per-second answers for homework, LMS plugins, and edge workers without standing up symbolic math infrastructure of your own.
What you can do with it
Classroom and homework checks
Let students submit distance in metres and elapsed time in seconds and verify the average velocity in m/s against textbook kinematics methods.
Lab notebooks and stopwatch intervals
Turn a tape-measure distance and a stopwatch duration into a single mean velocity before fitting a larger motion model in a lab script.
Exam and LMS auto-grading
Mark velocity items with a deterministic oracle that rejects zero or negative elapsed time instead of returning Infinity.
FAQ
How do I compute average velocity from distance and time?
Send a finite non-negative distance in metres and a strictly positive elapsed time in seconds.
What happens if elapsed time is zero or negative?
Average velocity is distance divided by time, so zero time is undefined and a negative duration is not a physical interval. Those failures are not billed.
Can distance be zero?
Yes. Zero distance with a positive elapsed time is rest: the returned velocity is 0 m/s. Negative distance is rejected because path length cannot be negative.
What units does the velocity calculator use?
SI units only: distance in metres, time in seconds, velocity in metres per second (m/s). Convert to km/h or mph in your own layer after you have the SI value.
How do I turn the result into kilometres per hour?
Multiply the metres-per-second result by 3.6. The calculator always answers in m/s, so do that conversion afterwards if you need a road-speed figure.
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/phys/velocity \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"distance":100,"time":20}'const res = await fetch("https://api.kit.forhosting.com/phys/velocity", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"distance": 100,
"time": 20
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/phys/velocity",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"distance": 100,
"time": 20
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/phys/velocity", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"distance":100,"time":20}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"distance":100,"time":20}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/phys/velocity", 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": 100,
"time": 20
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "phys.velocity",
"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
Elapsed time of zero or a negative interval is rejected as invalid_input, because dividing by zero is undefined and a negative duration is not a physical interval. Successful API calls are billed at $0.002; validation failures are not.
Input contract, response shape, and error behaviour
A distance of zero with a positive time is valid and yields velocity zero, which is rest. On success the body includes the echoed distance and time, the computed velocity rounded to twelve decimal places for stable goldens across runtimes, the formula string v = d / t, and the unit m/s. Example: distance one hundred metres and time twenty seconds yields velocity five metres per second. POST a JSON body with two required finite numbers: distance, the non-negative path length in metres, and time, the strictly positive elapsed duration in seconds. Each field may arrive as a JSON number or as a numeric string; aliases distance_m and d are accepted for distance, and elapsed_time, time_s, and t are accepted for time. Missing fields, empty strings, and non-finite values fail with invalid_input naming the field. Pair the response with your own unit conversion if you need kilometres per hour or miles per hour; this endpoint always reports metres per second and does not emit plots, step-by-step prose, or a signed heading.
Where a velocity calculator earns its keep
Lab notebooks and field scripts often reduce stopwatch intervals and tape-measure distances to a single mean velocity before they fit a larger kinematics model; calling a tiny parse API avoids pulling a computer-algebra system for a two-number division.
Technical questions
What does the velocity calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.