MPG Calculator

Miles per gallon equals distance divided by gallons used: MPG = Miles / Gallons. A 300-mile trip using 10 gallons yields 30 MPG. Enter the distance driven and fuel consumed to calculate your vehicle's fuel efficiency, plus optional cost-per-mile when you include the price of gas.

Quick Answer

Driving 300 miles on 10 gallons of gas gives 30 MPG. At $3.50 per gallon, that trip costs $35 total, or about $0.12 per mile.

Common Examples

Input Result
300 miles, 10 gallons 30.00 MPG, 3.33 gal/100mi
250 miles, 12.5 gallons 20.00 MPG, 5.00 gal/100mi
400 miles, 8 gallons 50.00 MPG, 2.00 gal/100mi
150 miles, 6 gallons, $3.50/gal 25.00 MPG, $0.14/mile, $21.00 total

How It Works

The formula

MPG = Distance / Gallons Used

Where:

  • Distance = total miles driven between fill-ups (or for a full tank)
  • Gallons Used = fuel consumed over that distance

To calculate cost per mile when you know the gas price:

Cost per Mile = (Gallons Used x Price per Gallon) / Distance

Gallons per 100 Miles = (Gallons Used / Distance) x 100

Gallons per 100 miles is the inverse of MPG and is used by the EPA alongside MPG on new vehicle window stickers. It gives a more linear sense of fuel savings: going from 10 to 20 MPG saves 5 gallons per 100 miles, while going from 20 to 30 MPG saves only 1.67 gallons per 100 miles. This is why improving a low-MPG vehicle’s efficiency has a bigger absolute impact on fuel use.

How to measure your MPG

Fill the tank completely, reset your trip odometer (or note the mileage), then drive normally until you need fuel again. Fill the tank completely a second time and note how many gallons it took. Divide the trip miles by the gallons to get your real-world MPG. Repeat over 2-3 tanks for a more reliable average, since driving conditions (highway vs. city, weather, load) affect fuel economy significantly.

EPA ratings vs. real-world MPG

EPA fuel economy estimates use standardized test cycles on a dynamometer. Real-world driving typically yields 10-20% lower MPG than the EPA combined rating because of factors like aggressive acceleration, highway speeds above 60 mph, cold weather, air conditioning, and carrying extra weight. The EPA city rating is usually the more realistic benchmark for mixed driving.

Worked example

For a 300-mile trip using 10 gallons at $3.50 per gallon: MPG = 300 / 10 = 30. Gallons per 100 miles = (10 / 300) x 100 = 3.33. Total cost = 10 x $3.50 = $35. Cost per mile = $35 / 300 = $0.117, or about 12 cents per mile.

Related Calculators

Frequently Asked Questions

How do I calculate my car's MPG?
Fill your tank, note the odometer reading, drive until you need gas again, then fill up and note how many gallons it took. Divide the miles driven by the gallons used. For example, 350 miles on 12 gallons = 29.2 MPG.
What is a good MPG?
For conventional gasoline cars in 2024, the average new vehicle gets about 26 MPG combined. Compact cars typically get 30-40 MPG, midsize sedans 25-35 MPG, SUVs 20-30 MPG, and trucks 15-25 MPG. Hybrids can reach 40-60 MPG.
Why is my actual MPG lower than the EPA rating?
EPA tests use standardized conditions. Real-world factors that reduce MPG include aggressive acceleration and braking, highway speeds above 60 mph, cold weather, short trips where the engine does not fully warm up, heavy cargo, roof racks, low tire pressure, and running the air conditioning.
What is the difference between MPG and gallons per 100 miles?
They measure the same thing inversely. MPG tells you how far you go on one gallon, while gallons per 100 miles tells you how much fuel a fixed distance requires. Gallons per 100 miles is better for comparing fuel savings because the relationship is linear.
Does highway or city driving use more gas?
City driving typically uses more fuel per mile due to frequent stops, starts, and idling. Highway driving is more fuel-efficient up to about 50-60 mph, after which aerodynamic drag increases rapidly and efficiency drops. Most vehicles get their best MPG at 45-55 mph.

Learn More