Fuel Efficiency Calculator Formula

Understand the math behind the fuel efficiency calculator. Each variable explained with a worked example.

Formulas Used

Vehicle A Annual Fuel

annual_cost_a = cost_a

Vehicle B Annual Fuel

annual_cost_b = cost_b

Annual Savings (B vs A)

annual_savings = cost_a - cost_b

5-Year Savings

five_year_savings = (cost_a - cost_b) * 5

Variables

VariableDescriptionDefault
annual_milesAnnual Miles Driven(miles)12000
gas_priceGas Price(USD/gal)3.5
mpg_aVehicle A MPG(MPG)25
mpg_bVehicle B MPG(MPG)35
cost_aDerived value= annual_miles / mpg_a * gas_pricecalculated
cost_bDerived value= annual_miles / mpg_b * gas_pricecalculated

How It Works

How to Compare Fuel Efficiency

Calculate each vehicle's annual fuel cost and find the difference.

Formula

Annual Fuel Cost = Annual Miles / MPG x Gas Price

Savings = Cost A - Cost B

Worked Example

12,000 miles/year at $3.50/gal: Vehicle A gets 25 MPG, Vehicle B gets 35 MPG.

annual_miles = 12000gas_price = 3.5mpg_a = 25mpg_b = 35
  1. 01Vehicle A cost = 12,000 / 25 x $3.50 = $1,680
  2. 02Vehicle B cost = 12,000 / 35 x $3.50 = $1,200
  3. 03Annual savings = $1,680 - $1,200 = $480
  4. 045-year savings = $480 x 5 = $2,400

Frequently Asked Questions

Is a 10 MPG improvement always worth it?

The value depends on your starting point. Going from 15 to 25 MPG saves much more fuel than going from 35 to 45 MPG for the same miles driven.

Should fuel cost be the only factor when choosing a car?

No. Consider purchase price difference, insurance, maintenance, reliability, comfort, and resale value alongside fuel economy.

How many miles does the average American drive?

About 13,500 miles per year, or roughly 37 miles per day.

Learn More

Guide

Fuel Economy Guide - Understanding MPG and Fuel Costs

Learn how to calculate fuel economy, compare MPG ratings, and estimate trip fuel costs. Covers miles per gallon, liters per 100 km, and money-saving driving tips.

Ready to run the numbers?

Open Fuel Efficiency Calculator