Driving range remaining calculator
Twelve gallons left in a car that averages 30 mpg means about 360 miles of range. The same multiplication works for litres with km per litre or kWh with miles per kWh, so you know if the next stop is in reach. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Remaining
- 12
- Economy
- 30
- Remaining range
- 360
When the fuel gauge drops or an EV battery shows partial charge, the next question is how far you can still drive before the next fill or plug. Zero or negative economy is rejected as invalid input so sensors stuck at zero never invent infinite range or divide nonsense.
Range is what is left times how far each unit takes you
Remaining range is a simple product: the quantity left in the tank or battery multiplied by the distance your vehicle covers per unit of it. Twelve gallons at 30 miles per gallon gives 360 miles. Eight litres at 12 kilometres per litre gives 96 kilometres. Twenty kilowatt-hours at 3.5 miles per kilowatt-hour gives 70 miles of electric range. The answer comes out in whatever distance unit your economy figure uses, because nothing is converted along the way. An empty tank correctly returns zero, while an economy of zero or less is refused, since it would mean endless or backwards driving.
When to check it, and the mistakes that skew it
Drivers use it at the roadside or before a trip to see whether the next fuel stop or plug is within reach. Fleet and rental teams use the same figure for dispatch, hand-back checks and low-range alerts. The most common error is mixing units, such as gallons left with an economy in kilometres per litre: convert first so both numbers refer to the same unit. A figure in litres per 100 kilometres measures consumption, not distance per unit, so it does not fit here. And a brochure figure flatters the result: hills, cold weather, cabin heat and highway speeds all lower real economy.
How remaining driving range is computed from fuel or charge and economy
Estimated remaining range equals remaining quantity times vehicle economy when economy is written as distance per unit of fuel or charge. Twelve gallons left in a car rated at thirty miles per gallon yield three hundred and sixty miles of estimated range; eight litres at twelve kilometres per litre yield ninety-six kilometres; twenty kilowatt-hours at three and a half miles per kilowatt-hour yield seventy miles of electric range. Keep units coherent—do not mix gallons with kilometres per litre without converting first.
Zero and negative economy are hard errors under the product contract because they would imply infinite or reverse distance. Negative remaining is likewise rejected; zero remaining is allowed and correctly returns zero range.
What you can do with it
Roadside and pre-trip range checks
Drivers enter litres or gallons left (or kWh on the battery) and their average mpg, km/L, or mi/kWh to see whether the next stop is within estimated range.
Fleet and rental dashboards
Fleet and car-rental tools convert tank or pack remaining and vehicle economy into distance left for dispatch, hand-back checks, and low-range alerts without live map APIs.
FAQ
What happens if economy is zero or negative?
Zero or negative economy is rejected so the engine never invents infinite or reverse range.
Should economy be mpg or L/100km?
Use distance per unit fuel or charge (mpg, km per litre, mi/kWh, and similar). If you only have L/100km, invert it to km/L first; this calculator does not accept consumption-per-distance directly.
Is the driving range remaining calculator free?
The browser tool runs free on your device.
Does it convert units or read live tank sensors?
No. Keep remaining and economy units coherent yourself. Live sensors, maps, and unit converters are separate tools; this capability only multiplies remaining by economy.
How do I estimate the range of an electric car?
Enter the kilowatt-hours left in the battery and your average miles per kilowatt-hour. Twenty kilowatt-hours at 3.5 miles per kilowatt-hour gives 70 miles; use a recent real-world average, since electric economy moves with temperature and speed.
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/range-remaining \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"remaining":12,"economy":30}'const res = await fetch("https://api.kit.forhosting.com/travel/range-remaining", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"remaining": 12,
"economy": 30
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/travel/range-remaining",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"remaining": 12,
"economy": 30
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/travel/range-remaining", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"remaining":12,"economy":30}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"remaining":12,"economy":30}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/travel/range-remaining", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"remaining": 12,
"economy": 30
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "travel.range_remaining",
"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
This driving range remaining calculator multiplies the quantity left in the tank or pack by your vehicle’s economy expressed as distance per unit—miles per gallon, kilometres per litre, or miles per kilowatt-hour—so remaining_range is a transparent product you can trust for trip checks and fleet tools.
How remaining driving range is computed from fuel or charge and economy
Send required fields remaining and economy as JSON numbers or numeric strings. Aliases fuel_remaining, charge_remaining, fuel, charge, tank, battery, quantity, and q map to remaining; fuel_economy, mpg, km_per_l, efficiency, mi_per_kwh, and consumption_rate map to economy. Magnitude caps keep results finite on the Worker isolate. Identical inputs always produce identical JSON: pure arithmetic, no network, no random seed, and no wall clock.
Reading the response fields and choosing realistic inputs
The formula field is safe to show next to the numbers so users see range equals remaining times economy. Prefer real-world average economy over optimistic brochure figures when the road includes hills, cold weather, cabin heat, or highway speeds; electric vehicles especially vary with temperature and speed. Distance units are whatever length unit you embed in economy; the engine is unit-agnostic and does not convert miles to kilometres. On success the response echoes remaining and economy after stable rounding, plus remaining_range, a human-readable formula string, and method equal to remaining_times_economy. Use remaining_range when you care about whether the next city is in reach, how far a fleet van can go before refuelling, or how much battery is needed for a known leg. This endpoint does not model elevation, traffic, wind, or regenerative braking; it is a transparent arithmetic check, not a navigation engine. Missing required fields, non-finite values, and zero or negative economy all fail with invalid_input and are not charged after the engine rejects the request.
API usage, pricing, travel workflows, and practical limits
Call the free in-browser driving range remaining calculator for roadside checks, classroom demos, and quick EV or ICE comparisons without installing a spreadsheet. For multi-vehicle fleets, call once per vehicle so each unit stays auditable. Send a JSON body with remaining and economy (or the documented aliases). Use the prepaid API when a travel portal, fleet dashboard, rental app, or booking tool needs a stable contract under KIT balance at $0.002 per successful item; validation failures never consume balance. Pair this endpoint with trip fuel cost tools when you already know distance and want money instead of miles left—remaining range answers how far you can go with what you have, while cost estimators answer how much a planned distance will burn. Authors shipping SDKs can map remaining_range into gauges and tables that show distance left beside tank or battery percentage—the same shape drivers expect on a simple range readout.
Integration use cases
EV and hybrid comparison tools
Shoppers and educators compare two vehicles at the same remaining energy with different economy figures to estimate how far each can still travel in deterministic JSON.
Technical questions
How do I estimate remaining driving range with this calculator?
Send JSON with remaining (fuel volume or charge left) and economy as distance per unit (mpg, km/L, or mi/kWh). The response includes remaining_range.