Free to use No registration 100% private Instant results Metric & Imperial

Gas Mileage Calculator

Track your real fuel efficiency the way the EPA measures it: miles driven ÷ gallons used. Enter a tankful's worth of data and get MPG, the metric equivalent (L/100 km), your cost per mile, and an annual fuel bill projection at your local pump price.

Your Tank Data

How MPG Is Calculated

The formula is simple — and the two fill-ups make it accurate:

MPG = miles driven ÷ gallons to refill
L/100km = 235.215 ÷ MPG
Cost/mile = (price × gallons) ÷ miles

Fill the tank, zero the trip odometer, drive normally, and refill. The second fill's gallons — not the pump's estimate — are what the odometer distance actually consumed. The 235.215 constant converts US gallons and miles into the metric liters-per-100-km standard used across Canada, Europe, and much of the world.

Typical Fuel Costs by Vehicle Type

VehicleCost / Mile @$3.80L/100km12,000 mi / year

At $3.80/gal. Real-world MPG varies with driving style, load, weather, and maintenance — EPA numbers are optimistic by roughly 10-15%.

How to Use This Calculator (3 Steps)

1
Fill up and zero the trip meter
Start at a full tank and reset the trip odometer. Drive your normal mix of city and highway miles.
2
Fill again and enter both numbers
At the next fill-up, enter the trip distance and the gallons on the pump receipt. Repeat over several tanks to average out variance.
3
Add your pump price for cost math
Include today's price to see cost per mile and an annual fuel bill. Compare against a hybrid or EV scenario before your next purchase.

Case Study

Case Study #1

Is Your Truck Fuel-Logging Accurate?

A driver logs 2,100 miles over a month using 84 gallons at an average price of $3.80/gal, and wants true MPG and annual fuel cost.

Miles per Gallon
25.0 MPG
Cost per Mile
$0.152
L/100 km
9.4 L
Yearly Fuel (12k mi)
$1,824

Frequently Asked Questions

How do I calculate my gas mileage (MPG)?

Miles driven ÷ gallons to refill. Reset the trip odometer at each fill-up for accuracy.

How much does it cost to drive per mile?

Fuel price ÷ MPG. At $3.80/gal and 25 MPG that's $0.152 per mile.

What's the formula for liters per 100 km?

235.215 ÷ MPG. 25 MPG = 9.4 L/100km.

What is good MPG?

Sedans and hybrids 30-45 MPG highway; trucks/SUVs 20-25 MPG is typical.

How can I improve gas mileage?

Proper tire pressure, smooth driving (15-30% gain), steady highway speed, remove roof racks, keep up maintenance.

B
BuildFormulas Automotive Team
Fuel & Driving Cost Analytics

The BuildFormulas Automotive Team builds fuel economy, cost-of-driving, and EV comparison tools based on EPA-rated and real-world driving data.

Reviewed by BuildFormulas Editorial Review Board, Editorial Review
Last updated: August 2026