The Gas Mileage Calculator works out your miles per gallon. Enter the distance you drove and the fuel you used to see your fuel economy.
Gas Mileage Calculator
Real fuel economy from your own fill-ups: distance ÷ fuel used, shown as MPG (US), MPG (UK), L/100 km and km/L, with trip cost.
Enter your values
Fill in the fields below — the result appears with every step shown.
Your result will appear here
Enter your values above, then press Calculate — or press Enter in any field.TinyExe · Gas Mileage Result
Calculated locally in your browser
—
Name
—
Distance driven
—
Fuel used
—
Fuel price (optional)
—
How this was calculated
What to do next
TinyExe PDF & PNG exports carry the TinyExe logo and tinyexe.com header & footer.
Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.
The short answer
Gas mileage is calculated by dividing the distance driven by the fuel used to drive it: fuel economy equals distance divided by gallons. Driving 300 miles on 10 US gallons gives exactly 30 MPG, which converts to 36.03 MPG on imperial gallons, 7.84 litres per 100 kilometres, or 12.75 kilometres per litre travelled.
- Fuel economy = distance ÷ fuel used; MPG (UK) = MPG (US) × 1.20095; L/100 km = 235.215 ÷ MPG (US); trip cost = distance ÷ economy × fuel price
- Tank-to-tank figures only: accuracy depends on filling to the same level each time; it does not read OBD/telematics data, separate city from highway driving, or convert currencies.
Fuel economy in four units
Reference values for this calculator.
| MPG (US) | MPG (UK) | L/100 km | km/L |
|---|---|---|---|
| 20 | 24.02 | 11.76 | 8.50 |
| 30 | 36.03 | 7.84 | 12.75 |
| 40 | 48.04 | 5.88 | 17.00 |
| 50 | 60.05 | 4.70 | 21.26 |
The formula
The exact formula this calculator uses — every variable in it is explained in the card below.
The formula
C-002 fix: this replaces the live generic kernel copy entirely with a dedicated fuel-economy engine — US MPG headline, imperial MPG, L/100 km and km/L conversions, plus optional trip fuel cost and cost per mile. Nothing here computes density or any generic A×B / A÷B / ½AB² relationship.
Worked examples
Worked examples with the full working shown — try them in the calculator to check.
Example 1
C-002 anchor: 300 miles on 10 gallons
Distance 300 miles, fuel used 10 US gal, no fuel price
| Calculation | Steps |
|---|---|
| Fuel economy = distance ÷ fuel used = 300 miles ÷ 10 gal = 30 MPG (US); Imperial: 30 × 1.20095 = 36.03 MPG (UK); Metric: 235.215 ÷ 30 = 7.84 L/100 km, which is 12.75 km/L; No fuel price entered, so trip cost is skipped. | 30 MPG (US) — 7.84 L/100 km — Fuel economy is distance divided by fuel used; the same run is 36.03 MPG on the larger imperial gallon. |
Result
Example 2
Highway trip with fuel cost
Distance 450 miles, fuel used 12.5 US gal, price $3.60/gal
| Calculation | Steps |
|---|---|
| Fuel economy = distance ÷ fuel used = 450 miles ÷ 12.5 gal = 36 MPG (US); Imperial: 36 × 1.20095 = 43.23 MPG (UK); Metric: 235.215 ÷ 36 = 6.53 L/100 km, which is 15.31 km/L; Trip cost = distance ÷ economy × price = 450 ÷ 36 × $3.6 = $45. | 36 MPG (US) — 6.53 L/100 km — Fuel economy is distance divided by fuel used; the same run is 43.23 MPG on the larger imperial gallon. |
Result
Example 3
City week, decimal fill
Distance 187.5 miles, fuel used 8.35 US gal, price $4.19/gal
| Calculation | Steps |
|---|---|
| Fuel economy = distance ÷ fuel used = 187.5 miles ÷ 8.35 gal = 22.46 MPG (US); Imperial: 22.46 × 1.20095 = 26.97 MPG (UK); Metric: 235.215 ÷ 22.46 = 10.47 L/100 km, which is 9.55 km/L; Trip cost = distance ÷ economy × price = 187.5 ÷ 22.46 × $4.19 = $34.99. | 22.46 MPG (US) — 10.47 L/100 km — Fuel economy is distance divided by fuel used; the same run is 26.97 MPG on the larger imperial gallon. |
Result
How to use this calculator
Step 1
Enter the distance driven in the first field.
Step 2
Enter the fuel used.
Step 3
Enter the fuel price (optional).
Step 4
Press Calculate to run the formula: Fuel economy = distance ÷ fuel used; MPG (UK) = MPG (US) × 1.20095; L/100 km = 235.215 ÷ MPG (US); trip cost = distance ÷ economy × fuel price.
Step 5
Read the headline result, then check the detail metrics and the numbered steps to see exactly how it was derived.
Step 6
Adjust any input and recalculate to compare scenarios — the steps update with the new figures.
Frequently asked questions
How is the Gas Mileage Calculator calculated?
The formula is: Fuel economy = distance ÷ fuel used; MPG (UK) = MPG (US) × 1.20095; L/100 km = 235.215 ÷ MPG (US); trip cost = distance ÷ economy × fuel price. The calculator substitutes your inputs step by step and shows every substitution in its steps, so the result can be reproduced by hand.
What does the Gas Mileage Calculator result mean?
A gas mileage calculator measures a vehicle's real fuel economy from a fill-up: you record the distance driven since the last full tank and divide it by the fuel needed to refill. It reports US MPG as the headline, with imperial MPG, L/100 km and km/L conversions and an optional trip fuel cost.
When should I use the Gas Mileage Calculator?
Use it at every fill-up to track a car's true economy, to compare vehicles honestly (brochure figures are laboratory numbers), to budget fuel for a trip, or to spot a sudden economy drop that can signal under-inflated tyres, a clogged filter or another fault.
What are the limits of this Gas Mileage Calculator?
Tank-to-tank figures only: accuracy depends on filling to the same level each time; it does not read OBD/telematics data, separate city from highway driving, or convert currencies.
What inputs does the Gas Mileage Calculator need?
It needs: Distance driven, Fuel used, Fuel price (optional). Defaults are pre-filled with the worked example, so you can run it immediately and then replace the values with your own.
Is the Gas Mileage Calculator free and private?
Yes. It runs entirely in your browser with no sign-up and no data sent to a server, and you can save the result as a PDF or PNG or share it from the result card.
About this calculator
A gas mileage calculator measures a vehicle's real fuel economy from a fill-up: you record the distance driven since the last full tank and divide it by the fuel needed to refill. It reports US MPG as the headline, with imperial MPG, L/100 km and km/L conversions and an optional trip fuel cost.
Fuel economy is a rate: distance per unit of fuel. In the US it is expressed as miles per gallon (MPG) — more is better. Most of the world uses the inverse, litres per 100 kilometres, where less is better; the two are linked by L/100 km = 235.215 ÷ MPG (US), and this calculator shows both so figures from either system can be compared.
The UK figure needs care: the imperial gallon is about 20% larger than the US gallon, so the same car scores a higher MPG number in Britain (multiply US MPG by 1.20095) without using any less fuel. Kilometres per litre, used in Japan and India, is simply 100 divided by the L/100 km figure.
The fill-to-fill method is the reliable one: fill the tank, reset the trip meter, drive, then refill to the same level and divide the trip distance by the gallons the pump reports. Adding a fuel price turns the same run into a trip cost and a cost per mile, the two numbers that matter for budgeting.
Use it at every fill-up to track a car's true economy, to compare vehicles honestly (brochure figures are laboratory numbers), to budget fuel for a trip, or to spot a sudden economy drop that can signal under-inflated tyres, a clogged filter or another fault.
How to calculate it yourself
Step 1
Start from the defining formula: Fuel economy = distance ÷ fuel used; MPG (UK) = MPG (US) × 1.20095; L/100 km = 235.215 ÷ MPG (US); trip cost = distance ÷ economy × fuel price.
Step 2
Gather the inputs the formula needs: Distance driven, Fuel used, Fuel price (optional).
Step 3
Substitute your values into the formula exactly as written, keeping units consistent with the input labels.
Step 4
Work through the arithmetic in the order the calculator's steps show — the worked examples on this page demonstrate the full sequence with real numbers.
Step 5
Interpret the headline result together with its detail metrics and the verdict, and sanity-check it against the reference table on this page.
Real-life examples
Road-trip driver checking a thirsty SUV
On a family road trip, a driver covers 300 miles between fill-ups and the pump shows exactly 10 gallons to refill the tank — the anchor case for this calculator.
Fuel economy = distance ÷ fuel used = 300 miles ÷ 10 gal = 30 MPG (US); Imperial: 30 × 1.20095 = 36.03 MPG (UK); Metric: 235.215 ÷ 30 = 7.84 L/100 km, which is 12.75 km/L; Trip cost = distance ÷ economy × price = 300 ÷ 30 × $3.85 = $38.5.
30 MPG (US) — 7.84 L/100 km — Fuel economy is distance divided by fuel used; the same run is 36.03 MPG on the larger imperial gallon.
Commuter comparing two cars
A commuter drives 620 miles a month and her current car uses 22 gallons over that distance; she records the figure to compare against a hybrid's brochure claim.
Fuel economy = distance ÷ fuel used = 620 miles ÷ 22 gal = 28.18 MPG (US); Imperial: 28.18 × 1.20095 = 33.84 MPG (UK); Metric: 235.215 ÷ 28.18 = 8.35 L/100 km, which is 11.98 km/L; Trip cost = distance ÷ economy × price = 620 ÷ 28.18 × $3.5 = $77.
28.18 MPG (US) — 8.35 L/100 km — Fuel economy is distance divided by fuel used; the same run is 33.84 MPG on the larger imperial gallon.
Ideas & use cases
- Build a monthly log: run the calculator at every fill-up and watch the trend — a drop of more than about 10% is worth investigating.
- Compare driving styles on the same route: one week of gentle acceleration versus your normal week, same distance, measured honestly at the pump.
- Price a holiday drive before booking: enter the planned distance and your measured MPG with the current fuel price to get the true trip fuel cost.
Limitations & sources
- Tank-to-tank figures only: accuracy depends on filling to the same level each time; it does not read OBD/telematics data, separate city from highway driving, or convert currencies.
Sources: Fuel economy definition and unit conversions: US EPA fueleconomy.gov (MPG) and the exact conversion 1 US gallon = 0.832674 imperial gallons, L/100 km = 235.215 ÷ MPG(US); calculator.net gas mileage calculator behaviour cross-checked
