Gas Cost Calculator

Find out what a drive will cost in gas. Enter the distance, your car’s fuel economy and the price per gallon, tick round trip to double the distance, and split the total between the people in the car.

Use the highway figure for long interstate drives.
Trip cost$31.25
Cost per person$31.25
Gallons used8.93
Total miles250
Cost per mile$0.13
Cost per 100 miles$12.50

250 miles ÷ 28 mpg = 8.93 gallons × $3.50 = $31.25.

Calculated on your device · formulas checked against known results · How we test

How to use the gas cost calculator

  1. Distance — the one-way driving distance from a map app. Tick Round trip to double it.
  2. Fuel economy — your car's miles per gallon. The EPA rating is on the window sticker and at fueleconomy.gov, but your own measured figure is better.
  3. Gas price — the price per gallon you expect to pay along the route.
  4. Split between — the number of people sharing the cost, including the driver if they pay a share.

The formula

gallons = miles ÷ mpg, then trip cost = gallons × price per gallon.

Cost per person is the trip cost divided by the number of people, and cost per mile is simply price ÷ mpg — it doesn't depend on the distance at all.

Worked example: a weekend road trip

Four friends drive 280 miles each way in a car that gets 32 mpg, with gas at $3.29 a gallon:

How fuel economy changes the cost

Fuel use is the inverse of mpg, so each extra mile per gallon saves less than the one before. Here's the fuel for 1,000 miles at $3.50 a gallon:

Fuel economyGallons per 1,000 milesCost per 1,000 miles
20 mpg50$175.00
25 mpg40$140.00
30 mpg33.33$116.67
40 mpg25$87.50
50 mpg20$70.00

Going from 20 to 25 mpg saves $35 per 1,000 miles; going from 40 to 50 mpg saves only $17.50. When comparing cars, gallons per 100 miles is a more honest measure than mpg.

Getting a realistic MPG

If you're unsure, use a slightly lower mpg and a slightly higher gas price than you expect — it's better to budget a little high.

Gas isn't the whole cost of driving

Fuel is only one part of what a mile costs. Tires, oil changes, repairs, insurance and depreciation add more, which is why the IRS standard mileage rate for business driving is several times the fuel cost per mile you see here. If you borrow a friend's car for a long trip, consider contributing more than the gas. Tolls and parking aren't included in this estimate either; add them separately when planning a travel budget.

Frequently asked questions

How do I calculate the gas cost of a trip?

Divide the distance by your car’s miles per gallon to get gallons, then multiply by the price per gallon. A 400-mile trip at 25 mpg uses 16 gallons; at $3.40 a gallon that is $54.40.

How many gallons of gas will I use?

Miles divided by mpg. A 150-mile drive in a car that gets 30 mpg uses 5 gallons.

How should we split gas money fairly?

The simplest way is to divide the total fuel cost equally among everyone in the car, including the driver. Some groups have passengers cover the gas while the driver covers wear and tear on the car.

What is my fuel cost per mile?

Divide the gas price by your mpg. At $3.50 a gallon and 28 mpg, each mile costs 12.5 cents in fuel.

Does the estimate include tolls or parking?

No. It covers fuel only. Add tolls, parking and any other trip costs separately.

Embed this calculator on your website

Free for any website or blog. Paste this code where you want the calculator to appear:

Last updated: October 8, 2026

Menu

Categories

Finance Calculators16 calculatorsBusiness & Shopping Calculators6 calculatorsHealth & Fitness Calculators6 calculatorsMath & School Calculators5 calculatorsDate & Time Calculators4 calculatorsHoliday Countdowns10 calculatorsEveryday Tools5 calculators

CalcWorthy

AboutContactPrivacy PolicyTerms of Use