
Gas Mileage Calculator
Calculate MPG, L/100km, km/L, total fuel cost, and cost per mile from one fill-up or trip.
Last reviewed: June 2026Comparison to EPA New-Vehicle Average (27.2 MPG)
-
How the Gas Mileage Calculator Works
The calculator uses your entered distance and fuel used to report fuel economy in three common formats: miles per gallon (MPG), liters per 100 kilometers (L/100km), and kilometers per liter (km/L). In imperial mode, MPG is miles driven divided by gallons used. In metric mode, km/L is kilometers driven divided by liters used, then the calculator converts that result to MPG and L/100km for comparison.
Fuel cost is calculated from the fuel actually used on the trip. For a 300-mile trip that used 12 gallons at $3.50 per gallon, the calculator reports 25.0 MPG, $42.00 total fuel cost, and $0.140 per mile. A common mistake is multiplying miles by the price per gallon; the correct fuel-cost formula is gallons used times price per gallon, or distance divided by MPG times price per gallon.
Interpreting the EPA Comparison
The comparison line uses 27.2 MPG as the model year 2024 new-vehicle real-world fuel economy average reported in EPA Automotive Trends material. Treat it as a benchmark for new light-duty vehicles, not a promise about your specific vehicle. Older vehicles, heavy trucks, aggressive driving, roof racks, underinflated tires, cold weather, and stop-and-go traffic can all reduce real-world MPG.
Formula Reference
| Result | Formula | Better Direction |
|---|---|---|
| MPG | Miles driven / gallons used | Higher |
| L/100km | (Liters used / kilometers driven) x 100 | Lower |
| km/L | Kilometers driven / liters used | Higher |
| Total fuel cost | Fuel used x fuel price | Lower |
| Cost per mile or km | Total fuel cost / distance | Lower |
Ways to Get a Cleaner Measurement
For a practical fill-up test, reset the trip odometer after filling the tank, drive normally, then fill the tank again and enter the miles and gallons from the receipt. Use the same units for both distance and fuel, and repeat the test across several tanks if you want a less noisy average. Dashboard estimates are convenient, but a receipt-based calculation is easier to audit.