Home Calculators Categories Category: Automotive & Travel

Fuel distance calculator

Distance, fuel and fuel economy are three views of one relationship: knowing any two lets you work out the third. This page explains the arithmetic behind that relationship, shows how to handle mixed units such as litres with mpg, and sets out what a calculation like this can and cannot tell you about a real journey.

Input
Load an arithmetic example, not a vehicle rating. Replace it with your own economy.
Fuel actually available for range, or consumed over the measured interval. Slider covers 0–100; type larger amounts.
Applies to fuel, reserve, trip fuel and price denominator. A US liquid gallon is smaller than an Imperial gallon.
Enter known fuel economy in the selected unit. Slider covers 0.1–100; type other supported positive values.
km/L and mpg are distance per fuel; L/100 km and L/km are fuel per distance. US and Imperial mpg differ.
Used for displayed range, entered trip/measured distance and cost per distance.

Changing a unit keeps the number. Re-enter the matching value when converting a known measurement.

Constant entered fuel economy. No reserve is subtracted. Actual range varies.

Visual
Calculated fuel or distance compared on a shared linear scale
Output
Driving range
300.00 km

Two decimals show estimate arithmetic. CU means your currency units. Positive values below 0.01 show <0.01.

Worked solution

The Core Relationship

Fuel economy describes how far a vehicle travels per unit of fuel. Fuel consumption is the same idea inverted: how much fuel is used per unit of distance. Both express one ratio, so converting between them is a matter of taking a reciprocal and fixing the units.

Using fuel economy ee in kilometres per litre, the three questions this calculator answers are:

distance=fuel×efuel=distanceee=distancefuel\text{distance} = \text{fuel} \times e \qquad \text{fuel} = \frac{\text{distance}}{e} \qquad e = \frac{\text{distance}}{\text{fuel}}

Every result depends on a single assumption: that economy stays constant over the distance in question. The calculator uses the economy figure you enter and applies no adjustment for speed, traffic, terrain, weather, load, maintenance, fuel type or vehicle model.

Choosing a Task

The calculator opens in Simple mode, which always calculates driving range from the fuel available and the economy you enter. It does not subtract a reserve. Advanced mode offers three tasks, and only the fields relevant to the selected task are shown.

Task You enter You get
Simple (default) Fuel available, fuel economy Driving range
Advanced: Range Fuel available, fuel economy, fuel to keep aside Driving range and fuel used for that range
Advanced: Trip fuel & cost Total trip distance, fuel economy, fuel price Trip fuel needed, trip fuel cost, cost per distance unit
Advanced: Measured mileage Distance driven, fuel consumed Measured economy in the unit you choose

Fields that are inactive for a task do not take part in that task's calculation or in its numeric validation.

Units: Fuel, Economy and Distance Are Independent

Three selectors control how numbers are interpreted:

  • Fuel unit: litres, US liquid gallons or Imperial gallons.
  • Economy unit: km/L, L/100 km, L/km, mpg (US) or mpg (Imp).
  • Distance unit: kilometres or miles.

The economy unit is independent of the fuel unit, so you can enter fuel in litres and economy in mpg (US). The fuel unit also applies to the reserve, the calculated trip fuel and the denominator of the fuel price. The distance unit applies to the entered trip or measured distance, the displayed range and the denominator of the cost per distance.

Changing a selector reinterprets the number already in the field; it does not convert it. If a field holds 20 with the fuel unit set to litres and you switch to US gallons, the field still says 20, now meaning 20 US gallons, which is about 75.71 L, since 20×3.785411784≈75.70820 \times 3.785411784 \approx 75.708. To carry a real measurement across units, convert it yourself and type the new value.

Exact Unit Definitions

The calculator uses these exact relationships, which are the standard definitions listed in NIST's conversion-factor tables:

Unit Equals
1 international mile 1.609344 km
1 US liquid gallon 3.785411784 L
1 Imperial gallon 4.54609 L

The US gallon is smaller than the Imperial gallon, so a figure labelled "mpg" means different things depending on the gallon behind it.

Economy Equivalents

The same vehicle behaviour can be written in several ways. The table shows two consistent examples.

km/L L/100 km L/km mpg (US) mpg (Imp)
12.5 8 0.08 29.40 35.31
20 5 0.05 47.04 56.50

Higher km/L and mpg mean better economy, while higher L/100 km and L/km mean worse economy. Because they run in opposite directions, mixing up the two families is a common source of wrong answers. The two mpg columns are not interchangeable either: 30 mpg (US) corresponds to about 12.754 km/L, while 30 mpg (Imp) corresponds to about 10.620 km/L.

Calculating Driving Range from Fuel

Let FF be the fuel available, RR the fuel you choose to keep aside, vv the litres per fuel unit, ee the economy in km/L and dd the kilometres per distance unit. The range in the selected distance unit is:

range=(F−R) v ed\text{range} = \frac{(F - R)\, v\, e}{d}

Here vv is 1 for litres, 3.785411784 for US gallons and 4.54609 for Imperial gallons, and dd is 1 for kilometres and 1.609344 for miles. Simple mode sets R=0R = 0. Advanced Range subtracts the entered reserve exactly once.

Converting Entered Economy to km/L

The entered economy value EE is normalised to ee first:

Entered unit Normalised economy ee in km/L
km/L EE
L/100 km 100/E100 / E
L/km 1/E1 / E
mpg (US) E×1.609344/3.785411784E \times 1.609344 / 3.785411784
mpg (Imp) E×1.609344/4.54609E \times 1.609344 / 4.54609

Example: Range with a Reserve

Suppose 35 L of fuel is available, economy is 8 L/100 km and you want to keep 5 L aside.

  1. Normalise economy: e=100/8=12.5e = 100 / 8 = 12.5 km/L.
  2. Usable fuel: 35−5=3035 - 5 = 30 L.
  3. Range: 30×12.5=37530 \times 12.5 = 375 km.

Advanced Range also reports fuel used for range, here 30 L. Without the reserve, Simple mode would give 35×12.5=437.535 \times 12.5 = 437.5 km, and the 62.5 km difference is the distance the kept-aside fuel represents at that economy.

Example: Mixed Units

Suppose 40 L is available, economy is 30 mpg (US), and you want the answer in miles. Converting 40 L to US gallons gives 40/3.785411784≈10.566940 / 3.785411784 \approx 10.5669 gal, and then:

10.5669×30≈317.01 miles10.5669 \times 30 \approx 317.01 \text{ miles}

The calculator reaches the same value in one step with 40×12.754311/1.609344≈317.0140 \times 12.754311 / 1.609344 \approx 317.01, where 12.754311 is 30 mpg (US) expressed in km/L.

Edge Cases

Zero available fuel is valid and gives zero range. A reserve equal to the fuel also gives zero range. A reserve larger than the fuel is rejected because it implies negative usable fuel.

Calculating Trip Fuel and Fuel Cost

For a journey of total distance DD, the fuel required in the selected fuel unit is:

fuel=D de v\text{fuel} = \frac{D\, d}{e\, v}

The fuel cost then uses the price PP, entered as currency units (CU) per selected fuel unit:

cost=fuel×Pcost per distance unit=costD\text{cost} = \text{fuel} \times P \qquad \text{cost per distance unit} = \frac{\text{cost}}{D}

CU simply means whatever currency you use consistently. There is no currency selector, no exchange-rate conversion and no live price lookup, so you supply the price yourself.

Enter the full distance you will drive. The calculator applies no automatic return-trip multiplier, so a round trip of 320 km each way should be entered as 640 km. In this task, fuel available and reserve are inactive.

Example: A Round Trip in Metric Units

A round trip totals 640 km, economy is 7.5 L/100 km and fuel costs 1.85 CU per litre.

  1. Required fuel: 640×7.5/100=48640 \times 7.5 / 100 = 48 L.
  2. Fuel cost: 48×1.85=88.8048 \times 1.85 = 88.80 CU.
  3. Cost per kilometre: 88.80/640=0.1387588.80 / 640 = 0.13875, displayed as 0.14 CU/km.

The per-kilometre figure can also be reached directly: 0.075 L/km×1.85 CU/L=0.138750.075 \text{ L/km} \times 1.85 \text{ CU/L} = 0.13875 CU/km. Cost per kilometre is just consumption multiplied by price, which is why it falls when economy improves or the price drops. Displayed results are rounded to two decimals, but calculations use unrounded values.

Example: Miles and US Gallons

A trip of 250 miles at 32 mpg (US), with fuel at 3.50 CU per US gallon, needs 250/32=7.8125250 / 32 = 7.8125 US gallons. The cost is 7.8125×3.50=27.343757.8125 \times 3.50 = 27.34375 CU, about 27.34 CU, or roughly 0.11 CU per mile. In this case the distance, fuel and economy units all use the same gallon-and-mile system, so no conversion constants are needed.

A zero fuel price is valid and produces zero monetary costs. The calculated costs cover fuel only. Tolls, maintenance, depreciation and other journey costs are not included.

Calculating Measured Mileage

If you have driven a known distance and know how much fuel it used, you can derive your actual economy. Normalise both quantities first, with Dkm=D×dD_{km} = D \times d and FL=F×vF_L = F \times v (the distance in kilometres and the fuel in litres), then:

Result unit Formula
km/L Dkm/FLD_{km} / F_L
L/100 km 100×FL/Dkm100 \times F_L / D_{km}
L/km FL/DkmF_L / D_{km}
mpg (US) (Dkm/1.609344) / (FL/3.785411784)(D_{km} / 1.609344) \,/\, (F_L / 3.785411784)
mpg (Imp) (Dkm/1.609344) / (FL/4.54609)(D_{km} / 1.609344) \,/\, (F_L / 4.54609)

In this task the economy-unit selector chooses the result unit, and the entered economy value, reserve and fuel price are inactive.

Example: A Motorcycle

A motorcycle covers 310 km and uses 8.2 L over that interval.

  • 310/8.2≈37.80310 / 8.2 \approx 37.80 km/L
  • 100×8.2/310≈2.65100 \times 8.2 / 310 \approx 2.65 L/100 km
  • (310/8.2)×3.785411784/1.609344≈88.92(310 / 8.2) \times 3.785411784 / 1.609344 \approx 88.92 mpg (US)
  • (310/8.2)×4.54609/1.609344≈106.79(310 / 8.2) \times 4.54609 / 1.609344 \approx 106.79 mpg (Imp)

The same arithmetic applies to cars, vans and motorcycles. There is no motorcycle-specific model; what matters is that the distance and fuel come from the same interval.

Getting a Trustworthy Fuel Figure

The fuel amount must be what the vehicle actually consumed over the measured distance. Tank capacity does not establish that, and neither does an isolated partial top-up. The usual approach is to fill the tank, record the odometer, drive normally, refill to the same full level and record the fuel added. FuelEconomy.gov's MPG calculator is built around this full-fill-to-full-fill method. The calculator displays this guidance with valid measured-mileage results.

The software accepts fuel amounts as small as 0.001 of the selected fuel unit. That is a computational bound, not a claim that such a small quantity can be measured reliably. A single tank gives a noisy estimate, and averaging several fill-ups usually smooths out pump cut-off differences and driving variation.

Using the Fuel Distance Calculator Well

Use an economy figure that matches your conditions. The calculator treats the number you enter as constant for the whole journey. Real economy changes with conditions, driving style, loading and maintenance, as FuelEconomy.gov's factors affecting economy explains. This page does not apply any universal correction factor, and the result is only as good as the economy you supply. A figure measured over your own recent mixed driving is generally a better input than one taken from a brochure.

Treat fuel available as fuel you can actually use. A tank's nominal capacity is not the amount of fuel you have. The calculator does not detect inaccessible fuel, read a fuel gauge or retrieve data from the vehicle.

Choose the reserve yourself. The reserve is a fuel amount you decide on, subtracted once. It is not a percentage and not a recommended safety margin. The calculator cannot certify a safe distance to empty, predict where you will be able to refuel, estimate driving time or forecast arrival range. For a valid range calculation with no reserve excluded, it displays this advisory: "No reserve is excluded. This is an estimate, not a safe distance-to-empty limit. Use Advanced to keep fuel aside and plan refuelling earlier."

Do not read precision as accuracy. Results normally display two decimal places, and strictly positive results below 0.01 are shown as "<0.01" with the relevant unit rather than as an apparent zero. Two decimals describe how the arithmetic is displayed, not how closely a real vehicle will match it.

Input limits are not realism checks. Economy is accepted from 0.001 to 1,000 in the chosen unit, and distances up to 1,000,000. These are bounds on the arithmetic, so a value inside them is not necessarily plausible for any vehicle.

Reading the Visualisation

The chart draws two horizontal bars on a shared linear scale:

  • Range: the calculated range against a reference of 100 selected distance units.
  • Trip: the required fuel against a reference of 10 selected fuel units, with the total fuel cost annotated.
  • Measured mileage: distance per 10 selected fuel units, calculated as 10×D/F10 \times D / F, against a reference of 100 selected distance units.

The scale adapts to fit both bars. The reference is only a scale guide, not a target, a vehicle benchmark, a tank gauge or a recommended threshold. You can zoom, drag to pan, reset the viewport and switch between split and stacked layouts.

Resetting, Copying and Exporting

Results and the worked conversion text update automatically as you change values. Reset restores the defaults, Simple mode and the chart viewport. Copy places the active inputs, units, visible results, worked solution and guidance on the clipboard, and is disabled while the calculation is invalid. Export opens the browser's print or PDF workflow using the current values. There is no CSV download and no generated share link.

The Examples selector includes two authored arithmetic demonstrations: 20 L at 15 km/L, which gives a range of 300.00 km, and 10 US gal at 30 mpg (US) with miles selected, which gives 300.00 mi. These are demonstrations of the arithmetic, not vehicle ratings or recommended economy figures.

What Counts as Invalid Input

The calculator rejects values rather than guessing. An active field that is blank, non-numeric, non-finite or outside its supported range produces field feedback and placeholder results instead of a usable number. Specifically:

  • Reserve greater than available fuel is invalid.
  • Economy must be positive and within its supported range.
  • Trip or measured distance must be positive and within range.
  • Measured fuel must be at least 0.001 of the selected fuel unit.
  • Results that are non-finite, or that underflow to zero when they are mathematically positive, are rejected.

All calculation runs locally in the browser using JavaScript Number arithmetic, which is double-precision floating point rather than arbitrary-precision arithmetic. For ordinary fuel and distance values the effect is far smaller than the uncertainty in the inputs themselves.

Frequently Asked Questions

How do I convert gas or petrol quantity into distance?

Multiply the fuel by the economy, keeping the units consistent: gallons times miles per gallon gives miles, and litres times kilometres per litre gives kilometres. If the units differ, convert one side using the constants above, or let the calculator reinterpret them through its separate fuel, economy and distance selectors.

Can I calculate litres per kilometre?

Yes. In Measured mileage, set the economy unit to L/km and enter the distance driven and fuel consumed over the same interval. The result is FL/DkmF_L / D_{km}, where FLF_L is the fuel in litres and DkmD_{km} the distance in kilometres. Choosing L/100 km instead multiplies that figure by 100.

Does it work for diesel or motorcycles?

Yes, provided you enter economy that belongs to that vehicle. The arithmetic is dimensional and identical for petrol, diesel and motorcycles. There is no fuel-type selector and no vehicle database.

Why does my result differ from the distance I actually drove?

The calculator assumes constant economy, while real consumption varies with conditions, driving, loading and maintenance. Differences can also arise from fuel-amount estimates, measurement intervals or unit selection. Check that the fuel and distance measurements cover the same interval, that US and Imperial units match your data, and that the entered economy represents the journey. A discrepancy alone does not identify its cause.

Does the calculator include the return journey?

No. It applies no return-trip multiplier, so enter the total distance of every leg you intend to drive.

Can it show prices in my currency?

You enter the fuel price as currency units per selected fuel unit, using one currency consistently. Nothing is converted, and no live prices are fetched.

Is mpg (US) the same as mpg (Imp)?

No. They use different gallons, 3.785411784 L and 4.54609 L respectively, so the same number means different economy. Select the one that matches the figure you are entering.

Does it cover EV energy use, fuel-tax mileage reporting or route planning?

No. This calculator handles fuel-based arithmetic only. It does not calculate electric-vehicle energy consumption or MPGe, jurisdiction mileage for fuel tax filings, or route distances.

Calculation Methodology Documented

Read the formula definitions, supported input ranges, and limitations before using this estimate.

Review Methodology
Debjeet Bhowmick
Author Debjeet Bhowmick AWS Certified Solutions Architect • Cloud & DevOps Consultant

AWS Certified Solutions Architect Professional and Senior Cloud & DevOps Consultant with over 14 years of hands-on expertise architecting resilient cloud infrastructure across AWS, GCP, and Azure. Specializes in infrastructure as code, continuous delivery automation, and telemetry across Terraform, Ansible, Docker, Kubernetes, ELK, Python, and SQL. Creator of OrangeCalc, delivering client-side high-precision computational tools.