Skip to content
TheCalcUniverse

Gas Mileage Calculator — Quick & Accurate Online Calculator & Guide

Calculate your fuel economy in MPG or L/100km using odometer readings or trip distance. Free online calculator with formula guide and step-by-step results.

✓ Tested formula & cited sources Formula verified 2026-01-15 Runs in your browser — inputs never sent anywhere

See it worked out

Example — Previous Odometer Reading 50000, Current Odometer Reading 50500, Trip Distance 300, Fuel Added 12.5:

Fuel Economy (MPG)

40.0 MPG

MPG

40.0 MPG

L/100km

5.9 L/100km

MPG (Imperial)

48.0 MPG (Imp)

Trip Distance

500.0 miles

Fuel Used

12.50 gallons

Cost Per Mile

$0.09/mile

Cost per 100 miles

$8.75

Annual Fuel Cost

At 12,000 mi/year: $1050.00

Annual Fuel Cost (raw)

1050

The formula

MPG = Miles ÷ Gallons | L/100km = 235.215 ÷ MPG

D
Distance
F
Fuel Amount
MPG
Miles Per Gallon
L/100km
Liters per 100 km

Worked example — Previous Odometer Reading 50000, Current Odometer Reading 50500, Trip Distance 300, Fuel Added 12.5

Fuel Economy (MPG) = 40.0 MPG

Full explanation ↓

How Gas Mileage Works

MPG = Miles ÷ Gallons | L/100km = 235.215 ÷ MPG

Fuel economy measures how efficiently a vehicle uses fuel. MPG (miles per gallon) is the US standard. L/100km (liters per 100 kilometers) is used internationally. Lower L/100km means better efficiency.

D
DistanceDistance traveled between fill-ups (miles or kilometers).
F
Fuel AmountFuel consumed during the trip (gallons or liters).
MPG
Miles Per GallonDistance per unit of fuel. Higher is better.
L/100km
Liters per 100 kmFuel needed to travel 100 km. Lower is better.
Fuel economy is calculated by dividing the distance traveled by the fuel consumed.

How to Use

  1. Choose between odometer readings or direct trip distance entry.
  2. Enter your odometer readings (or trip distance) and fuel added.
  3. Select distance and fuel units (mi/gal or km/L).
  4. Optionally enter fuel price for cost analysis.
  5. Review your fuel economy, costs, and efficiency rating.

Understanding the Result

Fuel economy is calculated by dividing the distance traveled by the fuel consumed. For accurate results, fill your tank completely, reset your trip odometer, drive normally, then fill up again at the same pump. Use the exact gallons pumped and miles driven. To convert between MPG and L/100km: L/100km = 235.215 ÷ MPG. The imperial gallon (UK/Canada) is 1.201 times larger than the US gallon, so MPG(Imp) = MPG(US) × 1.201. Practical example: you drive 320 miles between fill-ups and pump 12.5 gallons. Your fuel economy is 320 / 12.5 = 25.6 MPG. In L/100km: 235.215 / 25.6 = 9.2 L/100km. In Imperial MPG: 25.6 × 1.201 = 30.7 MPG Imp. At $3.50/gallon, your cost per mile is (12.5 × $3.50) / 320 = $0.137/mile, your annual fuel cost at 12,000 miles/year would be $1,644. Edge cases: for accurate MPG tracking, always use the same pump and fill to the same automatic shutoff point — different pumps may shut off at different levels. Temperature affects fuel density: gasoline pumped on a hot day contains less energy per gallon because it expands. A 20°F temperature difference can change actual fuel volume by about 1%. For hybrid vehicles, MPG calculations can be misleading because the electric motor assists at low speeds, making short trips appear very efficient while highway MPG may be lower. For plug-in hybrids, MPGe (miles per gallon equivalent) is used: 1 gallon of gasoline = 33.7 kWh of electricity. If a PHEV travels 30 miles on electric (using 10 kWh) and 30 miles on gas (using 1 gallon), the effective MPGe = 60 / (10/33.7 + 1) = 60 / 1.297 = 46.3 MPGe. For EVs, efficiency is measured in miles per kWh (typically 3-4 mi/kWh for modern EVs) or kWh/100 miles.

Frequently Asked Questions

How do I get the most accurate MPG measurement?
Fill your tank completely, reset the trip odometer, drive normally for at least 100 miles, then fill up at the same pump. Divide the miles driven by the gallons pumped. Repeat over several tanks for a more accurate average.
What is a good MPG?
For modern cars: 25-30 MPG is good, 35-40 MPG is very good, and 45+ MPG is excellent. SUVs and trucks typically get 15-25 MPG. Electric vehicles are measured in miles per kWh (typically 3-4 mi/kWh).
Why does my real-world MPG differ from the EPA rating?
EPA ratings come from standardized lab tests. Real-world driving conditions like traffic, weather, terrain, speed, acceleration patterns, tire pressure, and cargo weight all affect fuel economy. It is normal to see 10-20% lower MPG than the EPA rating.
How do I convert MPG to L/100km?
Divide 235.215 by the MPG value. For example, 30 MPG = 235.215 ÷ 30 = 7.84 L/100km. The calculator shows both units automatically.
How do I track fuel economy for a plug-in hybrid (PHEV) accurately?
PHEV tracking is more complex because the vehicle operates in three modes: all-electric, hybrid, and gas-only. The most accurate method is to track total miles driven divided by total gasoline consumed over at least 500-1,000 miles, treating the electric miles as "free" in terms of gas consumption. However, this inflates the apparent MPG. The EPA uses a blended metric: MPGe (miles per gallon equivalent), where 33.7 kWh of electricity is treated as one gallon-equivalent of energy. To calculate true energy cost: record the kWh of electricity consumed from charging plus the gallons of gasoline used. Then compute total energy cost = (kWh × electricity rate) + (gallons × gas price). Divide total miles by total cost for cost-per-mile, which is more useful than MPG for PHEV owners. For short daily commutes within the electric range, a PHEV might achieve 100+ MPGe, while on long highway trips running purely on gas, it achieves only the gas engine's MPG (typically 35-45 MPG for a Prius Prime). Many PHEV drivers find that their annual gas consumption is 70-90% less than a conventional car if they charge daily and drive fewer miles than the electric range each day.
Was this calculator helpful?
Cite this calculator

TheCalcUniverse. "Gas Mileage Calculator — Quick & Accurate Online Calculator & Guide." TheCalcUniverse, 2026, https://thecalcuniverse.com/automotive/gas-mileage-calculator/. Accessed July 24, 2026.

Embed this calculator on your site

Free to embed. Paste this into any HTML page — it stays up to date automatically.

Open embed ↗

You may also like

Guides that use this calculator