287 miles on 9.6 gallons is 29.90 mpg
MPG, or gas mileage, is the miles you drove divided by the gallons of gas you burned. Fill the tank, drive 287 miles, and the next fill-up takes 9.6 gallons: 287 ÷ 9.6 = 29.895…, so your car got 29.90 mpg. The same numbers in metric are 235.215 ÷ 29.90 = 7.87 L/100 km. FuelEconomy.gov, the U.S. Department of Energy and EPA site, describes the same method: fill the tank completely, note the odometer, and later divide the miles driven by the gallons it took to fill the tank again.
The example on the calculator above uses three fill-ups: 287 miles on 9.6 gallons, 251 miles on 7.9 gallons and 312 miles on 11.2 gallons. Together that is 850 miles on 28.7 gallons, an average of 850 ÷ 28.7 = 29.62 mpg. If the window sticker says 32 mpg combined, you are getting 92.6% of it, 2.38 mpg short. At $4.354 a gallon for regular, that is $0.147 a mile and $124.96 for the 28.7 gallons. The sections below cover why to measure, the steps, how to average several fill-ups, what to do when you only know the dollar amount, mpg conversions, the label gap, fuel cost per mile and common mistakes.
Why measure your real MPG?
- Checking on the car: if your usual commute suddenly returns noticeably fewer miles per gallon, it's a prompt to look at tire pressure, what's in the trunk and when the car was last serviced. Compare an average of several fill-ups with your earlier average, not one tank against one tank.
- Seeing what a driving change does: FuelEconomy.gov says aggressive driving (speeding, rapid acceleration and braking) can lower gas mileage roughly 15% to 30% at highway speeds and 10% to 40% in stop-and-go traffic. On a car that gets 32 mpg, 15% to 30% means 27.20 down to 22.40 mpg. Measure a few tanks before and after you change habits to see your own number.
- Budgeting gas: the label figure comes from standardized tests and may not match the way you drive, so a trip budget built on it can miss. Take your measured mpg to the gas cost calculator for a budget that matches your car.
- Judging the dashboard average: reset the trip computer at a full tank, then compare it with this calculator's result at the next fill-up to see whether the display runs high or low.
How to measure MPG with the full-tank method
The simplest way is to treat the time between two full tanks as one stretch. FuelEconomy.gov's own calculator page gives the same two steps: write down the odometer after filling the tank completely, then divide the miles driven by the gallons it took to fill the tank next time. Its worked example is 356.2 miles divided by 13.5 gallons, or 26.4 miles per gallon.
| Step | What to do | Example |
|---|---|---|
| 1. First full tank | Fill until the pump clicks off, then reset the trip meter or write down the odometer. | Odometer 48,210 |
| 2. Drive normally | Use at least half the tank on your usual driving. | Commute, errands |
| 3. Second full tank | Fill the same way and note the gallons on the pump. | 9.6 gal |
| 4. Miles driven | Read the trip meter or subtract the two odometer readings. | 48,497 − 48,210 = 287 mi |
| 5. Divide | miles ÷ gallons | 287 ÷ 9.6 = 29.90 mpg |
What matters is stopping the pump at the same point both times. Topping off after the click makes this stretch's gallons larger and the next stretch's smaller. The more gas you put in, the less one extra splash matters, so measuring after you've used at least half a tank gives steadier numbers.
Averaging several fill-ups
With more than one fill-up, don't add up the mpg figures and divide by the count. Add all the miles, add all the gallons, and divide the first total by the second. On the calculator, press "Add a stretch" for each fill-up and it averages that way.
| Stretch | Miles | Gallons | MPG |
|---|---|---|---|
| Stretch 1 | 300 mi | 10 gal | 30.00 mpg |
| Stretch 2 | 300 mi | 15 gal | 20.00 mpg |
| Simple average of the two (wrong) | n/a | n/a | 25.00 mpg |
| Combined average (right) | 600 mi | 25 gal | 24.00 mpg |
The simple average comes out too high because it counts the 10-gallon stretch and the 15-gallon stretch as if they burned the same amount of gas. In fact you drove 600 miles on 25 gallons, which is 24 miles per gallon. When the stretches are alike, the two methods land close: the three fill-ups in the calculator example average 29.84 mpg the simple way and 29.62 mpg the right way. Mix long highway runs with short city hops and the gap widens.
If you added a few gallons in the middle of a stretch, don't treat that as its own stretch. Go from the last full tank to the next full tank, and add every gallon you put in between.
When you only know the dollar amount
If you paid by dollar amount and didn't check the gallons, switch the entry to "Amount paid" and add the price per gallon. The calculator divides the amount by the price to get gallons. Say you spent $50.00 at $4.354 a gallon: 50 ÷ 4.354 = 11.48 gallons, and if you drove 330 miles in that time, that's 28.74 mpg.
The price per gallon changes by station and day, and a fuel-rewards discount makes the amount you paid smaller than the gas you got. Use the amount and price on the same basis, such as both before any discount, and when the receipt prints the gallons, use that number.
Converting mpg to L/100 km, km/L and UK mpg
U.S. drivers use miles per gallon. Much of the world uses liters per 100 kilometers, some countries use kilometers per liter, and the UK quotes miles per imperial gallon. NIST SP 811 gives the factors: 1 mile = 1.609344 km, 1 U.S. gallon = 3.785411784 L, 1 UK gallon = 4.54609 L. That makes L/100 km = 235.215 ÷ mpg and km/L = mpg × 0.4251437.
| mpg (U.S.) | L/100 km | km/L | mpg (UK) |
|---|---|---|---|
| 20 | 11.76 | 8.50 | 24.02 |
| 25 | 9.41 | 10.63 | 30.02 |
| 30 | 7.84 | 12.75 | 36.03 |
| 35 | 6.72 | 14.88 | 42.03 |
| 40 | 5.88 | 17.01 | 48.04 |
| 50 | 4.70 | 21.26 | 60.05 |
A UK gallon is about 1.2 times a U.S. gallon, so the same car shows about 20% more mpg when quoted in UK gallons: 29.62 U.S. mpg is 35.57 UK mpg. When you compare a British review with a U.S. one, check which gallon it uses first. L/100 km runs the opposite way from mpg: a smaller number means less fuel, so 7.94 L/100 km is better than 9.41.
Why your MPG differs from the label
FuelEconomy.gov explains that EPA fuel economy estimates are based on standardized tests designed to reflect "typical" driving conditions and driver behavior, but several factors can affect MPG significantly. It adds that the ratings are a useful tool for comparing the fuel economies of different vehicles but may not accurately predict the average MPG you will get. For the combined figure on the label, the site says it is a weighted average of City and Highway MPG values, with City weighted 55% and Highway 45%.
So treat the "percent of label" result as a rough gauge rather than a verdict. In the example, 29.62 mpg against a 32 mpg label is 92.6%. A car that scores well below its label on a few tanks of mixed driving is worth a look at tire pressure, cargo and driving habits, but this number alone does not show that anything is wrong with it.
The dashboard's average can also differ from your fill-up records, because the car calculates it on its own with its own start point. To compare, reset it at a full tank and read it at the next full tank.
Gas cost per mile from your MPG
Cost per mile is the price per gallon divided by mpg. The table uses the EIA U.S. weekly averages for the week of October 5, 2026: regular $4.354, premium $5.400 and diesel $6.199 a gallon. Cars that run on diesel or premium don't usually get the same mpg as a regular-gas car, so each row only shows what a different fuel price does at the same mpg.
| MPG | Regular | Premium | Diesel |
|---|---|---|---|
| 20 mpg | $0.218 | $0.270 | $0.310 |
| 25 mpg | $0.174 | $0.216 | $0.248 |
| 30 mpg | $0.145 | $0.180 | $0.207 |
| 35 mpg | $0.124 | $0.154 | $0.177 |
| 40 mpg | $0.109 | $0.135 | $0.155 |
| 50 mpg | $0.087 | $0.108 | $0.124 |
Going from 25 to 30 mpg cuts regular gas from $0.174 to $0.145 a mile. If you drove 12,000 miles in a year (an example figure, not an average), that is $2,089.92 against $1,741.60, a saving of $348.32. To price your next trip with the mpg you measured, use the "Estimate gas cost at this mpg" button under the result, which carries your figure over to the gas cost calculator.
Common mistakes
- Using the gallons from the start of the stretch: the gallons for a stretch are the ones you pump at the end, when you fill up again. The gallons from the first fill-up powered the stretch before it.
- Treating a partial fill as a stretch: if the tank wasn't full when the stretch ended, the gas you added doesn't match the gas you burned. Run the stretch on to the next full tank.
- Averaging the mpg figures: the average is total miles ÷ total gallons. 300 miles on 10 gallons and 300 miles on 15 gallons average 24 mpg, not 25.
- Typing dollars in the gallons field: entering a $75 payment as 75 gallons for 300 miles gives 4.00 mpg, and the calculator flags results outside about 5 to 118 mpg. To enter the payment, switch to "Amount paid".
- Judging by one short stretch: over 50 miles, a pump that stops half a gallon differently turns 2.0 gallons (25.00 mpg) into 2.5 gallons (20.00 mpg). Combine short records.
Limits and cautions
- The calculator works with the fill-up records you enter and doesn't store them. To reopen a record, keep the address from "Copy link"; your entries live only in the address and are not sent to a server.
- It isn't built for electric cars (kWh per 100 miles or MPGe) or for hydrogen. A plug-in hybrid divides all the miles, including those driven on charged electricity, by gallons, so the result overstates how efficient the gas engine is.
- Pump cut-off, weather, cargo and air conditioning change the number from one stretch to the next on the same car. One stretch tells you about that stretch.
- The percent of label shows the gap between test conditions and your roads. It does not diagnose a fault.
- The price buttons are the EIA U.S. weekly averages, not live prices at your pump. Type your own price if it differs.
As of The default fuel prices are the EIA's U.S. weekly averages for the week of October 5, 2026 (regular $4.354, premium $5.400, diesel $6.199 per gallon), checked on October 14, 2026 when the EIA page listed October 14 as the next release date. The conversion factors are NIST SP 811 Appendix B.9 values. The method, the label weighting and the driving-habit ranges are as published on FuelEconomy.gov.
Sources
- 01U.S. Energy Information Administration: Gasoline and Diesel Fuel UpdateWeek of October 5, 2026, U.S. average, all taxes included: regular $4.354, diesel $6.199 per gallon; premium $5.400 from the weekly retail table
- 02NIST Special Publication 811, Appendix B.9: Factors for units listed by kind of quantity1 mile = 1.609344 km, 1 U.S. gallon = 3.785411784 L, 1 UK gallon = 4.54609 L; mile per gallon (U.S.) to km/L 0.4251437; L/100 km = 235.215 ÷ mpg
- 03FuelEconomy.gov (U.S. DOE and EPA): Calculate Your MPGFill the tank completely and write down the odometer; divide the miles driven by the gallons it took to fill the tank (example: 356.2 miles divided by 13.5 gallons equals 26.4 miles per gallon)
- 04FuelEconomy.gov: how the gasoline fuel economy label is calculatedCombined fuel economy is a weighted average of City and Highway MPG, weighting City 55% and Highway 45%
- 05FuelEconomy.gov: why your MPG can differ from EPA estimatesEPA estimates come from standardized tests reflecting "typical" driving; the ratings are useful for comparing vehicles but may not accurately predict the average MPG you will get
- 06FuelEconomy.gov: Driving More EfficientlyAggressive driving can lower gas mileage roughly 15% to 30% at highway speeds and 10% to 40% in stop-and-go traffic
Frequently asked questions
How do you calculate MPG?
Divide the miles you drove by the gallons you used. If you drove 287 miles and the next full tank took 9.6 gallons, that is 287 ÷ 9.6 = 29.90 mpg. In metric the same trip is 235.215 ÷ 29.90 = 7.87 L/100 km.
How do I get the average MPG of several fill-ups?
Add all the miles, add all the gallons and divide the first by the second. Don't average the mpg figures. 300 miles on 10 gallons (30.00 mpg) and 300 miles on 15 gallons (20.00 mpg) give 600 ÷ 25 = 24.00 mpg, not the simple average of 25.00.
Can I calculate MPG if I only know how many dollars I spent?
Yes, if you know the price per gallon. Switch the entry to amount paid and add the price. $50.00 at $4.354 a gallon is 50 ÷ 4.354 = 11.48 gallons, and 330 miles on that gas is 28.74 mpg. When the receipt shows gallons, that number is more exact.
What if I didn't fill the tank all the way?
Don't use that fill-up's gallons by themselves. If you only added a little gas in the middle, don't count it as its own stretch. Go from one full tank to the next full tank, and add all the gallons you put in between.
My MPG is below the label. Is something wrong with the car?
This number alone can't tell. EPA estimates come from standardized tests designed to reflect typical driving, so real roads, speed, weather and cargo move the result. In the example, 29.62 mpg against a 32 mpg label is 92.6%, 2.38 mpg lower. Look at the average across several tanks.
How do I convert mpg to L/100 km and km/L?
L/100 km is 235.215 ÷ U.S. mpg, and km/L is mpg × 0.4251437. At 30 mpg that is 7.84 L/100 km, 12.75 km/L and 36.03 UK mpg. A UK gallon is larger than a U.S. one, so check which gallon a review uses.
Why does my dashboard MPG differ from this result?
The car works out the dashboard figure itself, with its own start point and method. To compare, reset it at a full tank, read it at the next full tank, and put the result next to this calculator's number.
How do I find the gas cost per mile?
Divide the price per gallon by your mpg. At 30 mpg and $4.354 for regular (EIA U.S. average, week of October 5, 2026), that is $0.145 a mile, or $145.13 for 1,000 miles. Enter a price in the calculator to see it for your own mpg.