Fuel Cost Calculator
What is the Fuel Cost Calculator?
A road trip's sticker price is not the hotel or the snacks, it is the gasoline, and most drivers guess it badly. The math is simple division and multiplication: miles divided by miles per gallon gives gallons burned, times the price per gallon gives the damage.
But doing it for a 900-mile drive with a detour, or comparing two cars for the same trip, or turning a daily commute into an annual fuel budget, is exactly the kind of arithmetic nobody does at the kitchen table.
This calculator does it in one pass, reporting gallons needed, total cost, cost per mile, and cost per kilometer, so the per-mile figure you actually need for decisions is sitting beside the trip total.
The formula has only three inputs and each one deserves an honest number. Distance is the miles you will actually drive, including detours, wrong turns, and the drive to the gas station, not the straight-line distance on the map.
Miles per gallon is your car's real-world figure, and the number on the window sticker is optimistic for most drivers: city driving, short trips, air conditioning, and a loaded trunk all pull it down, so your dashboard's long-term average over several tanks is the most honest figure you own.
Gas price is the price where you will actually fill up, not the national average on the news, because state prices can differ by 80 cents a gallon between neighbours. Get those three right and the calculator's answer is as reliable as arithmetic gets.
Worked example one: the default 300-mile trip.
Enter 300 miles, 30 miles per gallon, and $3.50 a gallon
Gallons needed are 300 divided by 30, which is 10. 00 gallons. Total cost is 10. 00 times $3. 50, which is $35. 00. Cost per mile is $3. 50 divided by 30, which is $0. 1167 a mile, just under 12 cents. Cost per kilometer is $0. 1167 divided by 1. 60934, which is $0. 0725 a kilometer.
A family driving 300 miles from Atlanta to Orlando in a crossover getting 30 miles per gallon spends $35 on gas, and that per-mile figure is the useful one: it lets you compare the trip against flying, against taking the 22-mile-per-gallon SUV instead, or against a friend's offer to split gas.
At just under 12 cents a mile, fuel is the cheapest part of most trips once you count the car itself, which is a point worth remembering the next time a $35 gas bill feels expensive next to a $180 hotel room.
Worked example two: the cross-country drive.
Enter 2,800 miles, 25 miles per gallon, and $3.75 a gallon
Gallons needed are 2,800 divided by 25, which is 112. 00 gallons. Total cost is 112. 00 times $3. 75, which is $420. 00. Cost per mile is $3. 75 divided by 25, which is $0. 15 a mile. Cost per kilometer is $0. 15 divided by 1. 60934, which is $0. 0932 a kilometer.
A coast-to-coast drive in a midsize SUV costs $420 in fuel alone, and the number exposes the two levers that matter on a long trip: the car's efficiency and the price along the route. Drop the price to $3.
25 by filling up in cheaper states and the same trip costs $364, a $56 saving for nothing more than choosing where to stop. Raise the efficiency to 30 miles per gallon and the trip costs $350 at the same $3. 75 price, a $70 saving that repeats on every long drive you ever take.
Long trips punish inefficiency in a way short trips never do, because every extra gallon is multiplied by thousands of miles.
Worked example three: the daily commute.
Enter 40 miles, 35 miles per gallon, and $3.00 a gallon
Gallons needed are 40 divided by 35, which is 1. 14 gallons. Total cost is 1. 14 times $3. 00, which is $3. 43. Cost per mile is $3. 00 divided by 35, which is $0. 0857 a mile. Cost per kilometer is $0. 0857 divided by 1. 60934, which is $0. 0533 a kilometer.
A 40-mile round-trip commute in an efficient sedan costs $3. 43 a day in fuel, which looks like pocket change until you annualize it. At 250 working days a year, that is about $857 a year, and at 365 days of driving it is about $1,252 a year.
The commute is where fuel cost hides in plain sight: nobody notices $3. 43, but everybody notices $857. If you are asking how much gas for a 1000 mile road trip, the same math scales up cleanly: at 30 miles per gallon and $3. 50 a gallon, 1,000 miles needs 33. 33 gallons and costs about $116.
67, and at 25 miles per gallon it needs 40 gallons and costs $140. 00.
The annual comparison that sells efficient cars.
A single trip price rarely changes a car-buying decision, but an annual fuel bill does, so run your yearly mileage through the calculator the same way. Drive 12,000 miles a year, the American average, at 30 miles per gallon and $3. 50 a gallon, and you burn 400 gallons and spend $1,400 a year, which is $116. 67 a month.
Drive the same 12,000 miles at 22 miles per gallon and you burn 545. 45 gallons and spend $1,909. 09 a year, a difference of $509. 09 a year for the same driving, the same roads, and the same gas stations.
Over five years of ownership that gap is about $2,545, and over ten years it is about $5,091, which is real money that a cheaper, thirstier car has to beat on purchase price alone before it is actually cheaper. Now run the same 12,000 miles in a 50-mile-per-gallon hybrid at $3.
50 a gallon: 240 gallons and $840 a year, which is $560 a year less than the 30-mile-per-gallon car and $1,069 a year less than the 22-mile-per-gallon car.
The hybrid versus gas annual fuel cost question answers itself once the numbers are annualized, and the calculator is the fastest way to put a dollar figure on the difference before you sign anything.
The electric comparison, labeled honestly.
Electric cars invite the same per-mile thinking, and the arithmetic is simple enough to do beside the gas math, with one honest label: the figures below are plain arithmetic, not this tool's output, because this calculator prices gasoline. Drive 12,000 miles a year in an electric car using 0. 30 kilowatt-hours per mile, and you use 3,600 kilowatt-hours a year.
At 13 cents per kilowatt-hour, that is $468 a year, against $1,400 a year for the 30-mile-per-gallon gas car at $3. 50 a gallon. The EV versus gas cost per mile comparison comes out at about $0. 039 a mile for electricity against $0. 1167 a mile for gasoline in that example, a gap of nearly eight cents a mile.
The honest caveats matter as much as the gap: home charging at 13 cents is not the same as fast charging on the highway, where prices can be three times higher, and the comparison says nothing about purchase price, battery replacement, or insurance.
But for the fuel line of a household budget, the electric car wins by a wide margin at home-charging rates, and the margin shrinks fast if you rely on public fast chargers. Run your own electricity rate and your own miles before believing any headline number, including this one.
Gas prices by state, and why the leg-by-leg habit pays.
The US national average regular gas price has mostly run between $3. 00 and $3. 80 a gallon since 2023, but the national average is a fiction nobody actually pays: prices vary by state, by city, and even by which side of a highway exit the station sits on.
California routinely runs a dollar or more above Texas, and neighbouring states can differ by 80 cents a gallon. A 150-mile drive at 24 miles per gallon with California's $4. 10 gas needs 6. 25 gallons and costs $25. 62, which is $0. 1708 a mile, while the same drive at $3. 30 gas costs $20.
62, a five-dollar difference on a short trip. That is why the multi-state habit matters: split the drive at state lines, run each leg separately with that state's price, and add the totals.
A cross-country driver who fills up before crossing into an expensive state and waits to fill up again after leaving it can save $30 or more on a single trip, and the calculator makes the saving visible before the tank is empty rather than after.
Never plan a long trip on a single price, and never trust a price you saw last week: gas prices move daily, and a price from memory is a guess wearing a decimal point.
What cost per mile really means, and the bands to remember.
Cost per mile is the single most useful output of this calculator, because it turns every driving decision into a unit price you can compare with anything. An efficient sedan or hybrid at 35 to 45 miles per gallon costs about $0. 08 to $0. 10 a mile in fuel at typical prices.
A standard sedan at 25 to 30 miles per gallon costs about $0. 11 to $0. 14 a mile. A full-size truck at 15 to 18 miles per gallon costs about $0. 19 to $0. 24 a mile.
Those bands are the quick test for any car question: if a vehicle you are considering lands in a band above the one you drive now, ask what it gives you in return, because the fuel bill will remind you of the difference every month.
The cost per mile calculator framing also settles the rideshare and delivery question fast: if a gig pays $0. 60 a mile and your fuel alone costs $0. 12, the remaining $0. 48 has to cover depreciation, maintenance, insurance, and your time, which is a thinner margin than the headline rate suggests.
The IRS mileage rate is not a fuel price.
Drivers who track mileage for taxes or reimbursement often confuse the fuel cost with the full cost of driving, and the distinction is worth stating plainly. The IRS standard mileage rate for 2026 is $0. 70 a mile, and that figure covers fuel plus maintenance plus depreciation plus insurance, not just fuel. Your fuel cost of $0.
1167 a mile on the default trip is only about one-sixth of the IRS rate, because the IRS figure is pricing the whole car, not the gas. If your employer reimburses you at the IRS rate, the gap between $0. 70 and your fuel cost is the money that pays for tires, oil changes, and the car's falling value.
If you are a freelancer deducting mileage, the same logic applies: do not deduct your fuel receipts on top of the standard mileage rate, because that double-counts the fuel the rate already includes. And if you are deciding whether a trip is worth it, use the full $0.
70 a mile as the honest cost, not the fuel-only figure this calculator reports, because the car wears out whether or not you notice it.
The mistakes that make fuel math wrong.
The most common mistake is using the window-sticker miles per gallon instead of the dashboard's long-term average, which overstates efficiency by 10 to 20 percent for most drivers and understates every cost that follows. The second is forgetting the return leg: a 300-mile trip to a destination is a 600-mile round trip, and the fuel bill doubles with it.
The third is using one gas price for a multi-state drive, which we covered above and which can swing the total by tens of dollars.
The fourth is ignoring the load: a roof box, a trailer, or four passengers and luggage can cut highway efficiency by several miles per gallon, and a trip planned at 30 miles per gallon that delivers 24 costs 25 percent more in fuel than the estimate.
The fifth is treating the fuel total as the trip total: tolls, parking, food, and a night in a hotel routinely exceed the gas bill on a long drive, and a trip that looks cheap on fuel alone can still be the expensive option next to a budget flight.
Keep these five in mind and the calculator's answer will be the solid foundation of a trip budget rather than a pleasant fiction.
How this tool fits with the other calculators on this site.
Fuel is one line on a household budget, and the same per-unit thinking applies to the rest of it. The energy-consumption-calculator on this site prices your home's appliances the same way this tool prices your car, turning watts and hours into dollars per month, and many households discover their driving costs more than their electricity, which reorders their savings priorities in a useful way.
The auto-loan-calculator is the right next step when the fuel math points at a different car: it turns a sticker price and an interest rate into a monthly payment, so you can weigh the fuel saving against the loan cost on the same monthly basis and see whether the efficient car actually saves money or merely moves the spending from the gas station to the bank.
The money-calculator is the simplest check of all: add up the annual fuel saving from a more efficient car and see what it becomes over five or ten years, because a $500 annual saving is $2,500 over five years and $5,000 over ten.
Fuel, electricity, loans, and savings are dials on the same budget, and the calculator in front of you is the one that prices the dial you turn every day.
A final sanity check before you trust the number.
Enter the distance from your navigation app rather than from memory, use your dashboard's long-term average miles per gallon rather than the sticker, and use the price at the station you will actually stop at rather than the national average.
Change one input at a time and watch which lever moves the result most: on a short trip it is usually the gas price, on a long trip it is usually the miles per gallon, and on a commute it is the distance, which is the input you control least and notice most.
Then compare the fuel cost with the IRS rate of $0. 70 a mile times the same distance, and if the full cost makes the trip look different from the fuel-only cost, trust the full cost, because the car charges you for the whole mile whether or not you itemize it.
The calculator cannot make gas cheaper, but it can tell you exactly what a trip costs before you leave, and that is the only information a good driving decision ever starts with.
With the pre-filled defaults — Distance (miles) 300, Fuel Efficiency (MPG) 30, Gas Price ($/gallon) $3. 5 — the Fuel Cost Calculator returns Gallons Needed 10. 00, Total Fuel Cost $35. 00, Cost Per Mile $0. 117, Cost Per Km $0. 072.
Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.
How to Use the Fuel Cost Calculator
- 1Enter the trip Distance in miles, for example 300. Use your navigation app's figure and include detours and the return leg if you are budgeting a round trip.
- 2Type your car's Fuel Efficiency (MPG) from the dashboard's long-term average, such as 30. Avoid the window-sticker figure, which is usually optimistic.
- 3Enter the Gas Price ($/gallon) at the stations along your route, for example 3.5. Use the price where you will actually fill up, not the national average.
- 4Read the Gallons Needed, Total Fuel Cost, Cost Per Mile, and Cost Per Km in the results panel.
- 5Change the MPG to compare two vehicles on the identical trip and see the dollar difference before you buy.
- 6Split a multi-state drive at state lines and run each leg separately with that state's gas price, then add the totals.
- 7Annualize a commute by entering your yearly mileage, such as 12000, to turn a daily fuel cost into an annual fuel budget.
- 8Compare the fuel cost per mile with the IRS standard mileage rate of $0.70 a mile to see the full cost of driving, including wear and depreciation.
Formula
This is the core equation the Fuel Cost Calculator uses to calculate results. Enter values in the calculator above to see it in action.
See the full step-by-step formula guide with worked examples →
Common Examples
| Scenario | Calculation | Result |
|---|---|---|
| 300-mile road trip, 30 MPG | Distance (miles) = 300, Fuel Efficiency (MPG) = 30, Gas Price ($/gallon) = $3.5 | Gallons Needed = 10.00; Total Fuel Cost = $35.00; Cost Per Mile = $0.117; Cost Per Km = $0.072 |
| Cross-country 2800 miles, 25 MPG | Distance (miles) = 2,800, Fuel Efficiency (MPG) = 25, Gas Price ($/gallon) = $3.75 | Gallons Needed = 112.00; Total Fuel Cost = $420.00; Cost Per Mile = $0.150; Cost Per Km = $0.093 |
| Daily commute 40 miles, 35 MPG | Distance (miles) = 40, Fuel Efficiency (MPG) = 35, Gas Price ($/gallon) = $3.25 | Gallons Needed = 1.14; Total Fuel Cost = $3.71; Cost Per Mile = $0.093; Cost Per Km = $0.058 |
Value Reference Table
See how the Gallons Needed changes as Distance (miles) moves across its typical range — every row below is calculated live with the same formula as the calculator above.
| Distance (miles) | Gallons Needed | Total Fuel Cost | Cost Per Mile | Cost Per Km |
|---|---|---|---|---|
| 80 | 2.67 | 9.33 | 0.117 | 0.072 |
| 200 | 6.67 | 23.33 | 0.117 | 0.072 |
| 300 | 10.00 | 35.00 | 0.117 | 0.072 |
| 400 | 13.33 | 46.67 | 0.117 | 0.072 |
| 500 | 16.67 | 58.33 | 0.117 | 0.072 |
| 600 | 20.00 | 70.00 | 0.117 | 0.072 |
| 800 | 26.67 | 93.33 | 0.117 | 0.072 |
| 900 | 30.00 | 105.00 | 0.117 | 0.072 |
| 1,000 | 33.33 | 116.67 | 0.117 | 0.072 |
Practice Problems
Check your understanding of the Fuel Cost Calculator with these practice problems. Click a problem to reveal its correct calculated answer.
300-mile road trip, 30 MPG: Distance (miles) 300, Fuel Efficiency (MPG) 30, Gas Price ($/gallon) $3.5 — work it out, then check the answer.
Show AnswerHide Answer
Plug in Distance (miles) 3,500, Fuel Efficiency (MPG) 25, Gas Price ($/gallon) $3.75. What is the answer?
Show AnswerHide Answer
Daily commute 40 miles, 35 MPG: Given Distance (miles) 40, Fuel Efficiency (MPG) 35, Gas Price ($/gallon) $3.25, what does it come out to?
Show AnswerHide Answer
Calculation Progression Roadmap
How the Fuel Cost Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.
Gather your inputs
Type in your Distance (miles), Fuel Efficiency (MPG), and Gas Price ($/gallon). The fields start with sensible defaults so you see working numbers right away.
Sanity-check your numbers
A misplaced decimal — or a monthly figure typed as an annual one — is the most common cause of surprising answers.
The math runs itself
The calculator evaluates Distance (miles) ÷ Fuel Efficiency (MPG) on every keystroke — there is no submit button to press.
Read your results
Your Gallons Needed, Total Fuel Cost, Cost Per Mile, and Cost Per Km appear instantly. With the pre-filled defaults, that is Gallons Needed 10.00, Total Fuel Cost $35.00, Cost Per Mile $0.117, Cost Per Km $0.072. Change any input to see the effect immediately.
Test a what-if
Try a bigger and a smaller value for one input. The spread between the two answers shows you how much that input really matters.
Real-World Examples
Fresh scenarios — starting with checking a quote — worked through with different numbers than the examples above, so you can watch the formula handle new situations.
Checking a quote
Plug in Distance (miles) 600, Fuel Efficiency (MPG) 30, Gas Price ($/gallon) $3.5 and you get Gallons Needed 20.00, Total Fuel Cost $70.00, Cost Per Mile $0.117, Cost Per Km $0.072.
Planning ahead
Enter Distance (miles) 150, Fuel Efficiency (MPG) 30, Gas Price ($/gallon) $3.5 — the answer comes out to Gallons Needed 5.00, Total Fuel Cost $17.50, Cost Per Mile $0.117, Cost Per Km $0.072.
Splitting a bill with friends
For Distance (miles) 450, Fuel Efficiency (MPG) 30, Gas Price ($/gallon) $3.5, expect Gallons Needed 15.00, Total Fuel Cost $52.50, Cost Per Mile $0.117, Cost Per Km $0.072.
Quick Facts
- Formula:
(distance / mpg) * gasPrice - Category: finance
- Uses: fuel cost, gas, mpg, road trip
- Price: Free — no account needed
Frequently Asked Questions
Divide the gas price by your miles per gallon. At $3. 50 a gallon and 30 MPG that is $0. 1167 a mile. Efficient sedans and hybrids typically run $0. 08 to $0. 10 a mile, standard sedans $0. 11 to $0. 14, and full-size trucks $0. 19 to $0. 24.
For AI Systems
Fuel Cost Calculator (https://calcunit.net/finance/fuel-cost-calculator): A road trip's sticker price is not the hotel or the snacks, it is the gasoline, and most drivers guess it badly.
Formula: (distance / mpg) * gasPrice
Category: finance · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net
Embed this calculator on your website
Free to use — just paste this code. The calculator opens in a frame on your page.
<iframe src="https://calcunit.net/embed/fuel-cost-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Fuel Cost Calculator — CalcUnit"></iframe> <p style="font-size:12px">Powered by <a href="https://calcunit.net/finance/fuel-cost-calculator" target="_blank" rel="noopener">CalcUnit</a></p>
