Conservation of energy calculator
An object released from rest at 10 m reaches 14 m/s by the time it drops to 0 m, with gravity at 9.8 m/s². Enter the starting height and speed and the second height; mass is not needed because it cancels. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- H1
- 10
- V1
- 0
- H2
- 0
- G
- 9.8
- V2
- 14
- Speed2
- 14
- Delta h
- 10
- Radicand
- 196
A conservation of energy calculator turns the ideal mechanical-energy identity into a practical speed-from-height solver for homework, labs, and quick engineering checks. Enter the height and speed of a body at one point, the height at a second point, and optionally gravitational acceleration g, then receive the non-negative speed at the second height together with the radicand, a substituted equation, and ordered step strings you can paste into worksheets or automated tests. The underlying relation is v2 equals the square root of v1 squared plus two g times the height drop from point one to point two, which follows when kinetic plus gravitational potential energy is conserved under constant g with no friction or other non-conservative work. Mass is never required because it cancels for a single particle.
What mechanical energy conservation means and the speed formula
Under constant gravitational acceleration and with no non-conservative work, the sum of kinetic energy and gravitational potential energy is the same at every point along a path. For a particle of mass m that is kinetic energy one-half m v squared plus potential energy m g h, writing the equality at point one and point two and dividing through by m yields one-half v1 squared plus g h1 equals one-half v2 squared plus g h2.
Solving for the unknown speed at the second height produces the textbook square-root formula: v2 equals the square root of v1 squared plus two g times the difference h1 minus h2. When the body descends, h1 is larger than h2, the radicand grows, and speed increases; when it climbs, the radicand shrinks, and if it would go negative the target height lies above the mechanical-energy ceiling for that launch state.
Heights are measured from any fixed reference you choose—sea level, the table top, or an arbitrary zero—as long as both h1 and h2 use the same zero. Speed v1 is a non-negative magnitude; direction is not recovered from energy alone, so the response always reports a non-negative v2. Gravitational acceleration g defaults to nine point eight one metres per second squared for common Earth textbook problems; override it for local gravity, planetary surfaces, or scaled numerical exercises.
This calculator does not model friction, air drag, springs, rotation, or multi-body systems: reduce those problems yourself or add non-conservative work terms before calling a pure conservation solver.
Practical tips, limits, and related searches
Use one consistent unit system end to end—for example metres, metres per second, and metres per second squared—before calling; this landing does not perform unit conversion. When teaching energy methods, treat this tool as the pure conservation step only: if kinetic friction does work, subtract that energy yourself or switch to a work-energy formulation.
This page targets people searching for a conservation of energy calculator, mechanical energy speed from height tool, or ideal freefall energy identity online; it is not a full dynamics suite that integrates trajectories, not a kinetic-energy-only calculator, and not a unit converter. Prefer this capability when you already know height and speed at one point and only need the speed at another height under constant g; if your source problem gives mass and you only need kinetic or potential energy separately, use the dedicated kinetic-energy or potential-energy capabilities instead.
Round-trip checks are easy: recompute v1 squared plus two g times height drop by hand and confirm the square root equals the published v2 within the same twelve-decimal rounding used in the response.
What you can do with it
Homework checks for energy conservation
Students enter height and speed at one point plus a second height from textbook problems and compare the predicted speed and radicand steps against a deterministic result before submitting.
Lab pre-check for ideal slide or drop paths
Instructors and pipelines validate ideal no-friction speed predictions from measured start height and start speed before comparing them to sensor data that include real losses.
FAQ
What formula does the conservation of energy calculator use?
It uses v2 = sqrt(v1² + 2 g (h1 − h2)), from ½mv1² + mgh1 = ½mv2² + mgh2 with mass cancelled under constant g and no non-conservative work.
What happens if the radicand is negative?
A negative radicand means mechanical energy is not enough for the body to reach height h2 from the given state at h1.
Do I need to enter mass?
No. For a single particle under gravity only, mass cancels from the mechanical-energy identity, so the speed at h2 depends only on v1, h1, h2, and g.
What default gravity is used?
If g is omitted, the calculator uses 9.81 (typical textbook Earth value in m/s²). Override g for local gravity, other planets, or scaled exercises.
Is the conservation of energy calculator free?
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/mech/conservation-mechanical-energy \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"h1":10,"v1":0,"h2":0}'const res = await fetch("https://api.kit.forhosting.com/mech/conservation-mechanical-energy", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"h1": 10,
"v1": 0,
"h2": 0
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/mech/conservation-mechanical-energy",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"h1": 10,
"v1": 0,
"h2": 0
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/mech/conservation-mechanical-energy", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"h1":10,"v1":0,"h2":0}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"h1":10,"v1":0,"h2":0}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/mech/conservation-mechanical-energy", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"h1": 10,
"v1": 0,
"h2": 0
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "mech.conservation_mechanical_energy",
"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
If the radicand is negative, the body does not have enough mechanical energy to reach the requested height and the task fails with a clear invalid_input error instead of inventing a complex speed. Pricing is a flat $0.002 per successful API request; failed validation is never charged.
How to call the API and what the response contains
Absolute values must stay within the published limit near one trillion; v1 must not be negative; g, when present, must be a positive finite number and is otherwise defaulted to nine point eight one. Send a JSON body with three required finite fields: h1 (aliases height1 and h_1), v1 (aliases speed1, velocity1, and v_1), and h2 (aliases height2 and h_2), plus optional g (aliases gravity, gravity_accel, and gravitational_acceleration). Failed validation—missing fields, non-finite numbers, negative speed, non-positive g, values outside absolute limits, a non-finite radicand, or a negative radicand meaning insufficient energy to reach h2—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item. Prefer JSON numbers when you control the client; string numbers are accepted only when they match a strict finite numeric pattern for homework-form paste paths.
Practical tips, limits, and related searches
Keep heights, speeds, and g inside the published absolute range so products and square roots remain finite in IEEE double precision on the Worker and in the browser. Pair classroom examples deliberately: rest at ten metres with g equal to nine point eight yields fourteen metres per second at the ground; a climb that exceeds the energy ceiling demonstrates the hard negative-radicand invalid_input path. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners deliberately request unreachable heights.
Integration use cases
Unit tests for game and sim energy helpers
Generate known-good height–speed pairs plus deliberate negative-radicand rejections for coding kata expected values in physics engines and teaching apps.