All articles
4 min readBy the GasBudgeter Research Team·March 13, 2026

How to Calculate Gas Cost Per Mile

Learn the simple formula to calculate your gas cost per mile, see worked examples, and find out why it is the most useful number for comparing vehicles and trips.

Cost per mile is the single most useful number for comparing vehicles, planning trips, and tracking driving expenses. It turns an abstract fuel cost into something concrete: every mile you drive costs you a specific amount of money. Here's the formula and how to use it.

The Formula

Gas cost per mile has two versions depending on what you know:

If you know MPG and gas price:

Cost per mile = Gas price per gallon ÷ MPG

If you know total cost and miles driven:

Cost per mile = Total gas cost ÷ Miles driven

Both give you the same answer. Use whichever matches the numbers you have available.

Step-by-Step Example

Say you drive a vehicle that gets 32 MPG and your local gas price is $3.50 per gallon.

Cost per mile = $3.50 ÷ 32

Cost per mile = $0.109 (about 11 cents per mile)

That means a 20-mile grocery run costs you about $2.19 in fuel. A 300-mile road trip costs $32.81 in gas alone. Once you know your cost per mile, every trip has a clear price tag.

Compare that to a truck getting 18 MPG at the same gas price:

Cost per mile = $3.50 ÷ 18

Cost per mile = $0.194 (about 19 cents per mile)

The truck costs 78% more per mile to fuel. Over 15,000 miles per year, that's a difference of $1,275 per year in gas alone, just between these two vehicles.

When Cost Per Mile Is Most Useful

Comparing two vehicles

Cost per mile makes it easy to see the true fuel cost difference between a current vehicle and a potential replacement. Multiply the difference by your annual mileage to see the yearly savings.

Mileage reimbursement

The IRS standard mileage rate for 2026 is $0.70 per mile for business driving. Knowing your actual fuel cost per mile tells you whether the reimbursement rate covers your real costs. Use our mileage reimbursement calculator to see how much you should be claiming.

Delivery and gig work

If you drive for DoorDash, Uber, Amazon Flex, or a similar service, cost per mile is essential for knowing whether a delivery or ride is actually profitable after fuel costs.

Road trip budgeting

Multiply your cost per mile by the trip distance to get the fuel budget for any road trip. Our road trip calculator does this automatically with live gas prices.

What Affects Your Cost Per Mile

The formula is simple, but the real-world number shifts constantly:

  • Gas prices fluctuate weekly. A $0.30 swing in gas price changes your cost per mile by about $0.01 on a 30 MPG vehicle, which adds up to $150/year at 15,000 miles.
  • City vs highway driving changes MPG. Most vehicles get 20–30% better mileage on the highway than in city traffic. Your effective cost per mile will be higher on city routes.
  • Speed matters. Fuel economy peaks around 50 mph for most vehicles and drops off at highway speeds above 60–65 mph.
  • Vehicle load and cargo weight. A fully loaded car or truck burns more fuel per mile than an empty one.

Skip the Math: Use the Calculator

Our cost per mile calculator handles this automatically using today's live EIA gas prices. Enter your vehicle's MPG and it instantly shows your current fuel cost per mile. You can also use the gas cost calculator to estimate total trip costs for any distance.


Try These Tools

More Articles