ThisCalculator

Sports and fitness

Car Gas Mileage Calculator: How to Use It

Updated · Standard formula, shown below

Gas mileage 25.00 MPG
Fuel consumption
9.41 L/100km
Result
Distance
300 mi
You entered
Fuel used
12 gal
You entered

Car Gas Mileage Calculator: How to Use It

This calculator works out your car’s fuel economy in miles per gallon (MPG) or liters per 100 kilometers (L/100 km). You enter the distance you traveled and the amount of fuel you used to refill the tank, and it returns your average gas mileage for that trip. It also shows the equivalent fuel consumption in the other common unit system, so you can compare with official figures or other vehicles.

Formula

The core formula is simple: MPG = distance traveled ÷ fuel used. In symbols:

MPG = D / F

  • D = distance traveled, in miles (mi)
  • F = fuel used, in US gallons (gal)

To convert to liters per 100 km (the metric standard), use:

L/100km = (F × 3.78541) / (D × 1.60934) × 100

Where 3.78541 is the number of liters in a US gallon, and 1.60934 is the number of kilometers in a mile. The calculator handles both conversions automatically.

Worked Example

Using the default values from the calculator: you drive 300 miles and use 12 gallons of fuel.

  1. Divide distance by fuel: 300 ÷ 12 = 25.00 MPG
  2. Convert to L/100km: (12 × 3.78541) ÷ (300 × 1.60934) × 100 = 45.4249 ÷ 482.802 × 100 = 9.41 L/100km

The calculator shows 25.00 MPG and 9.41 L/100km as the headline answers. That matches the formula exactly.

How to Measure Your Own Gas Mileage

To get a reliable number, follow the “full tank to full tank� method:

  • Fill the tank completely at a gas station and note the odometer reading (or reset the trip meter).
  • Drive normally until you need fuel again.
  • Fill the tank completely again. The amount of fuel the pump shows is the fuel used.
  • Note the new odometer reading. Subtract the first reading to get the distance traveled.
  • Enter those two numbers into the calculator.

For best accuracy, use the same pump and the same filling technique (e.g., wait for the pump to click off once). This reduces variation from different pumps or topping off.

Why Your Car’s Display May Differ

Many modern cars show an instant or average MPG figure on the dashboard. That number often comes from the engine computer’s estimate of fuel flow, not from actual fuel consumed. It can be optimistic by 5–10% compared to the manual calculation. The manual method above is the most accurate because it measures real fuel purchased and real distance traveled.

Also, your car’s official EPA or WLTP rating is measured in a laboratory under standardized conditions. Real-world driving includes traffic, hills, weather, and driving style, so your actual mileage will usually be lower than the sticker, especially in winter or in stop-and-go city driving.

Common Mistakes and How to Avoid Them

  • Mixing units: If you use kilometers and liters, the MPG result will be wrong. The calculator expects miles and US gallons. If your fuel pump dispenses in liters, convert to gallons first (1 US gallon = 3.78541 liters) or use the L/100km output instead.
  • Not filling the tank completely: If you don’t fill to the same level at both fill-ups, the fuel used will be off. Always fill until the pump clicks off.
  • Short trips: A single short trip can give a very skewed number. Measure over several hundred miles or a few tanks to get a representative average.
  • Rounding too early: If you round the distance or fuel to whole numbers, the result can shift by a few percent. Keep the decimals in your inputs.

What Affects Gas Mileage

Many factors can change your fuel economy from one tank to the next:

  • Speed: Fuel economy typically peaks around 45–55 mph (70–90 km/h) and drops sharply above 60 mph (100 km/h) due to aerodynamic drag.
  • Driving style: Hard acceleration and heavy braking can reduce mileage by 15–30% on the highway.
  • Tire pressure: Under-inflated tires increase rolling resistance. Check monthly.
  • Vehicle load: Extra weight, roof racks, and cargo boxes all reduce efficiency.
  • Weather: Cold weather, rain, and wind all increase fuel use.
  • Fuel quality: Ethanol blends can lower MPG slightly compared to pure gasoline.

If your mileage suddenly drops by a large amount, it could indicate a mechanical issue like a faulty oxygen sensor, dirty air filter, or a stuck brake.

How to Improve Your Gas Mileage

Simple habits can make a noticeable difference over a year:

  • Drive at a steady speed and use cruise control on the highway.
  • Avoid idling; turn off the engine if you’ll be stopped for more than a minute.
  • Remove unnecessary weight from the trunk.
  • Keep tires inflated to the pressure listed in the owner’s manual.
  • Combine errands into one trip to avoid cold starts.
  • Use the recommended grade of motor oil.

Improving your MPG from 20 to 25 (a 25% gain) means you use 20% less fuel for the same distance. Over 12,000 miles a year, that saves about 120 gallons of gas.

Frequently Asked Questions

How do I calculate gas mileage for a trip?

Record the odometer reading at the start and end of the trip. Subtract the start from the end to get the distance. Then divide that distance by the number of gallons of fuel you added at the end of the trip. That gives your MPG for that trip.

What is a good gas mileage number?

For a typical car in the US, 25–30 MPG is considered good. Hybrids and small compacts can reach 40–50 MPG, while large SUVs and trucks often get 15–20 MPG. The official EPA rating for your specific vehicle is a better benchmark than a general number.

Is it better to use MPG or L/100km?

MPG is common in the US and UK, while L/100km is used in most of Europe, Canada, and Australia. MPG is higher when the car is more efficient; L/100km is lower when the car is more efficient. Both are valid; just be consistent when comparing vehicles.

Why does my car’s computer show a different MPG than my manual calculation?

The computer estimates fuel flow based on engine sensors and may not account for fuel used during idling or fuel that evaporates. Manual calculations using actual fuel purchased are more accurate. Differences of 5–10% are normal.

Can I use this calculator for diesel or electric cars?

Yes, for diesel the same formula works because diesel is measured in gallons or liters. For electric cars, the equivalent is miles per kWh (kilowatt-hour), which is not the same. You would need a different calculator for EVs.

Related

Formula used
in d | Distance | mi | 300 | 0
in f | Fuel used | gal | 12 | 0
out mpg | Gas mileage | MPG | d / f | 2
out lp100k | Fuel consumption | L/100km | (f * 3.78541) / (d * 1.60934) * 100 | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.