This mileage calculator works out your fuel economy in miles per gallon (MPG) or liters per 100 km, plus your total fuel cost for a trip. You enter the distance driven, fuel used, and optionally the fuel price, and you get back your average consumption and trip cost. No account or special tools are needed—just the numbers from your odometer and fuel receipts.
Formula
The core formula is simple: MPG = distance ÷ fuel used. In symbols:
MPG = D / F
- D = distance traveled, in miles (mi)
- F = fuel consumed, in gallons (US gal)
- MPG = miles per gallon (US)
To convert to liters per 100 km (L/100km), use the constant 235.215:
L/100km = 235.215 ÷ MPG
For total trip cost: Cost = D × price per gallon ÷ F (which is just MPG × price).
Worked Example
Using the default values from the calculator: D = 300 miles, F = 12 gallons, price = $3.50/gallon.
Step 1: Divide distance by fuel: 300 ÷ 12 = 25.0 MPG.
Step 2: Convert to L/100km: 235.215 ÷ 25 = 9.41 L/100km.
Step 3: Trip cost: 300 × 3.50 ÷ 12 = 1050 ÷ 12 = $87.50.
The calculator shows 25.00 MPG, $87.50 cost, and 9.41 L/100km.
When to Use This
Use this calculator when you want to check your car’s real-world fuel economy, compare vehicles, or estimate the fuel cost of a planned road trip. Fill your tank completely, note the odometer reading, drive normally, then fill up again and note the gallons pumped and the new odometer reading. The distance is the difference between the two odometer readings.
The result tells you how many miles you can expect per gallon under your typical driving conditions. A higher MPG means better fuel economy. For L/100km, lower is better. The cost figure helps you budget for future trips.
Note that this calculator uses US gallons. If you measure in imperial gallons (UK), the conversion differs: 1 imperial gallon = 1.20095 US gallons. For imperial, multiply the US MPG by 1.20095 to get imperial MPG.
Common Mistakes
- Mixing units: Using kilometers with gallons, or miles with liters, gives wrong results. Convert everything to miles and gallons (or km and liters) first.
- Not filling the tank fully: If you don’t fill up completely at the start and end, the fuel used figure is inaccurate.
- Using the trip odometer incorrectly: Reset the trip odometer at the first fill-up, or subtract the starting odometer reading from the ending one.
- Forgetting the fuel price is per gallon: If you enter a price per liter, the cost will be wrong. Convert price per liter to per gallon by multiplying by 3.78541.
- Rounding too early: Round only the final result, not intermediate steps, to keep accuracy.
Tips
- For the most accurate MPG, track over several fill-ups and average the results. One tank can be skewed by idling, traffic, or a short trip.
- Check your owner’s manual for your car’s fuel tank capacity to verify the fuel pump reading is reasonable.
- Use the same gas station and pump if possible, as pump shutoff points can vary slightly.
- If you drive mostly highway, your MPG will be higher than city driving. Label your results accordingly.
- For metric users, enter distance in kilometers and fuel in liters, then use the L/100km result directly. The calculator’s MPG output will not be meaningful in that case—use the L/100km output.
Troubleshooting
Result seems too high or too low. Double-check your fuel units. If you entered liters instead of gallons, divide the fuel amount by 3.78541 to get gallons. If you entered kilometers instead of miles, divide distance by 1.60934 to get miles.
Cost is not what you expected. Verify the fuel price is per gallon, not per liter. Also confirm the distance and fuel used match the same trip.
Calculator shows “Cannot compute”. This happens if fuel used is zero or negative. Enter a positive number for fuel.
MPG varies wildly between fill-ups. This is normal. Short trips, traffic, and weather affect consumption. Take a longer-term average over 3–5 tanks.
You don’t know your fuel tank capacity. Check the owner’s manual or look up the vehicle specs online. But for this calculator, you only need the fuel actually used, which is what the pump shows.
Frequently Asked Questions
Q: What is the difference between US and imperial gallons?
A: A US gallon is 3.785 liters, while an imperial gallon is 4.546 liters. So 1 US MPG equals about 1.20095 imperial MPG. This calculator uses US gallons.
Q: How do I convert MPG to L/100km?
A: Divide 235.215 by the MPG value. For example, 30 MPG = 235.215 ÷ 30 = 7.84 L/100km.
Q: Can I use this for electric vehicles?
A: No, this calculator is for fuel-powered vehicles. Electric vehicles use kWh per 100 km or miles per kWh instead.
Q: Should I use the trip odometer or the regular odometer?
A: Use the trip odometer and reset it at the first fill-up. If you don’t have a trip odometer, subtract the starting odometer reading from the ending one.
Q: Why is my MPG lower than the sticker on the car?
A: The sticker is from controlled tests. Real-world driving includes traffic, hills, air conditioning, and driving style, which all lower MPG.
Q: How many tanks should I track for a good average?
A: At least three full tanks, but five is better. This evens out variations from driving conditions and fill-up differences.
Related
Formula used
in d | Distance | miles | 300 | 0 | 100000 in f | Fuel used | gallons | 12 | 0 | 1000 in p | Fuel price | per gallon | 3.50 | 0 | 20 out mpg | Fuel economy | MPG | d / f | 2 out cost | Trip fuel cost | $ | d * p / f | 2 out l100 | Fuel economy | L/100km | 235.215 / (d / f) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Measuring Light Speed & Wavelength: How It Works
- Draco Race Blox Fruits: How to Get It
- ES File Explorer Tips & Tricks That Actually Work
- Remove Google FRP Lock on Oppo: Step-by-Step
- Forza Horizon 6: Unlock Legend Island & Earn Horizon Legend
- Clean Hair Dryer Filter: Improve Airflow