ToolZoneX
Blog

Mileage Calculator

Calculate fuel efficiency (mpg, km/l, or miles/km per kWh for EVs) from distance traveled and fuel consumed, plus estimated trip cost.

Distance Traveled

Fuel Consumed

Fuel Price per Unit (optional)

$

Fuel Efficiency

30.00

Miles / Gallons (US)

Gallons (US) per 100 Miles

3.33

Cost per Mile

$ 0

Estimated Trip Fuel Cost

$ 35

How fuel efficiency (mileage) is calculated

Mileage — more precisely, fuel efficiency — measures how far a vehicle travels per unit of fuel consumed. In the US this is usually miles per gallon (mpg); elsewhere it's kilometers per liter (km/l) or, for electric vehicles, miles or kilometers per kWh of battery used. This calculator accepts any combination of distance and fuel units, including electric.

Formula

Fuel Efficiency = Distance Traveled ÷ Fuel Consumed

Enter the distance you covered and how much fuel (or electricity) it took. If you also know the price per unit of fuel, the calculator estimates what that trip cost and the cost per unit distance.

Example

Driving 300 miles on 10 gallons of gas gives a fuel efficiency of 30 mpg. At $3.50/gallon, that trip cost $35 in fuel, or about $0.117 per mile.

Common Use Cases

  • Checking your car's real-world mpg or km/l against the manufacturer's rated figure.
  • Comparing fuel efficiency across different vehicles, including gas vs. electric.
  • Estimating the fuel cost of a completed trip after the fact.

FAQs

How do I calculate mpg manually?

Fill the tank, reset the trip odometer, drive normally, then fill up again and note the gallons needed to refill and the miles driven since the reset. Divide miles by gallons — that's your real-world mpg for that tank.

How does this work for electric vehicles?

Select "kWh (electric)" as the fuel unit and enter the kWh of battery used for the trip — the calculator then reports miles (or km) per kWh, the EV equivalent of mpg, along with kWh used per 100 miles/km if you want to compare against a vehicle's rated efficiency.

Why does my mpg vary between tanks?

Driving style, terrain, traffic, temperature, tire pressure, and how much city vs. highway driving you did all affect real-world fuel efficiency — it's normal to see it fluctuate somewhat from the manufacturer's rated average.