MPG Calculator — Miles per Gallon and Gas Cost

MPG Calculator

An MPG calculator answers two questions every driver asks: how far does my car go on a gallon, and what will this trip cost in gas. The MPG calculator above handles both jobs. Switch to Trip Cost to plan a drive with your distance, your MPG, and the local gas price, or switch to My MPG to measure your car’s real fuel economy from a fill-up. It also works out your monthly commute cost, compares gas with electric driving, and estimates the CO2 your trip puts out.

MPG stands for miles per gallon, and it is the standard fuel-economy figure in the United States. A car rated at 28 MPG travels 28 miles on one US gallon of gasoline. The higher the number, the less fuel the trip needs and the less it costs. This page explains the formula, works through the calculator’s own default trip of 300 miles at 28 MPG, and shows how to read every figure it reports, so you can check the result against your own fill-ups.

Vehicle presets:

Daily Commute Cost

Gas vs Electric Comparison

Compared over the trip distance above, using the trip MPG and gas price.

How Miles per Gallon Works

MPG is a simple ratio: miles driven divided by gallons used. If you drive 350 miles and the next fill-up takes 14 gallons, your car did 350 divided by 14, which is 25.0 MPG. The same ratio works the other way round for planning: a 300-mile trip in a car that does 28 MPG needs 300 divided by 28, which is 10.71 gallons. Multiply those gallons by the gas price and you have the trip cost. At 4.15 dollars a gallon, 10.71 gallons costs 44.46 dollars, and the cost per mile is 4.15 divided by 28, which is 15 cents a mile.

The calculator’s default trip shows all of this at once. With 300 miles, 28 MPG, and 4.15 dollars a gallon, it reports 10.71 gallons needed, 40.56 litres, a total fuel cost of 44.46 dollars, 15 cents a mile, and 14.82 dollars per 100 miles. Tick the round-trip box and the same trip there and back costs 88.93 dollars. Split the cost four ways and each person pays 11.12 dollars. The trip also puts out 95.2 kilograms of CO2, because each gallon of gasoline produces about 8.887 kilograms of CO2 when it is burned.

One fill-up gives a noisy MPG figure, because the pump clicks off at slightly different levels and a short trip is easy to misread. The honest way to measure your car is the tank-fill method over several fill-ups: fill the tank, reset the trip meter, drive normally, fill up again, and divide the miles by the gallons added. Averaged over three or four fill-ups, the number settles down and tells you what your car really does in your driving. The US Environmental Protection Agency publishes official ratings for every car sold in the country at fueleconomy.gov, and comparing your measured MPG with the official rating shows whether your driving or your car is the difference.

Step 1 — Measure Your MPG From a Fill-Up

Fill the tank until the pump clicks off, write down the odometer reading or reset the trip meter, then drive as usual. At the next fill-up, note the miles driven and the gallons the pump added. Divide miles by gallons. For the calculator’s default of 350 miles and 14 gallons, that is 350 divided by 14, which is 25.0 MPG. The calculator also converts it to 10.63 kilometres per litre and 9.41 litres per 100 kilometres, the figures used outside the United States.

Step 2 — Turn MPG Into a Trip Cost

Take the trip distance and divide it by your MPG to get the gallons needed, then multiply by the gas price. A 300-mile trip at 28 MPG needs 10.71 gallons, and at 4.15 dollars a gallon that is 44.46 dollars. The cost per mile is the gas price divided by MPG, so 4.15 divided by 28 is 15 cents a mile. Once you know the cost per mile, any trip is one multiplication away: 100 miles costs 15 dollars, 500 miles costs 75 dollars, and a 1,000-mile road trip costs about 150 dollars in fuel.

Step 3 — Add Commute, Splitting, and the EV Comparison

For a regular commute, the calculator multiplies the one-way miles by two, by the working days, and by the cost per mile. A 25-mile one-way commute, 22 working days a month, at 25 MPG and 3.50 dollars a gallon costs 7.00 dollars a day, 154.00 dollars a month, and 1,848.00 dollars a year in fuel alone. The EV comparison runs the same 300-mile trip on electricity: at 3.5 miles per kilowatt-hour and 17 cents per kilowatt-hour it uses 85.71 kilowatt-hours and costs 14.57 dollars, saving 29.89 dollars against the 44.46-dollar gas trip.

Worked Examples: MPG and Trip Cost

Each row below is worked through the calculator with the inputs shown, so you can check every figure.

TripInputsGallonsFuel costCost per mile
300-mile trip28 MPG, $4.15/gal10.71 gal$44.46$0.15
100-mile trip25 MPG, $3.50/gal4.00 gal$14.00$0.14
340-mile trip28.5 MPG, $3.55/gal11.93 gal$42.35$0.12
Monthly commute25 mi one-way, 22 days, 25 MPG, $3.50/gal44.00 gal$154.00$0.14
300-mile EV trip3.5 mi/kWh, $0.17/kWh—$14.57$0.05

The 340-mile row is a good check of the arithmetic: 340 divided by 28.5 is 11.93 gallons, and 11.93 times 3.55 is 42.35 dollars. The commute row uses 44.00 gallons a month, which is 25 miles times 2 times 22 days divided by 25 MPG, and 44.00 times 3.50 is 154.00 dollars. Try your own numbers in the MPG calculator and compare the cost per mile: it is the single figure that lets you compare any two cars or any two trips at a glance.

How to Use the MPG Calculator

Pick the mode first, then enter the numbers. The result updates as you type, and every mode keeps its own defaults so you can switch back and forth without losing your inputs.

  1. Choose Trip Cost or My MPG. Trip Cost plans a drive; My MPG measures your car from a fill-up. The buttons at the top switch between them.
  2. Enter the trip distance and your MPG. The default is 300 miles at 28 MPG, which gives 10.71 gallons and a 44.46-dollar trip at 4.15 dollars a gallon.
  3. Enter the local gas price. The default is 4.15 dollars a gallon. Gas prices vary by state and by week, so use the price at your station, not a national average.
  4. Tick round trip or add passengers. Round trip doubles the distance and the cost to 88.93 dollars for the default trip. Splitting four ways makes it 11.12 dollars each.
  5. Check the commute and EV sections. Scroll down for the monthly commute cost and the gas-versus-electric comparison for the same trip.

What the Calculator Reports

The result panel explains every figure, so nothing is a mystery number. This table covers the trip-cost mode.

FigureWhat it isDefault value
Gallons neededTrip miles divided by MPG10.71 gal
Litres neededGallons times 3.7854140.56 L
Total fuel costGallons times gas price$44.46
Cost per mileGas price divided by MPG$0.15
Cost per 100 milesCost per mile times 100$14.82
Round-trip costTotal cost doubled$88.93
CO2 emittedGallons times 8.887 kg95.2 kg

Common Mistakes When Calculating MPG

MPG arithmetic is simple, which is why these errors survive unnoticed. Check yours against the list.

  • Using one fill-up as the truth. A single fill-up can be off by a gallon or more because pumps click off differently. Average three or four fill-ups before judging your car.
  • Mixing up US and imperial gallons. An imperial gallon is about 20 percent larger than a US gallon, so an MPG figure in imperial gallons looks better than the same car in US gallons. This calculator uses US gallons throughout.
  • Using the national gas price. The US average was 4.15 dollars a gallon in early November 2026, but California was near 5.75 dollars and the East Coast near 3.94 dollars. Use your local price.
  • Forgetting the round trip. A 300-mile trip is 600 miles of driving if you come home. Tick the round-trip box or the cost is half of what you will actually pay.
  • Treating fuel cost as the whole cost. The cost per mile here is fuel only. Insurance, tires, maintenance, depreciation, and tolls are real costs that this figure does not include.

Where You Will Use an MPG Calculation

MPG turns up anywhere a car and money meet. These are the everyday uses.

  • Road trip budgeting. Work out the fuel cost before you leave, split it fairly between passengers, and know how many fuel stops the trip needs.
  • Comparing cars before you buy. A car that does 35 MPG instead of 25 MPG saves about 40 percent on fuel for the same miles, which adds up to hundreds of dollars a year.
  • Commute costs. A 25-mile one-way commute at 25 MPG and 3.50 dollars a gallon costs 154.00 dollars a month in fuel, which is worth knowing before accepting a job farther from home.
  • Checking your car’s health. If your measured MPG drops sharply without a change in driving, it can point to low tire pressure, a dirty air filter, or a needed service.
  • Business mileage. The IRS standard mileage rate covers all driving costs, not just fuel, so keep the fuel figure separate from the reimbursement figure.

Tips for Accurate MPG Results

MPG is exact arithmetic, so accuracy is mostly about measuring the inputs honestly and reading the right figure.

  1. Fill up the same way every time. Let the pump click off once and stop. Topping up after the click adds fuel the next measurement cannot account for.
  2. Use the trip meter, not memory. Reset the trip meter at each fill-up so the miles are exact instead of guessed from the odometer.
  3. Average several tanks. City driving, highway driving, and cold weather all move MPG around. Three or four tanks give a fair average.
  4. Check tire pressure monthly. Under-inflated tires can cut MPG by a few percent, and they are the easiest fix in the list.
  5. Compare like with like. A highway MPG and a city MPG are different numbers. Note which kind of driving your measurement covers.

MPG Quick Answers

These are the figures people look up most often, each one verified against the calculator above.

QuestionAnswer
What is 28 MPG on a 300-mile trip?10.71 gallons, $44.46 at $4.15/gal
What is a good MPG for a sedan?28–32 MPG is typical for a modern sedan
How much does a 25-mile commute cost a month?$154.00 at 25 MPG, $3.50/gal, 22 days
How much does an EV save on 300 miles?$29.89 versus gas ($14.57 vs $44.46)
How many litres is 10.71 gallons?40.56 litres (1 US gallon = 3.78541 L)

Related tools on this site: the main MPG calculator, the length converter for miles and kilometres, the time calculator for driving time, and the compound interest calculator to see what years of fuel savings are worth.

Frequently Asked Questions

How do I calculate MPG?

Divide the miles driven by the gallons used at the fill-up. Driving 350 miles on 14 gallons is 350 divided by 14, which is 25.0 MPG. The calculator above does the same division and also converts it to kilometres per litre and litres per 100 kilometres.

How much gas will a 300-mile trip use?

It depends on your MPG. At 28 MPG a 300-mile trip uses 10.71 gallons, and at 4.15 dollars a gallon it costs 44.46 dollars. At 25 MPG the same trip uses 12.00 gallons and costs 49.80 dollars at the same price.

What is a good MPG?

For a modern sedan, 28–32 MPG is typical. Hybrids do 40–50 MPG, SUVs and crossovers do 22–28 MPG, and pickup trucks do 17–22 MPG. The EPA rating for your exact car is listed at fueleconomy.gov.

How do I calculate the cost of a road trip?

Divide the trip miles by your MPG to get the gallons, then multiply by the gas price. A 340-mile trip at 28.5 MPG and 3.55 dollars a gallon uses 11.93 gallons and costs 42.35 dollars. Tick the round-trip box in the calculator to double it for the drive home.

Does the calculator use US or imperial gallons?

US gallons throughout. One US gallon is 3.78541 litres. An imperial gallon is larger, so an MPG figure measured in imperial gallons would look about 20 percent higher for the same car.

Disclaimer: This calculator is for general information only. Gas prices change daily and vary by location, and your real fuel economy depends on your car, driving style, and road conditions. Use the figures as estimates for planning, not as exact costs.