Methodology

How we calculate driving costs, where our data comes from, and what assumptions we make. Transparent by design.

Core Calculator Formulas

Fuel needed (gallons)

distance ÷ MPG

Example: 300 miles ÷ 30 MPG = 10 gallons

Trip cost

fuel needed × gas price

Example: 10 gallons × $3.45 = $34.50

Cost per mile (fuel only)

gas price ÷ MPG

Example: $3.45 ÷ 30 = $0.115/mile

Cost per 100 miles

(100 ÷ MPG) × gas price

Example: (100 ÷ 30) × $3.45 = $11.50

Daily commute cost

(round-trip miles ÷ MPG) × gas price

Example: (50 ÷ 30) × $3.45 = $5.75/day

MPG from trip data

miles driven ÷ gallons used

Example: 320 miles ÷ 11.2 gallons = 28.6 MPG

Fuel savings from new vehicle

(miles/month ÷ old MPG − miles/month ÷ new MPG) × gas price

Example: (1000 ÷ 25 − 1000 ÷ 35) × $3.45 = $39.43/month

IRS mileage reimbursement

miles driven × IRS rate

Example: 500 × $0.70 = $350.00

Gas Price Data

Gas prices are sourced from the U.S. Energy Information Administration (EIA.gov) via their public API. We use weekly retail regular unleaded gasoline prices.

  • • Data is updated every Monday when EIA publishes new weekly figures
  • • Our site caches data for up to 24 hours before fetching again
  • • If the EIA API is unavailable, we display the most recent data or a labeled fallback
  • • State prices are weekly state-level averages, not individual station prices

IRS Mileage Rates

IRS standard mileage rates are updated annually from IRS.gov Notice announcements. Rates are hardcoded in our system and updated each January (or mid-year if the IRS announces an adjustment).

⚠️ Always verify current IRS rates at IRS.gov before using them in tax filings.

EV Charging Calculations

EV charging cost estimates use residential electricity rates from EIA.gov state-level data. We use an 82 kWh battery (equivalent to Tesla Model 3 Long Range) as a reference vehicle.

  • • kWh per 100 miles ≈ 22.9 kWh (based on ~358 mile range from 82 kWh battery)
  • • Electricity rates are annual residential averages, not time-of-use rates
  • • Public charging rates are higher — these estimates reflect home charging only

Workday Assumptions

Commute cost calculations use: 5 workdays/week (default), 21 workdays/month, 250 workdays/year. These adjust proportionally when you select fewer days/week.

Related Tools