Fuel cost and MPG calculator
Enter a trip distance, your car's miles per gallon and the price of fuel to see how many gallons the trip needs, what it costs and the cost per mile.
US gallons and miles. Real fuel economy varies with speed, load, weather and driving style.
How this calculator works
Fuel cost is distance divided by fuel economy, multiplied by the price per gallon. MPG (miles per gallon) is the US convention; most other countries quote L/100 km, which is a consumption figure rather than a distance figure — lower is better, and the two are reciprocal, not linear. The conversion is L/100 km = 235.215 ÷ MPG. That is why a jump from 20 to 25 mpg saves more fuel than a jump from 40 to 45 mpg.
Real-world fuel economy is usually worse than the sticker: cold starts, air conditioning, roof racks, heavy loads and city traffic all raise consumption. EPA figures are tested in a laboratory. For a trip estimate, use your own measured MPG from the last few tanks — miles driven divided by gallons pumped. The calculator also gives cost per mile, the number to compare against public transport or a rental car, and the L/100 km equivalent for international readers.
The formula
gallons = distance / mpg
fuel cost = gallons × price per gallon
cost/mile = fuel cost / distance
L/100 km = 235.214583 / mpgTo go the other way, US MPG = 235.214583 ÷ L/100 km. The constant comes from (100 km × 3.785411784 L/gal ÷ 1.609344 km/mi).
Worked example
A 300-mile trip at 30 mpg uses 10.0 gallons of fuel. At 3.50 per gallon the trip costs $35.00, or $0.12 per mile. That fuel economy is 7.8 L/100 km.
Common mistakes
- Using the sticker MPG. Real-world economy is often 10–20% lower than the lab figure, especially in winter or city driving.
- Comparing MPG linearly. Going from 15 to 20 mpg saves 5 gallons per 300 miles; going from 30 to 35 saves just 1.4 gallons.
- Forgetting return trips and tolls. Enter the full round-trip distance, and treat tolls, parking and wear separately.
Frequently asked questions
How do I calculate MPG?
Fill the tank, note the odometer, drive, then refill and divide the miles driven by the gallons added at the second fill. Repeat over several tanks for a reliable figure.
What is 30 mpg in L/100 km?
30 mpg is about 7.84 L/100 km, using 235.215 ÷ 30. A 7 L/100 km car is about 33.6 mpg.
How much does a 300-mile trip cost in fuel?
It depends on the car and fuel price. At 30 mpg and $3.50 a gallon it is 10 gallons and $35, assuming steady highway driving.
Related calculators
Electricity Cost CalculatorSpeed ConverterVolume ConverterLength Converter · All Conversions calculators