Quick Answer: 300 miles on 10 US gallons is 30 mpg, the same as 7.84 litres per hundred kilometres. Divide the miles you drove by the gallons it took to fill the tank back up.
What does this calculator do?
This miles per gallon calculator works out the fuel economy you actually got from a tank of fuel. You give it the distance you drove and the fuel it took to refill, in miles or kilometres and in US gallons or litres, and it returns miles per gallon.
It also gives the three other ways the same figure is quoted: litres per 100 kilometres, kilometres per litre and gallons per 100 miles. Add the price you paid per gallon and it also shows what the fuel for that distance cost, per mile and per 100 kilometres.
The figure it produces is your real-world mpg, measured over your own driving. That is usually different from the number on the window sticker, which comes from standard laboratory test cycles. Measuring it yourself is the only way to know what your car does on your roads, at your speeds, with your load.
The conversions between units use exact definitions. The US gallon is 231 cubic inches, which is exactly 3.785411784 litres, and the international mile is exactly 1.609344 kilometres. Gallons here are always US gallons. The UK gallon is a larger unit and is not offered, so a British mpg figure will not match these results.
How to Use the Miles per Gallon Calculator
The fill-up method gives the most reliable answer:
- Fill the tank until the pump clicks off, and reset the trip odometer (or note the main odometer reading).
- Drive normally until you need fuel again.
- Fill the tank again, stopping at the first click as before. Note the gallons or litres the pump shows and the distance on the trip odometer.
- Enter the distance and the fuel, choose the units, and read the result.
The fuel you add at the second fill-up is the fuel the car used to cover that distance, because the tank started and ended at the same level. That is why both fill-ups need to go to the same point. FuelEconomy.gov's own tracking tool says the same: it needs two consecutive fill-ups where the tank was filled completely, or the estimate will not be accurate.
The presets load three cases: a typical fill-up of 356.2 miles on 13.5 gallons, a metric fill-up of 500 km on 40 litres, and a pickup towing a trailer that covered 240 miles on 16 gallons.
How is this calculated?
- Convert the distance. The distance is converted to both miles and kilometres using the exact mile of 1.609344 km.
- Convert the fuel. The fuel is converted to both US gallons and litres using the exact US gallon of 3.785411784 litres.
- Divide for economy. Miles per gallon is distance over fuel, and kilometres per litre is the same ratio in metric units.
mpg = miles/gallons; km/L = kilometres/litres
- Invert for consumption. Litres per 100 km and gallons per 100 miles turn the ratio upside down: fuel per distance instead of distance per fuel.
L/100 km = litres/kilometres × 100; gal/100 mi = gallons/miles × 100
- Price the fuel. The trip's fuel cost is the gallons used times the price per gallon. Dividing by the miles gives the cost per mile, and dividing by the kilometres and multiplying by 100 gives the cost per 100 km. When you enter litres, they are converted to gallons before the price is applied.
trip cost = gallons × price per gallon
- Round for display. The arithmetic runs at 34 significant digits. Economy figures are rounded to two decimal places, the trip cost and cost per 100 km to the cent, and the cost per mile to a tenth of a cent.
Worked Example
With the default inputs, 300 miles on 10 US gallons:
- Miles per gallon: 300 ÷ 10 = 30 mpg.
- In metric terms the same trip used 7.84 L/100 km, or covered 12.75 km per litre.
- Gallons per 100 miles: 10 ÷ 300 × 100 = 3.33.
- At the default price of $3.097 a gallon, the 10 gallons cost $30.97, which is 10.3 cents a mile or $6.41 per 100 km.
A real fill-up rarely lands on round numbers. Driving 356.2 miles and then putting in 13.5 gallons gives 356.2 ÷ 13.5 = 26.39 mpg, or 8.91 L/100 km. The fuel cost $41.81 at the default price, 11.7 cents a mile.
Starting from metric figures, 500 km on 40 litres is 500 ÷ 40 = 12.5 km per litre, or exactly 8 L/100 km. In US terms that is 29.4 mpg, since 500 km is 310.69 miles and 40 litres is 10.567 gallons.
How Do You Convert MPG to Litres per 100 km?
Because one figure is distance per fuel and the other is fuel per distance, you do not multiply by a factor. You divide a constant by the figure. The constant is 100 times the litres in a gallon, divided by the kilometres in a mile, which comes to about 235.21.
So 30 mpg is 7.84 L/100 km, and 7.84 L/100 km is 30 mpg. The same division works in both directions. The table below the calculator lists common values from 10 to 60 mpg.
Why Gallons per 100 Miles Tells You More
Miles per gallon hides how much fuel an improvement actually saves. The EPA calls this the "MPG illusion": the label now shows a consumption figure alongside mpg because equal mpg gains do not save equal amounts of fuel.
The reference table shows it directly. Going from 15 to 20 mpg cuts fuel use from 6.67 to 5 gallons per 100 miles. Going from 40 to 45 mpg cuts it from 2.5 to 2.22 gallons per 100 miles. Both are a 5 mpg gain, but the first saves far more fuel. When you compare two vehicles, compare the gallons per 100 miles or the litres per 100 km, not the mpg.
What does this calculator not account for?
- UK gallons. Only the US gallon is used. The imperial gallon is a larger unit, so UK mpg figures are higher for the same car and cannot be compared with these.
- Partial fill-ups. If either fill-up stops short of full, the fuel figure is wrong and so is the result. The calculator cannot tell; it divides what you enter.
- Missed fill-ups. If you added fuel somewhere in between and did not count it, the distance covers more fuel than you entered and the mpg comes out too high.
- Odometer error. Odometers and trip meters are not perfectly calibrated, and tyre size changes the reading. Any error passes straight into the result.
- Electric and plug-in vehicles. Energy measured in kilowatt hours is not converted to an mpg equivalent (MPGe). Enter litres or gallons of liquid fuel only.
- Running costs beyond fuel. The cost figures cover fuel only: no oil, tyres, maintenance, insurance or depreciation.
- Price changes during the tank. One price per gallon is applied to all the fuel.
What mistakes do people make with this?
- Trusting a single tank. One tank can be off by several percent because pumps click off at slightly different levels. Average several fill-ups, adding up the miles and the gallons separately, then divide the totals.
- Averaging mpg figures. The average of 20 mpg on one tank and 40 mpg on another is not 30 mpg if the tanks covered different distances. Divide total miles by total gallons instead.
- Using the dashboard estimate. The trip computer's mpg reading is an estimate from fuel injector timing, and it is often optimistic. The fill-up method measures the fuel that went in.
- Comparing with the window sticker. The EPA rating is a standardised test figure meant for comparing vehicles. Your result reflects your own driving and conditions, and will differ.
- Mixing up a lower and a better number. For mpg and km per litre, higher is better. For L/100 km and gallons per 100 miles, lower is better.
Frequently Asked Questions
How do I calculate miles per gallon by hand?
What mileage am I really getting if my trip computer says something different?
What is 30 mpg in litres per 100 km?
How much does it cost per mile to drive my car?
Does towing or a roof box change my mpg?
Can I use this for a car that runs on diesel?
Why does my mpg vary between tanks?
Sources
- FuelEconomy.gov, My MPG help: calculating mpg from two consecutive full fill-ups. fueleconomy.gov/mpg/help.shtml
- FuelEconomy.gov (US EPA and DOE), Learn More About the Fuel Economy Label: the fuel consumption rate and the MPG illusion. fueleconomy.gov/feg/label/learn-more-gasoline-label.shtml
- NIST Handbook 44, Appendix C, General Tables of Units of Measurement: the US gallon of 231 cubic inches and the international mile. nist.gov/pml/owm/nist-handbook-44-current-edition
- US Energy Information Administration, Gasoline Prices, US Regular All Formulations Retail Price, annual: the 2025 average of $3.097 a gallon. eia.gov/dnav/pet/hist/LeafHandler.ashx

