Skip to content

Gas Cost Calculator: Estimate Your Trip Fuel Cost in Seconds

The average American household spends about $3,120 a year on gasoline(U.S. Bureau of Labor Statistics), yet most of us only find out what a trip costs after we've paid for it. Enter three numbers (distance, your car's MPG, and the price per gallon) and see gallons needed, total trip cost, and cost per mile before you turn the key.

📍
miles
🚗
mpg
$/gal

Prices come from the U.S. Energy Information Administration (EIA.gov) and refresh every business day. See how we source our data →

How the gas cost calculator works

No black box here. Say you're driving 400 miles from Dallas to Houston and back in a car that gets 32 MPG, with gas at $3.96 a gallon. You'll burn about 12.5 gallons, spend roughly $49.50, and pay just over 12 cents per mile. That's the whole calculation, and it works the same for a daily commute, a delivery route, or a cross-country road trip.

One honest caveat: your window-sticker MPG is optimistic. Real-world fuel economy typically runs 10 to 15% lower in city traffic, cold weather, or hilly terrain. If you want a tighter estimate, calculate your actual MPG from your last fill-up. Our MPG calculator does it in one step, and the cost per mile tool adds maintenance and depreciation.

Worked example

400 miles ÷ 32 MPG = 12.5 gallons
12.5 gallons × $3.96 = $49.50

The formula is trip cost = (distance ÷ MPG) × price per gallon, the same one the U.S. Department of Energy uses. Cost per mile is just $49.50 ÷ 400 miles ≈ 12.4¢.

Today's gas prices, straight from the EIA

A calculator is only as good as the price you feed it, and prices swing hard by state. California drivers routinely pay over a dollar more per gallon than drivers in Texas or Mississippi. We maintain a live price page for every state, built on the EIA's weekly retail survey and refreshed each business day.

Planning a multi-state trip? See the cheapest states for gas to time your fill-ups, or check price trends since 2020.

2026 IRS mileage rates, built into our tax tools

Driving for work? The IRS raised the business mileage rate to 72.5¢ per mile for 2026(Notice 2026-10, announced December 29, 2025). Our reimbursement and deduction calculators already use the new rates, so there's no manual lookup needed.

The IRS rate covers more than fuel. It bakes in depreciation, insurance, and maintenance, which is why reimbursement per mile is roughly five times what most drivers spend on gas alone, and why freelancers and delivery drivers leave money on the table when they only track fuel receipts.

Reimbursement calculator · Business deduction · 2026 rate explained

Source: IRS Notice 2026-10, effective January 1, 2026
Purpose2026 rateChange vs 2025
Business72.5¢ per mileup 2.5¢
Medical20.5¢ per miledown 0.5¢
Moving (qualified military)20.5¢ per miledown 0.5¢
Charitable14¢ per mileno change

EV vs gas: which is cheaper where you live?

The answer genuinely depends on your state. Cheap electricity plus expensive gas makes an EV a clear win in some states; in others, the gap nearly closes. Our comparison tools put your state's electricity rates and gas prices side by side and show the real cost per mile for each.

20+ free driving cost tools

Every tool runs in your browser, requires no sign-up, and shows its formula. Start with the one that matches your situation.

Mileage & tax tools

Where this estimate can miss (and how to fix it)

We'd rather tell you the limits than pretend there aren't any. Three things move your real cost away from the estimate:

Your MPG inputEPA figures assume ideal conditions. Use a recent tank-to-tank measurement instead.
Price changes en routeOn long trips, average the price at your origin and destination; it keeps the estimate honest.
Everything that isn't fuelTolls, parking, and wear aren't in a fuel estimate. For total per-mile cost, use the cost per mile tool.

Who's behind GasBudgeter

GasBudgeter is an independent set of driving cost tools. Every price on this site traces to a named public source (gas prices from EIA.gov, mileage rates from IRS.gov), and our Methodology and Sourcespages document how each number is pulled and when it was last refreshed. We don't sell fuel cards, insurance, or leads, so we have no reason to nudge your numbers.

Calculations reviewed by Alex Morgan
Last reviewed: July 7, 2026 · About our team

Methodology · Sources · About

Frequently asked questions

How accurate is a gas cost calculator?
It's an estimate, not a receipt. The math itself is exact (distance ÷ MPG × price), but real-world MPG runs 10 to 15% below the EPA label in stop-and-go traffic, hills, or cold weather. Enter your own observed MPG for the closest number.
Where do your gas prices come from?
Weekly retail price data published by the U.S. Energy Information Administration (EIA.gov), refreshed on our site every business day. Our Methodology page explains exactly how each figure is sourced and when it was last updated.
What is the 2026 IRS mileage rate?
72.5 cents per mile for business driving, up 2.5 cents from 2025. Medical and qualified moving mileage is 20.5 cents, and charitable mileage stays at 14 cents. Our reimbursement calculator applies these rates automatically.
How do I calculate gas cost for a trip?
Divide your trip distance by your vehicle's MPG to get gallons needed, then multiply by the price per gallon. A 400-mile trip at 32 MPG and $3.96/gal costs about $49.50. Or skip the math and just enter three numbers above; we'll do it for you.
Should I use national or local gas prices?
Local. State averages can differ from the national figure by more than a dollar per gallon. Use our state pages to find your local average, then plug it into the calculator.
What if I don't know my car's MPG?
Check the EPA fuel economy label, your owner's manual, or your trip computer. Better yet, fill the tank, reset the odometer, drive normally, refill, and divide miles by gallons. That's your real MPG, and it's usually the most honest number.
Is mileage reimbursement the same as fuel cost?
No. Fuel is only part of it. The IRS rate also covers depreciation, insurance, maintenance, and tires, which is why 72.5 cents per mile is far higher than the 12 to 15 cents per mile most drivers spend on gas alone.
Can I compare EV charging with gas costs here?
Yes. Our EV vs Gas tool compares per-mile fuel cost against per-mile charging cost using your state's electricity and gas prices, so you can see which drivetrain is cheaper where you actually live.

Know your trip cost before you drive

Enter your distance, MPG, and local gas price in the calculator above, or jump straight to your state's live prices and start from a number you can trust.

From the blog

Guides, tips, and explainers on fuel costs and mileage

View all →