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 2026
$
Miles Per Gallon (MPG)
-
-
L/100km
-
km/L
-
Cost Per Mile
-
Total Fuel Cost
-

Comparison to EPA New-Vehicle Average (27.2 MPG)

0 MPG 27.2 avg 54+ MPG

-

Fuel-cost note: This calculator estimates fuel economy and fuel cost from the distance, fuel used, and price you enter. It does not include maintenance, tires, tolls, parking, insurance, registration, financing, or depreciation.

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

Gas mileage formulas used by this calculator
ResultFormulaBetter Direction
MPGMiles driven / gallons usedHigher
L/100km(Liters used / kilometers driven) x 100Lower
km/LKilometers driven / liters usedHigher
Total fuel costFuel used x fuel priceLower
Cost per mile or kmTotal fuel cost / distanceLower

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.

Sources

Frequently Asked Questions

Divide miles driven by gallons used. For example, 300 miles divided by 12 gallons is 25.0 MPG.
L/100km is liters of fuel used to travel 100 kilometers. Lower L/100km means better fuel economy.
EPA labels are based on controlled tests for comparison. Your own mileage depends on speed, traffic, terrain, weather, tire pressure, cargo, maintenance, and driving style.
It includes fuel only. It does not include maintenance, tires, tolls, parking, insurance, registration, financing, or depreciation.