ToolSphere
Back to all articles
student

How to Calculate Gas Mileage

2026-11-128 min read

Try it: free Gas Mileage Calculator

Measure US MPG and estimate your trip’s fuel cost

Open →

Why calculating gas mileage manually matters

Modern vehicles feature dashboard computers that report real-time and average fuel economy. While these digital readouts provide quick estimates, they do not measure the physical volume of fuel flowing out of your tank. Instead, your vehicle's engine control unit (ECU) estimates fuel consumption by monitoring fuel injector pulse widths—the milliseconds each injector nozzle stays open—combined with assumed fuel pressure and engine speed.

Because injector flow rates can drift over time and tire wear slightly alters odometer accuracy, dashboard displays are frequently optimistic by 2% to 5%. Calculating your gas mileage manually using actual pump receipts and odometer readings provides an accurate, verifiable baseline.

Tracking your true miles per gallon (MPG) helps you:

  • Budget travel expenses: Calculate exact fuel costs for daily commutes, road trips, and shared rides.
  • Detect mechanical problems early: A sudden 10% to 15% drop in gas mileage often signals under-inflated tires, a clogged engine air filter, a failing oxygen sensor, or a dragging brake caliper before warning lights appear.
  • Evaluate driving habits: Test whether driving 65 mph instead of 75 mph or avoiding rapid acceleration makes a measurable difference in your monthly fuel spending.

To calculate or verify your numbers instantly, enter your figures into the gas mileage calculator.


The two-fill-up method: how to measure fuel consumption

To calculate gas mileage accurately, you must measure the exact distance traveled and the exact fuel consumed over the same driving interval. You cannot compute MPG from a single gas station visit or by guessing how much fuel was already in the tank.

Follow these four steps using the standard two-fill-up procedure:

Step 1: Fill the tank completely

Drive to a gas station and fill your fuel tank until the pump nozzle shuts off automatically. Do not continue topping off the tank after the initial click, as this can introduce fuel into the evaporative emissions canister and create inconsistent fill levels. Reset your vehicle's trip odometer to 0.0 miles, or write down the current master odometer reading (let this be Odometer 1).

Step 2: Drive normally

Drive your normal routes until the fuel gauge reaches between a quarter-tank and a half-tank. Driving a substantial distance—typically 200 to 400 miles—minimizes the percentage error caused by slight pump-to-pump shut-off variations.

Step 3: Refill the tank completely

Return to a gas station (ideally using the same pump or brand to ensure similar nozzle sensitivity) and fill the tank completely until the pump clicks off automatically.

Collect your receipt and record two values:

  1. Miles driven: Read the trip odometer (or subtract Odometer 1 from your current master odometer reading, Odometer 2).
  2. Gallons pumped: Record the exact number of gallons purchased, readable to three decimal places on the pump display (e.g., 12.000 gallons). This volume represents the exact amount of fuel required to replenish what your engine consumed during that interval.

Step 4: Run the calculation

Divide the miles traveled by the gallons pumped to find your vehicle's miles per gallon.

Why partial fills do not work: If your tank is at a quarter and you add $20 worth of gas without filling to the top, you cannot know the exact volume of fuel remaining in the tank. Only filling to full at both the beginning and the end establishes a known, identical fluid level.


The mathematical formulas: MPG, cost per mile, and trip fuel

Calculating vehicle fuel metrics involves four foundational formulas. All formulas below use US liquid gallons and statute miles.

1. Miles per gallon (MPG)

Fuel economy in the United States is expressed as the distance in miles traveled per US gallon of fuel consumed:

MPG = Miles Driven ÷ Gallons Used

For example, traveling 360 miles on 12 gallons yields:
360 ÷ 12 = 30 MPG

2. Fuel cost per mile

Fuel cost per mile tells you what each mile costs in direct gasoline expense, which is essential for commuter budgets and business travel reimbursements:

Cost per Mile = Gas Price per Gallon ÷ MPG

Alternatively, if you know the total dollars spent on fuel for an interval:

Cost per Mile = Total Fuel Cost ÷ Miles Driven

At a fuel price of $3.60 per gallon and an efficiency of 30 MPG:
$3.60 ÷ 30 = $0.1200 per mile (12.00 cents per mile)

3. Estimated fuel volume for a planned trip

When planning an upcoming trip, estimate the total gallons required by dividing trip distance by your measured MPG:

Trip Gallons = Planned Trip Miles ÷ MPG

For a planned 450-mile road trip at 30 MPG:
450 ÷ 30 = 15.00 US gallons

4. Estimated fuel cost for a planned trip

Multiply the required trip gallons by your local fuel price per gallon:

Trip Fuel Cost = Trip Gallons × Gas Price per Gallon
Trip Fuel Cost = (Planned Trip Miles ÷ MPG) × Gas Price per Gallon

Using 15 gallons at $3.60 per gallon:
15 × $3.60 = $54.00


MPG vs L/100 km: understanding the metric difference

While drivers in the United States measure fuel economy in miles per gallon (MPG), most other countries—including Canada, Australia, and European nations—measure fuel consumption in liters per 100 kilometers (L/100 km).

Fuel economy vs fuel consumption: an inverse relationship

The critical distinction between these two systems is directional:

  • MPG measures fuel economy: It tracks distance per unit of fuel. Higher is better. A car getting 40 MPG travels farther on a single gallon than one getting 25 MPG.
  • L/100 km measures fuel consumption: It tracks fuel volume per fixed distance. Lower is better. A car using 6.0 L/100 km requires less fuel to travel 100 km than a car requiring 10.0 L/100 km.

Because the two units are reciprocals of each other, the relationship between them is non-linear. Improving fuel economy from 15 MPG to 20 MPG saves substantially more gasoline over 10,000 miles than improving from 40 MPG to 45 MPG.

Exact unit conversion constants

International unit standards define the conversion values between US and metric measurements:

  • 1 US liquid gallon = 231 cubic inches = 3.785411784 liters
  • 1 international statute mile = 1,609.344 meters = 1.609344 kilometers

To convert between MPG and L/100 km:

L/100 km = (Gallons × 3.785411784 ÷ (Miles × 1.609344)) × 100

Dividing the constants produces the universal conversion factor:

3.785411784 ÷ 1.609344 × 100 ≈ 235.214583

Therefore:

  • L/100 km = 235.214583 ÷ MPG
  • MPG = 235.214583 ÷ (L/100 km)

Quick conversion table

US Miles per Gallon (MPG) Metric Consumption (L/100 km) Fuel Cost per 100 Miles (@ $3.60/gal) Typical Vehicle Category
15 MPG 15.68 L/100 km $24.00 Heavy-duty truck, commercial van
20 MPG 11.76 L/100 km $18.00 Full-size SUV, older pickup truck
25 MPG 9.41 L/100 km $14.40 Midsize crossover, V6 sedan
30 MPG 7.84 L/100 km $12.00 4-cylinder compact sedan
35 MPG 6.72 L/100 km $10.29 Subcompact car, small hatchback
40 MPG 5.88 L/100 km $9.00 Efficient highway commuter
45 MPG 5.23 L/100 km $8.00 Compact hybrid vehicle
50 MPG 4.70 L/100 km $7.20 Dedicated high-efficiency hybrid

Three worked examples from real driving scenarios

To see how these formulas function together, review three realistic scenarios computed using the gas mileage calculator library.

Scenario 1: Everyday commuter sedan (mixed city and highway)

A driver commutes to work in a midsize 4-cylinder sedan. At the start of the week, the driver fills the tank until the pump clicks and resets the trip odometer. At the next fill-up, the driver records:

  • Distance driven: 360.0 miles
  • Fuel pumped: 12.000 US gallons
  • Fuel price: $3.60 per gallon
  • Upcoming road trip: 450.0 miles to a weekend conference

Step-by-step calculations:

  1. Calculate MPG:
    360 miles ÷ 12 gallons = 30.00 MPG
  2. Convert to metric consumption:
    (12 × 3.785411784 ÷ (360 × 1.609344)) × 100 = 7.840486... ≈ 7.84 L/100 km
  3. Calculate fuel cost per mile:
    $3.60 ÷ 30 MPG = $0.1200 per mile (12.00 cents/mile)
  4. Estimate trip fuel consumption:
    450 miles ÷ 30 MPG = 15.00 US gallons
  5. Estimate trip fuel cost:
    15 gallons × $3.60 = $54.00

The driver achieves 30 MPG (7.84 L/100 km), spends 12 cents per mile on fuel, and budgets $54.00 for the upcoming 450-mile trip.

Scenario 2: Compact hybrid on a long highway journey

A driver takes an efficient compact hybrid on an interstate highway trip. Steady highway speeds and regenerative braking in congestion yield high efficiency:

  • Distance driven: 480.0 miles
  • Fuel pumped: 10.000 US gallons
  • Fuel price: $3.40 per gallon
  • Upcoming planned route: 600.0 miles across two states

Step-by-step calculations:

  1. Calculate MPG:
    480 miles ÷ 10 gallons = 48.00 MPG
  2. Convert to metric consumption:
    (10 × 3.785411784 ÷ (480 × 1.609344)) × 100 = 4.900303... ≈ 4.90 L/100 km
  3. Calculate fuel cost per mile:
    $3.40 ÷ 48 MPG = $0.070833... ≈ $0.0708 per mile (7.08 cents/mile)
  4. Estimate trip fuel consumption:
    600 miles ÷ 48 MPG = 12.50 US gallons
  5. Estimate trip fuel cost:
    12.50 gallons × $3.40 = $42.50

The vehicle delivers 48 MPG (4.90 L/100 km). Fuel costs approximately 7.08 cents per mile, requiring 12.5 gallons and $42.50 in gasoline for the 600-mile trip.

Scenario 3: Full-size SUV in stop-and-go driving with cargo

A family drives a full-size SUV carrying sports equipment and passengers through suburban traffic with frequent idling and stoplights:

  • Distance driven: 280.0 miles
  • Fuel pumped: 14.000 US gallons
  • Fuel price: $3.85 per gallon (premium fuel in an urban area)
  • Upcoming family vacation: 350.0 miles

Step-by-step calculations:

  1. Calculate MPG:
    280 miles ÷ 14 gallons = 20.00 MPG
  2. Convert to metric consumption:
    (14 × 3.785411784 ÷ (280 × 1.609344)) × 100 = 11.760729... ≈ 11.76 L/100 km
  3. Calculate fuel cost per mile:
    $3.85 ÷ 20 MPG = $0.1925 per mile (19.25 cents/mile)
  4. Estimate trip fuel consumption:
    350 miles ÷ 20 MPG = 17.50 US gallons
  5. Estimate trip fuel cost:
    17.50 gallons × $3.85 = $67.375 ≈ $67.38

The vehicle achieves 20 MPG (11.76 L/100 km). Operating the SUV costs 19.25 cents per mile in fuel, requiring 17.5 gallons and an estimated $67.38 for the 350-mile journey.


The multi-tank trap: how to average MPG correctly

A frequent mathematical mistake is calculating the simple arithmetic average of multiple MPG figures. Averaging separate MPG numbers without weighting by gallons introduces distortion because miles per gallon is a rate with fuel in the denominator.

The arithmetic average mistake

Suppose you drive two consecutive tanks:

  • Tank 1 (City driving): You drive 300 miles and consume 15 gallons (300 ÷ 15 = 20 MPG).
  • Tank 2 (Highway driving): You drive 300 miles and consume 10 gallons (300 ÷ 10 = 30 MPG).

If you calculate the simple average of the two ratings:
(20 + 30) ÷ 2 = 25.0 MPG

However, this result is mathematically incorrect. Look at the total physical quantities:

  • Total miles traveled: 300 + 300 = 600 miles
  • Total fuel consumed: 15 + 10 = 25 gallons

The true combined gas mileage is:
600 miles ÷ 25 gallons = 24.0 MPG

Because you burned 15 gallons at 20 MPG and only 10 gallons at 30 MPG, you spent 60% of your fuel at the lower efficiency rate. The true average is 24 MPG, not 25 MPG.

Rule for multi-tank averages: Always sum all miles driven and sum all gallons purchased across all fill-up receipts, then divide total miles by total gallons. Never average individual tank MPG figures directly.


Practical strategies to improve vehicle gas mileage

Once you know your baseline MPG, you can measure the impact of straightforward vehicle maintenance and driving habits:

  1. Maintain correct tire pressure: Under-inflated tires increase rolling resistance. The US Department of Energy estimates that fuel economy drops by roughly 0.2% for every 1 psi drop in pressure across all four tires. Check pressures monthly using the recommended psi listed on the driver's door jamb sticker, not the maximum psi molded onto the tire sidewall.
  2. Observe highway speed limits: Aerodynamic drag increases with the square of vehicle speed. Most passenger cars reach peak fuel efficiency between 45 mph and 60 mph. Cruising at 75 mph instead of 65 mph typically increases fuel consumption by 10% to 15%.
  3. Remove excess cargo and roof racks: Every additional 100 pounds of weight in your vehicle reduces fuel economy by roughly 1%. Empty rooftop cargo boxes, bike racks, and luggage carriers create substantial aerodynamic drag at highway speeds, cutting fuel efficiency by 5% to 20%.
  4. Accelerate smoothly and anticipate traffic: Aggressive driving with rapid acceleration and harsh braking wastes fuel. Anticipating traffic flow and coasting gently to red lights saves fuel by converting vehicle momentum into distance rather than dissipating it as brake heat.
  5. Minimize engine idling: Idling an engine consumes between 0.2 and 0.5 gallons of fuel per hour without moving the vehicle. If you anticipate waiting longer than 30 seconds (except in active traffic), turning off the engine saves fuel.

Frequently asked questions

What is considered good gas mileage for a car in the United States?
For modern gasoline-powered passenger vehicles, combined fuel economy above 30 MPG is considered good. Midsize crossover SUVs typically achieve 25 to 32 MPG, compact sedans deliver 30 to 38 MPG, and dedicated hybrid vehicles regularly achieve 45 to 55 MPG. Heavy-duty pickup trucks and large three-row SUVs generally average 16 to 22 MPG.

Why is my calculated MPG different from the car's dashboard display?
Dashboard trip computers calculate fuel consumption indirectly by tallying fuel injector pulse durations rather than measuring liquid volume in the tank. Digital displays are often calibrated slightly optimistically by vehicle manufacturers. Differences also arise from variations in gas pump shut-off sensitivity, tire wear altering odometer distance, and temperature fluctuations expanding or contracting fuel.

Can I calculate gas mileage if I only put in $20 of gas?
No. A partial fill-up does not establish a known reference level in your fuel tank. To measure fuel consumption accurately, the tank must be filled completely at the start to reset the measurement baseline, and filled completely again at the end so the pumped volume equals the exact amount burned between the two stops.

How do I calculate average gas mileage across multiple fill-ups?
Keep a running log of your odometer readings and fuel receipts. Sum the total miles driven across all intervals and sum the total gallons pumped across all receipts. Divide total miles by total gallons. Never calculate the simple average of individual MPG numbers, as doing so fails to weight the calculations by the volume of fuel burned.

How does running the air conditioning affect gas mileage?
Running the air conditioner places mechanical load on the engine through the AC compressor, reducing fuel economy by 5% to 15% depending on vehicle size, ambient temperature, and humidity. In city stop-and-go driving, rolling down windows is generally more efficient than running the AC. At highway speeds over 55 mph, open windows create aerodynamic drag, making air conditioning comparable to or more efficient than open windows.

Does driving 75 mph instead of 65 mph significantly increase fuel costs?
Yes. Aerodynamic resistance increases exponentially with speed. Cruising at 75 mph consumes approximately 10% to 15% more fuel than cruising at 65 mph. Over a 500-mile highway trip in a vehicle rated at 30 MPG at 65 mph (26 MPG at 75 mph), the higher speed burns about 2.6 additional gallons of gas, costing roughly $9.00 to $10.00 more while saving around 60 minutes.

What is the difference between US gallons and Imperial gallons in MPG?
A US liquid gallon is defined as 231 cubic inches (3.785 liters), whereas an Imperial gallon (used historically in the United Kingdom) is defined as 4.546 liters—roughly 20% larger. Consequently, an identical vehicle operating at 30 US MPG achieves approximately 36 Imperial MPG. Always verify whether a foreign fuel economy rating refers to US or Imperial gallons.

Why do Canada and Europe use L/100 km instead of MPG?
Liters per 100 kilometers (L/100 km) measures fuel consumption directly: the volume of fuel required to travel a standard distance. This metric aligns with the metric system and creates a linear scale for fuel consumption. In contrast, MPG is a reciprocal measure of fuel economy, which can mislead drivers about the financial benefits of upgrading between different efficiency tiers.

How can I estimate fuel costs for an upcoming road trip?
Divide the total round-trip distance in miles by your vehicle's expected highway MPG to find total gallons needed. Multiply that gallon estimate by the prevailing gas price along your travel corridor. You can verify and compare scenarios instantly using the gas mileage calculator.

Does tire pressure really affect vehicle fuel economy?
Yes. Tires naturally lose about 1 psi per month due to permeation and drop roughly 1 psi for every 10 degree Fahrenheit drop in ambient temperature. Driving on tires under-inflated by 5 to 7 psi increases rolling resistance, reducing fuel economy by 1% to 2% while accelerating tread wear and increasing braking distances.

Next, compare monthly running costs with the tip calculator for trips out and the percentage calculator to see how much a gas price change moves your budget. For another everyday math walkthrough, read percent change formula.

Looking for other tools?

Explore ToolSphere Homepage →