Field Service Cost Compare prices

Home/Calculators/MPG calculator

MPG calculator: miles per gallon, fuel cost and cost per mile

You have a fuel receipt and an odometer reading but no clear way to turn them into a number you can compare, plan a trip budget with, or check against the figure on the window sticker. MPG calculator. Nothing was tested for this page; the numbers come from the formula shown below and the inputs you enter.

CalculatorBuilt 27 November 2026Example inputs, not industry averages

Miles per gallon from a tank, or the fuel used and its cost for a trip.
Trip or tank distance from the odometer.
Used when you choose miles per gallon. Gallons you filled after driving the miles.
Used when you choose fuel for a trip. US miles per gallon.
Typed by you. Leave blank to skip cost.

Miles per gallon

—

Gallons
—
Liters per 100 km
—
Kilometers per liter
—
Fuel cost
—
Fuel cost per mile
—

An estimate from the formula below and the numbers you typed. Check quantities against your plan and your supplier before you order.

Put it into a job estimate

Enter miles and gallons to get miles per gallon, or enter miles and miles per gallon to get the gallons a trip needs. An optional fuel price adds fuel cost and cost per mile, and the result also shows liters per 100 km and kilometers per liter.

The automatic calculation needs JavaScript. With scripting off, the fields above do nothing and the result area stays empty. The formula is written out below, so you can do the same arithmetic on paper.

MPG calculator: what to enter

  1. Fill the tank fully and write down the odometer reading.
  2. Drive as you normally do, then fill the tank fully again at the same pump.
  3. Write down the new odometer reading and the gallons the second fill took.
  4. Subtract the first odometer reading from the second to get miles driven.

MPG calculator formula, written out

  • miles per gallon = miles driven / gallons used
  • gallons for a trip = miles / miles per gallon
  • fuel cost = gallons x price per gallon; cost per mile = fuel cost / miles
  • liters per 100 km = 235.215 / miles per gallon (US gallons)
  • kilometers per liter = miles per gallon x 0.425144

MPG calculator worked example

With the inputs already in the form (what do you want to work out? Miles per gallon, miles driven 300, gallons used (for miles per gallon) 12, fuel price per gallon 3.5) the result is: miles per gallon: 25.00; gallons: 12.00; liters per 100 km: 9.41; kilometers per liter: 10.63; fuel cost: $42.00; fuel cost per mile: $0.14.

  1. Miles per gallon = 300.00 miles / 12.00 gallons = 25.00
  2. Liters per 100 km = 235.215 / 25.00 = 9.41; kilometers per liter = 25.00 x 0.425144 = 10.63
  3. Fuel cost = 12.00 gallons x $3.50 = $42.00; cost per mile = $42.00 / 300.00 = 0.140

To pay a driver per mile, use the mileage reimbursement calculator per trip.

What the MPG calculator assumes

  • Gallons are US gallons, not imperial gallons.
  • Miles per gallon from a tank is only as accurate as filling the tank fully both times.
  • The fuel price is the number you type, so it reflects one fill or one station, not a trip total across prices.
  • The calculator does not track odometer readings or store past fills.

MPG calculator questions people ask

How do I get miles per gallon from a tank of fuel?

Fill the tank fully, note the odometer, drive, then fill it fully again and note the gallons added and the new odometer. Divide the miles driven by the gallons used. Filling fully both times is what makes the number match the fuel you actually burned.

How do I find the gallons a trip needs?

Switch to the second mode, enter the trip miles and your miles per gallon, and the calculator divides miles by miles per gallon. The result is the gallons the trip takes at that figure.

What does the fuel price add?

Type a price per gallon and the calculator multiplies it by the gallons to give fuel cost, then divides that cost by the miles to give cost per mile. Leave the price blank and you still get the mpg or gallons result.

Why does it also show liters per 100 km?

The calculator converts the mpg figure with 235.215 divided by mpg for liters per 100 km, and multiplies mpg by 0.425144 for kilometers per liter. Those conversions use US gallons, so they will not match figures built on imperial gallons.

This calculator belongs to the business and pricing calculators. To price the whole job, not just this part, use the job costing calculator and the pricing guide below.

How this site makes money. Affiliate links on this site are marked before you click them, and a commission will never change a price, a test result or a ranking. Details in the affiliate disclosure.