Everyday

Gas Mileage Calculator

Work out fuel economy from a fill-up in km/L, L/100 km and mpg, with the cost per km.

By Nitin Raturi · Last reviewed

Your fill-up

How to use the Gas Mileage Calculator

Work out your vehicle’s fuel economy from a real fill-up.

  1. Fill the tank to full and reset the trip meter.
  2. Drive as usual, then fill to full again.
  3. Enter the distance driven and the fuel added, with their units.
  4. Add the price paid to see the cost per kilometre.

Good to know

  • Average several fill-ups; one tank can mislead.
  • Use the same pump and fill level each time.

Distance driven

How far you drove on the fuel entered, from the trip meter or two odometer readings.

How to fill it in

  • Enter 0.1 to 1,00,000.
  • For best accuracy, fill the tank full, reset the trip meter, and fill full again.

Example

450 km on 30 litres is 15.0 km/L.

Distance unit

Distance unit

Kilometres or miles.

How to fill it in

  • Choose the unit your odometer shows.

Fuel used

The fuel used for that distance: the amount put in at the second full fill.

How to fill it in

  • Enter 0.01 to 10,000.

Example

A scooter doing 100 km on 2 litres gets 50.0 km/L.

Fuel unit

Fuel unit

Litres, US gallons (3.785 L) or imperial (UK) gallons (4.546 L).

How to fill it in

  • Indian pumps sell in litres; choose a gallon only for US or UK figures.

Example

300 miles on 10 US gallons is 30.0 mpg (US), or 12.75 km/L.

Fuel price

What you paid per litre or gallon, to work out the running cost.

How to fill it in

  • Enter the price per fuel unit chosen above, or 0 to skip.

Example

At ₹100 a litre, 15 km/L costs ₹6.67 per km.

Keep in mind: Fuel prices change often and differ by city; enter what you paid.

Fuel economy

15.00 km/L

450 km on 30 L is 15.00 km/L, or 6.67 litres per 100 km.

Kilometres per litre
15.00 km/L
Litres per 100 km
6.67 L/100 km
Miles per US gallon
35.3 mpg
Miles per UK gallon
42.4 mpg
Fuel cost
₹3,000.00
Cost per km
₹6.67

Exact unit definitions: 1 mile = 1.609344 km, 1 US gallon = 3.785411784 L, 1 UK gallon = 4.54609 L. One fill-up; average several for a steadier figure.

How this calculator works

  1. Step 1Fill and resettank fullFill to full and zero the trip meter.
  2. Step 2DrivedistanceUse the car as usual until the next fill.
  3. Step 3Fill againfuel addedThe fuel to refill is what that distance used.

Fuel economy is distance divided by fuel. The calculator converts your units with their exact definitions and shows km/L, L/100 km and both kinds of mpg.

Worked example: one tank

450 km on 30 litres at ₹100 a litre
Mileage
km/L = km ÷ litres
Cost
₹ per km = litres × price ÷ km
  1. Mileage450 ÷ 3015.00 km/L
  2. Per 100 km100 × 30 ÷ 4506.67 L
  3. Fuel cost30 × ₹100₹3,000
  4. Cost per km₹3,000 ÷ 450₹6.67

The same tank is 35.3 miles per US gallon, or 42.4 per UK gallon.

Same economy, four units

  • km/L15.00
  • L/100 km6.67
  • mpg (US)35.3
  • mpg (UK)42.4
One tank of 450 km on 30 litres, in each unit

Higher km/L and mpg are better; lower L/100 km is better. A US figure of 30 mpg is 12.75 km/L.

Read the result

A scooter doing 100 km on 2 litres gets 50.0 km/L and costs ₹2.00 per km at ₹100 a litre.

Compare your figure with the one in the brochure: test-cycle figures are measured in set lab conditions and are usually higher than everyday driving.

Assumptions and limits

  • Exact unitsMile, US gallon and UK gallon by definition.
  • One fill-upAverage several tanks for a steady figure.
  • No correctionOdometer error and partial fills are not adjusted.
  • Your priceCost uses the price you enter, not a live rate.

Once you know your mileage, the cost of any trip follows.

To price a drive from its distance and fuel price, use the fuel cost calculator. For speed, distance and time, try the speed calculator.

Common mistakes

  • Mistake: Using the fuel bought at the start of the trip.

    Instead: Use the fuel added at the second full fill.

  • Mistake: Mixing US and UK gallons.

    Instead: A UK gallon is about 20% larger; pick the right one.

  • Mistake: Judging mileage from one short city trip.

    Instead: Track several full tanks.

Checking the method

A separate script re-works every golden value in exact fractions, converting through metres and cubic inches instead of litres.

Read how we test our calculators, or browse more everyday tools.

Frequently asked questions

How do I calculate mileage in km/L?

Divide the distance by the fuel used. 450 km on 30 litres is 15.0 km/L.

How do I convert km/L to L/100 km?

Divide 100 by the km/L figure: 15 km/L is 6.67 L/100 km.

What is 30 mpg in km/L?

30 US mpg is 12.75 km/L; UK gallons are larger, so 30 UK mpg is less.

How do I find the fuel cost per km?

Multiply the fuel by its price and divide by the distance. At ₹100 a litre, 15 km/L is ₹6.67 per km.

What mileage does a scooter doing 100 km on 2 litres get?

50.0 km/L: 100 km divided by 2 litres.

Sources and methodology

The formulas are standard time-value-of-money results. We check every figure against golden values worked out independently, by closed form and by month-by-month simulation; see the methodology.

Written and maintained by Nitin Raturi, a software engineer (about the author). Last reviewed 4 Nov 2026; next review due by . Found an error? Tell us.

Changelog

  • : Initial release.