How much will gas cost for my trip, or a year, at my real mpg?

Trip cost, a year of gas, or your real mpg from your receipts. Free, no sign-up, nothing leaves your browser.

Trip cost

Yearly cost

Your mpg

How you count the miles
Gallons pumped after the first full tank

Every receipt after that first fill, top-ups included, up to the last full tank.

Gas for this trip

Example: 287 miles each way, round trip, at 31 mpg and $4.399 a gallon comes to $81.47.

$81.47

574 miles round trip (287 each way) at 31.0 mpg and $4.399 a gallon

18.52 gallons

14.2 cents a mile

At 31.0 mpg your car burns 3.23 gallons every 100 miles.

Miles / mpg = gallons. Gallons x price = cost.

Miles a year / mpg x price = cost a year. A month is the year / 12, a week the year / 52.

Miles driven / gallons pumped = mpg.

How the fuel cost calculator works

You're about to drive somewhere, and before you go you want one number for the gas. The math is short. Miles divided by mpg gives gallons, and gallons times the pump price gives the cost. The trouble is everything around it: the drive home nobody counts, a sticker mpg your car never sees, and the extra cent when four people split the bill.

  1. Miles.

    Type the miles to get there. Pick Round trip and they're doubled, because the drive back burns gas too.

  2. Your mpg.

    Use what your car really gets. The Your mpg tab works it out from two full tanks and the receipts in between, and one tap carries it over.

  3. The pump price.

    Type it the way the sign shows it, to the tenth of a cent: $4.399, not $4.40. We never fill in a price. Prices move every week and differ from state to state, so any number we picked would be wrong for most drivers within days.

  4. Gallons.

    Miles divided by mpg, rounded to two decimal places.

  5. Cost, rounded once.

    Gallons times price, rounded to the cent once, at the end. That's why 287 miles each way at 31 mpg and $4.399 comes to $81.47 for the round trip. Round the one-way $40.73 first and double it, and you'd say $81.46.

  6. The split.

    The total the calculator shows, divided by everyone in the car. Four people pay $20.37 each. That adds up to $81.48, and the calculator tells you someone can pay a cent less.

Yearly cost is the same math, run over a whole year. Type what you drive in a week, a month or a year. A year counts as 52 weeks or 12 months, and the month and the week come from the year the calculator shows. At 10,000 miles, 19 mpg and $3.499, the year is $1,841.59, and the month is that divided by 12: $153.47.

It's arithmetic on your numbers, not a forecast. Speed, load, weather and the A/C all change what you'll really burn.

Why every mpg comes with gallons per 100 miles

EPA prints a consumption figure on the window sticker because mpg "can be potentially misleading" when you compare improvements. The calculator puts gallons per 100 miles beside every mpg for the same reason. Going from 10 to 15 mpg saves about 33 gallons every 1,000 miles. Going from 30 to 35 saves about 5. Same five mpg, a seventh of the savings.

10 mpg: 100.00 gallons

Saves 33.33 gallons

15 mpg: 66.67 gallons

30 mpg: 33.33 gallons

Saves 4.76 gallons

35 mpg: 28.57 gallons

Gallons per 1,000 miles. EPA's example, our arithmetic.

How to calculate mpg from your fill-ups

The number on the window sticker comes from a lab. Yours comes from the pump, and it takes two full tanks. EPA's method has four steps, and we've written in the part people trip over: the top-up in the middle.

  1. Fill the tank until the pump clicks off. Write down the odometer, or reset the trip meter.
  2. Drive the way you normally do. If you top up along the way, keep the receipt.
  3. Fill until it clicks off again. Write down the odometer and the gallons.
  4. Divide the miles by every gallon pumped after the first fill: the top-ups and the last fill. Leave out the first fill. It only filled the tank to the starting line.
A road with three fill-ups: the first full tank, not counted; a top-up, counted; the last full tank, counted. Miles driven runs from the first full tank to the last.
Count the gallons after the first full tank, top-ups included.

Skip a top-up and the car looks better than it is. 492.5 miles on 6.250 plus 11.874 gallons is 27.2 mpg. Forget the 6.250 and the same car seems to get 41.5.

For a steadier number, measure over several fill-ups: add all the miles, add all the gallons, divide once. Don't average each tank's mpg. A tank at 34.0 mpg and the next at 20.0 average 27.0, but the car went 490 miles on 17.5 gallons, which is 28.0. Plan a 490-mile drive at 27.0 and you'd budget about 18.1 gallons for the 17.5 it really takes.

A plug-in hybrid's fill-up mpg counts only the gas. Whatever it charged from the wall isn't on the receipts.

The odometer has to be right, too. On tires that aren't the original size it can read off, and your mpg is off by the same percentage. Our tire size calculator shows how far.

Who this is for

You're splitting gas with friends on a road trip, or starting a new commute after a job change or a move. Maybe your family is weighing a thirstier SUV against the car you drive now. Or you've got a pile of gas receipts and want your car's real mpg.

Driver questions about gas cost and mpg

How do I calculate gas cost for a trip?

Divide the miles by your mpg to get gallons, then multiply by the price per gallon. A 574-mile round trip at 31 mpg takes about 18.52 gallons, and at $4.399 that's $81.47. Count the drive home and use the mpg your car really gets. Price the whole trip at once, not leg by leg.

How do you calculate miles per gallon?

Fill the tank all the way and note the odometer. Drive, then fill all the way again and note the gallons. Miles driven divided by gallons pumped is your mpg. If you topped up in between, add those gallons too. The Your mpg tab does the division and shows gallons per 100 miles beside it.

How do I calculate mpg without filling up?

Not from one partial fill. Nobody can tell how far below full the tank stopped, so the gallons don't match the miles. Top-ups are fine as long as each end is a full tank: add their gallons in. Your car's trip computer gives an average without any of this, and two full tanks are how you check it.

How do I split gas money with friends?

Work out the whole trip's gas, the drive back included, and divide by everyone in the car, driver too. Set People splitting the gas and the calculator divides the total it shows, then rounds each share. When the shares come to more or less than the total, it tells you by how much, so nobody's left wondering where the penny went.

What's the cost of gas per mile?

Price per gallon divided by mpg. At $4.399 a gallon and 31 mpg, each mile burns about 14.2 cents of gas. That's gas alone. It isn't the IRS standard mileage rate, which is a different number for a different job, so don't use one in place of the other.

City vs highway mpg: which should I use?

Match it to the drive. EPA's combined figure on the window sticker weights city at 55% and highway at 45%. A mostly interstate trip sits closer to the highway number, and a stop-and-go commute sits closer to city. Your own mpg from fill-ups beats both, because it already holds the way you drive.

How accurate are mpg estimates?

They're a standard test, so they're good for comparing cars and rough for budgeting yours. EPA lists what moves real mileage: speeding and hard acceleration, cold weather and short trips, the A/C, roof cargo, towing, hills and ethanol blends. For a gas budget, the number from your own receipts is the one to trust.

How accurate is the mpg display in my car?

We can't tell you for your car, and we won't guess a percentage. You can check it yourself, though. Reset the display at a full tank, drive a tank or two, fill all the way, and put the miles and gallons into the Your mpg tab. If the two numbers disagree, your receipts win.

What does annual fuel cost mean on a window sticker?

It's EPA's yearly estimate, and it rests on two assumptions: 15,000 miles a year and a projected gas price. Your year probably isn't 15,000 miles, and your pump doesn't charge EPA's projection. Put your own miles and price into Yearly cost and you get your number instead of the label's.

Does anything I type get saved or sent?

No. The arithmetic runs in your browser, on your device. Nothing you type is sent anywhere, nothing is stored, and the next visit starts blank. If you want to keep a result, copy it or print it.

Gas cost per mile, per month and per year

A trip, a month of commuting and a year of driving are the same arithmetic at three sizes. Gas cost per mile is the price per gallon divided by your mpg. A year is your miles divided by your mpg, times the price; a month is the year divided by 12, and a week is the year divided by 52, so typing your miles a week gets you all three. When you're weighing a car with worse mileage, keep the miles and the price, change only the mpg, and compare the two yearly totals. The difference is what the thirstier car costs you in gas, before anything else.

Sources and last checked

  • Fuel economy label, EPA and DOE at fueleconomy.gov: the 15,000-mile and projected-price assumptions, the 55/45 city and highway weighting, and why the label shows a consumption figure.
  • Calculating Your MPG, fueleconomy.gov: the odometer and trip-meter methods.
  • Many Factors Affect Fuel Economy, fueleconomy.gov.
  • Gasoline and Diesel Fuel Update, U.S. Energy Information Administration: weekly gas prices by region, if you want a reference before you fill up. We link it and don't copy it.
  • Units: miles and US gallons as you type them, so no conversion runs here (unit profile fuel-unit-profiles, version 2026-10-07; NIST Handbook 44).

Last checked October 8, 2026.

More free tools for your car

Bookmark the calculator for your next road trip or fill-up. It starts blank every time, so copy or print any result you want to keep.

Back To Top