The basic formula: miles driven divided by gallons used

Gas mileage is calculated by dividing the number of miles you drove by the number of gallons of fuel you put in the tank. That's it. If you drove 300 miles and used 10 gallons, your mileage is 30 miles per gallon (mpg). The math is straightforward; the accuracy depends on how carefully you measure both numbers.

Most people calculate mileage to see whether their car is performing as expected, to track fuel costs, or to spot a problem before it becomes expensive. A sudden drop in mileage—say, from 28 mpg to 22 mpg over a few weeks with no change in how you drive—often signals something wrong: a clogged air filter, worn spark plugs, low tire pressure, or an engine issue that needs attention.

Key Takeaways

  • Divide total miles driven by gallons of fuel added to find your actual mpg; the formula is miles ÷ gallons = mpg.
  • Fill your tank completely at the start and end of each calculation period to get the most accurate reading of fuel consumed.
  • Track mileage over at least one full tank of gas, because short trips and varied driving conditions can skew a single calculation.
  • A drop of more than 10 percent in your usual mileage often means a maintenance issue—low tire pressure, a dirty air filter, or engine problems—that costs less to fix early.
  • Your car's onboard computer estimates mpg in real time, but hand calculations using the pump and odometer are more reliable for spotting trends.

How to measure miles driven accurately

Write down your odometer reading when you fill up your tank. The odometer is the dial on your dashboard that shows total miles the car has traveled since it was new. Fill the tank completely—until the pump clicks off—and note the exact reading. Do the same thing at your next fill-up. Subtract the first reading from the second reading. That number is the miles you drove on that tank.

The reason you fill up completely both times is that partial fill-ups introduce guesswork. If you fill halfway one time and three-quarters the next, you cannot know how many gallons you actually burned. Complete fill-ups remove that uncertainty. Some drivers keep a small notebook in the car or use their phone to photograph the odometer and pump display; either method works as long as you record the numbers before you forget them.

How to measure fuel consumption accurately

When you fill your tank, note how many gallons the pump shows. Most pumps display the total in large numbers on the screen. Write this down. At your next fill-up, note the gallons again. The difference between the two numbers is how much fuel you consumed during those miles.

Some pumps round to the nearest tenth of a gallon, and some show hundredths. Either is fine for home calculation. The key is using the same pump display method both times—do not mix pump readings with credit card receipts or guesses, because they may not match exactly. If you want the most precise measurement, fill at the same station and pump both times, though this is not required.

Doing the calculation step by step

Here is the process in order. First, record your odometer reading and gallons pumped at fill-up number one. Drive normally for at least one full tank—ideally two weeks or more of regular driving. At fill-up number two, record the odometer reading and gallons pumped again.

Subtract your first odometer reading from your second. This is miles driven. Subtract your first gallon amount from your second. This is gallons consumed. Divide miles by gallons. The result is your mpg. Example: odometer went from 45,230 to 45,530 (300 miles driven). You pumped 10 gallons at the second fill-up. 300 ÷ 10 = 30 mpg.

Write down this number. Do the same calculation at your next few fill-ups. After three or four calculations, you will have a clear picture of your car's actual fuel economy under your normal driving conditions. This baseline is what you compare against later if you suspect a problem.

Why one tank is not enough data

A single calculation can be misleading because driving conditions change. One tank might include mostly highway miles (which use less fuel) while the next includes city driving with traffic and stops (which uses more). Weather, tire pressure, how heavily loaded your car is, and even how aggressively you accelerate all shift fuel economy from tank to tank.

Calculate mileage over at least three to four fill-ups before you decide whether your car is performing normally or poorly. Once you have that average, you have a real baseline. Then, if your next calculation drops significantly below that average—say, you normally get 28 mpg but suddenly get 24 mpg—that is a signal to check your tire pressure, air filter, and engine condition.

What your car's onboard computer shows versus hand calculation

Most modern cars display an estimated mpg on the dashboard screen. This number comes from the car's computer, which monitors fuel flow and distance in real time. It is convenient, but it is not always accurate. The computer's estimate can drift by 2 to 5 mpg depending on the car's sensors, driving style, and how the manufacturer programmed the calculation.

Your hand calculation—using the pump and odometer—is more reliable for spotting real changes in your car's performance. The computer estimate is useful for moment-to-moment awareness while driving, but if you want to know whether your fuel economy has actually dropped, the pump-and-odometer method is the one to trust. Use both: watch the dashboard for awareness, but verify trends with hand calculations.

Spotting problems through mileage changes

Once you know your baseline mileage, watch for drops. A loss of 10 percent or more—from 28 mpg to 25 mpg or lower—usually means something is wrong. The most common causes are low tire pressure (which increases rolling resistance), a clogged engine air filter (which restricts airflow and makes the engine work harder), worn spark plugs, or a failing oxygen sensor.

Low tire pressure is the easiest to check yourself: use a tire pressure gauge at a gas station or at home, and compare the reading to the pressure listed on the driver's door jamb or in your owner's manual. If tires are low, inflate them and recalculate mileage at your next fill-up. If mileage improves, that was the problem. If it does not improve, or if tires are correct, have a mechanic scan the engine for fault codes. Many shops do this for free or a small fee, and it often points directly to the issue.

Frequently Asked Questions

Should I reset my trip odometer each time I fill up?

You do not have to, but it makes the math easier. If you reset the trip odometer to zero at fill-up one, it will show exactly how many miles you drove by the time you fill up again. Then you just divide that trip mileage by the gallons pumped. Either method works; use whichever feels simpler to you.

Does the type of driving affect my mileage calculation?

Yes. Highway driving typically yields better mileage than city driving because you are not stopping, accelerating hard, or idling. If you want to know your car's real-world mileage, calculate it over mixed driving—some highway, some city, some parking lot stops. This gives you a number that reflects how you actually drive.

What if my mileage calculation seems way off from what the manual says?

The manufacturer's estimate assumes ideal conditions: steady highway speed, new engine, proper maintenance, and good weather. Real-world mileage is usually lower. If your calculation is much lower than the manual—say, 15 mpg when the manual says 25—check tire pressure, air filter condition, and have the engine scanned for faults. Severe drops signal a real problem.

Can I calculate mileage from a partial tank?

You can, but it is less accurate. If you fill halfway at one stop and three-quarters at the next, you are guessing at the actual gallons consumed. For the most reliable number, fill completely both times. If you must use partial fill-ups, at least use the same pump at the same station both times to minimize variation.

How often should I calculate my gas mileage?

Once every month or two is enough to spot trends. If you suspect a problem, calculate at your next two or three fill-ups to confirm the drop is real and not just a one-time variation. After that, you can go back to monthly checks unless something changes in how your car drives or sounds.