Skip to content

Trip fuel cost, in one screen

Gas Calculator

Figure out how much a drive is actually going to cost you in gas before you leave. Enter your trip distance, your car's fuel efficiency and the price of gas, and this calculator works out how many gallons you will burn and what the total will come to. It handles round trips, works in miles or kilometers, and can split the cost between everyone riding along, so you do not have to reach for a phone calculator to answer a simple question.

Units US (miles, mpg, $/gallon)
Trip type One-way
Fuel needed
Total trip cost Enter distance, fuel efficiency and gas price.
Was this tool helpful?
Send feedback

How the gas cost calculation works

The math behind this calculator is the same math you would do by hand, it just does it instantly and handles the unit conversions for you. In US units, your car's fuel efficiency (miles per gallon) tells you how many miles you get out of one gallon of gas. Divide your total trip distance by that number and you get the gallons you will need. Multiply the gallons by the price per gallon and you have your total cost. Three numbers in, one number out, no spreadsheet required.

If you switch to metric units, the logic flips slightly because fuel efficiency is usually expressed as liters per 100 kilometers instead of distance per unit of fuel. The calculator takes your distance in kilometers, works out what fraction of 100 km that trip covers, and multiplies by your car's L/100km rating to get liters needed, then multiplies by the price per liter. You never have to convert anything by hand between the two systems; switching the toggle relabels every field and swaps the formula behind the scenes.

Turn on Round trip and the calculator doubles your entered one-way distance before running the math, so you do not have to do that multiplication yourself or accidentally type the wrong number into the distance field. This matters more than it sounds: a surprising number of gas-cost estimates people do by hand are wrong specifically because they forgot to double the distance, or double-counted it by accident.

Three example trips

A few worked examples, using the same formula the calculator runs, so you can sanity-check your own results before you trust them for a real trip:

  1. Daily commute, one-way: 18 miles each way in a car that gets 32 mpg, gas at $3.30/gallon. That is 0.56 gallons and $1.86 one-way, or $3.71 for the round-trip commute; about $18.56 for a five-day work week, and roughly $80 for a full month of commuting.
  2. Weekend getaway, round trip: 120 miles each way (240 total) in an SUV averaging 24 mpg, gas at $3.60/gallon. That works out to 10 gallons and $36.00 for the whole trip, before tolls or parking.
  3. Cross-country road trip, one-way: 2,200 miles in a sedan averaging 34 mpg, gas at $3.45/gallon. That is about 64.7 gallons and roughly $223 in fuel; split four ways between passengers, about $56 each, which is often the number people are really trying to work out before agreeing to a road trip together.

Why small differences in mpg matter more on long trips

A 5 mpg difference feels small when you look at the number on a window sticker, but it compounds fast once distance gets involved. Take the cross-country example above at 2,200 miles: at 34 mpg it burns about 64.7 gallons, but at 29 mpg (5 mpg lower) it burns about 75.9 gallons, roughly 11 more gallons for the exact same trip. At $3.45 a gallon, that gap alone is close to $38, more than the cost of a tank of gas by itself. This is the main reason it is worth plugging your real mpg into this calculator rather than a rough guess: the further you are driving, the more a small fuel-efficiency error snowballs into a real dollar difference. If you are not sure what your car's real mpg is, the MPG calculator gives you an exact answer from one fill-up instead of a guess.

What if I do not know my car's fuel efficiency?

Check your owner's manual or the window sticker your car came with, both list an EPA combined mpg rating. If neither is handy, use the MPG calculator to work it out from a recent fill-up: your odometer reading (or trip meter) since the last fill, divided by the gallons it took to fill the tank back up. If you would rather start from a rough estimate for your type of vehicle before your next fill-up, see the average gas mileage by vehicle type reference, which lists typical combined mpg ranges for compact cars, sedans, SUVs, pickup trucks, minivans and hybrids.

Calculating gas cost to a specific destination

Questions like "how much will it cost me to drive to Florida" or "what would gas cost driving to California" come up a lot, and the honest answer is that it depends entirely on where you are starting from and which route you take. This calculator does not know your location, and it is not a route planner. The two-step way to answer it: look up the driving distance for your specific route in a maps app, it will show you the mileage, then drop that number into the distance field here along with your car's mpg and the current gas price in the area you are driving through. That gives you a real number for your actual trip, not a generic estimate that ignores where you are actually leaving from.

Gas prices swing more than people expect

National average gas prices can move 20-40 cents a gallon over the course of just a few weeks depending on crude oil prices, seasonal refinery maintenance, and regional supply. That swing alone changes the cross-country example above by roughly $13-$26 in either direction, without your route or your car changing at all. If you are budgeting for a trip that is more than a week or two out, it is worth re-running the calculator closer to your departure date with an updated price instead of relying on today's number, especially heading into a holiday travel period when prices tend to climb.

Prices also vary by location on any given day, sometimes by 30-50 cents a gallon between two stations a few miles apart, and even more between different states due to differences in state gas taxes. If your trip crosses state lines, using an average of the prices along your route, rather than just the price where you happen to be filling up when you calculate, gives a more realistic total.

Tips to lower what you actually spend on gas

A few things that move the number this calculator gives you, in order of how much they usually matter:

Splitting gas cost fairly on a shared trip

The optional split-cost field is built for the situation where a few people are sharing one car for a trip and want a fair number to split, not just an estimate for the driver. Enter the number of people sharing the cost (the driver can choose whether to count themselves) and the calculator adds a cost-per-person line under the total. This works the same way whether it is a weekend trip with friends, a carpool to a shared event, or splitting the cost of a longer drive with family. It is worth agreeing on the number up front (does the driver pay a share, or do passengers cover the full cost) since that is a judgment call this calculator leaves to you, not a math problem it can solve on its own.

Frequently asked questions

How accurate is this gas calculator?
It is exact for the numbers you give it: distance, fuel efficiency and gas price, multiplied out with no rounding tricks. The accuracy of the result depends on how accurate your inputs are. Real-world fuel efficiency varies with driving style, terrain, weather, tire pressure and how much weight you're carrying, so treat the result as a solid estimate rather than a guarantee to the penny.
Does it account for a round trip automatically?
Only if you tell it to. Enter your one-way distance and switch the Trip type toggle to "Round trip", the calculator then doubles that distance before working out fuel and cost, so you never have to do the doubling yourself.
Can I use it in kilometers and liters instead of miles and gallons?
Yes. Switch the Units toggle to "Metric" and the fields change to kilometers for distance, liters per 100 km for fuel efficiency, and price per liter.
How do I split the cost between passengers?
Fill in the optional "Split cost between this many people" field with the number of people sharing the trip (2 or more), and the calculator adds a cost-per-person line under the total.
What gas price should I use if I'm not sure?
Use the price at the pump closest to where most of your driving will happen, or an average for the region you're driving through if it's a long trip. Gas prices can vary by 30-50 cents a gallon between neighboring stations, so if you want a tighter estimate, check a couple of nearby stations first.
Does this calculator find the cheapest gas stations or plan my route?
No, this tool only estimates cost from the numbers you enter. It does not look up live gas prices, find stations along a route, or plan stops. For live station prices, a gas-price app or your maps app's fuel-price layer is the right tool; use this calculator once you know your distance and an approximate price per gallon.
Why does the total change so much when I change the gas price slightly?
On a long trip, even a small per-gallon price difference gets multiplied by a lot of gallons. A 20-cent swing on a 65-gallon cross-country trip is about $13, which is why it is worth using a realistic, current price rather than an old or rounded number.
Is my data saved anywhere?
No. Every calculation runs in your browser. The only thing saved locally is your last entered values and unit preference, in your browser's storage, so the calculator remembers them next time you visit. See the privacy page for details.

Don't know your car's real MPG?

Work it out from your last fill-up in about ten seconds.

Go to the MPG calculator

Free. No sign-up.