Fill the tank all the way up twice in a row. Enter the odometer reading at each fill-up and the amount of fuel you put in this time. The calculator finds your real-world fuel economy with the fill-up method.
Table of Contents
-
What you can do on this page
-
What is this calculation used for?
-
How to Use
-
Formula
-
Symbols and terms
-
Good to know before you start
-
How to calculate it in Excel
-
How to calculate it in Google Sheets
-
How to calculate it in Python
-
How to write it in LaTeX and other math languages (copy and paste)
-
How to have ChatGPT do the calculation
-
DataChef Features
-
Related Features
-
NumberChef Calculators List
What you can do on this page
- Enter the odometer readings from your last fill-up and this one, plus the gallons you put in, and you get your real-world mpg on the spot (the fill-up method)
- The result is shown both in mpg (miles per gallon) and in gallons per 100 miles, the two numbers on the EPA fuel economy label. Switch "Units" to Metric to get km/L and L/100km instead
- Enter the gas price ($ per gallon, optional), and you also get the cost of the fill-up and the gas cost per mile
- A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
What is this calculation used for?
The EPA rating on the window sticker is measured under set test conditions, so your real-world fuel economy is often lower, depending on how and where you drive. Once you measure your own mpg with the fill-up method, you can estimate your monthly gas bill and trip costs with your car's true numbers.
All you do is write down the odometer reading and the gallons at each fill-up, so anyone can keep it up without special tools. Many fuel-tracking apps work the same way.
Avoiding hard starts and quick acceleration, keeping your tires at the right pressure, taking extra weight out of the car: if you track your mpg with the fill-up method, you can see the effect of these habits in numbers.
For example, if you drive 12,000 miles a year and raise your real-world fuel economy from 24 mpg to 26 mpg, the gas you use drops from 500 gallons to about 461.5 gallons, about 38.5 gallons less. At $3.20 a gallon, that saves about $123 a year.
If your car usually gets about 25 mpg and suddenly drops below 21 mpg without any change in how you drive, it may be a sign of low tire pressure or an engine problem.
A fuel economy record cannot tell you what is broken, but it is a simple health check that gives you a reason to take the car in for an inspection.
At 25 mpg and $3.20 a gallon, each mile costs about $0.128 in gas (about 13 cents). A 20-mile commute each way is 40 miles a day, about $5.12, or about $102.40 for 20 workdays a month. Just multiply the miles by 12.8 cents.
Knowing "how much per mile" makes it much easier to compare driving with public transit and to budget for transportation.
In trucking, delivery, sales and other jobs that depend on driving, companies track the fuel economy of each vehicle from fill-up records and use it as basic data for fuel budgets and cost calculations.
For example, a delivery van that is driven 3,000 miles a month at 15 mpg uses 200 gallons, about $640 a month at $3.20 a gallon. A fuel economy record helps not only with estimating expenses but also with deciding when to replace a vehicle.
Formula
Symbols and terms
Symbols
| \(b\) | The current odometer reading (miles), shown when you filled up this time. |
| \(a\) | The previous odometer reading (miles), shown when you filled up last time. |
| \(d\) | Distance driven (miles). How far you drove from the last fill-up to this one, found with \(b - a\). It is the first letter of "distance". |
| \(F\) | Gallons added this time. With the fill-up method, this equals the gas you used since the last fill-up. It is the first letter of "fuel". |
| \(e\) | Real-world fuel economy (mpg). How many miles you actually drove on 1 gallon of gas. It is the first letter of "efficiency". |
| \(e_{100}\) | Fuel economy in gallons per 100 miles, the gas needed to drive 100 miles. It is found with \(100 \div e\). |
| \(u\) | Gas price. The price of 1 gallon of gas ($ per gallon). It is the first letter of "unit price". |
| \(C\) | Cost of the fill-up ($). What you paid this time, found with gallons × price. It is the first letter of "cost". |
| \(k\) | Gas cost per mile ($ per mile). What each mile of driving cost you in gas. |
Terms
| odometer | The meter that shows the total distance a car has ever driven. It is on the instrument panel and cannot be reset. The mileage it shows is also used when a used car is valued. |
| trip meter | A distance counter you can reset to 0 at any time with a button (also called a trip odometer). If you reset it at the last fill-up, its reading now is the distance driven since then. |
| fill-up method | A way to measure real-world mpg by dividing the miles driven between two full fill-ups by the gallons it took to fill the tank the second time (also called the tank-to-tank method). It needs no special tools, only your fill-up records. |
| fuel economy | How efficiently a car uses fuel, also called gas mileage. In the US it is usually written as miles per gallon (mpg); the larger the number, the farther the car goes on less gas. |
| real-world fuel economy | The fuel economy you actually get. It changes with road conditions, driving style, air conditioning, passengers and so on, and is often lower than the EPA rating. You can measure it yourself with the fill-up method on this page. |
| EPA rating | The official fuel economy on a new car's window sticker (the Fuel Economy and Environment Label). It comes from standard EPA tests and is shown as city, highway and combined mpg. Real driving usually differs from it. |
| mpg (miles per gallon) | The unit of fuel economy that tells how many miles a car goes on 1 gallon of gas. It is the number used on US window stickers and in everyday talk. The larger the number, the better the fuel economy. (Japan uses km/L the same way.) |
| gal/100mi (gallons per 100 miles) | The unit of fuel economy that tells how many gallons it takes to drive 100 miles. It appears on the EPA label next to mpg. Unlike mpg, a smaller number means better fuel economy. Europe, Canada and Australia use the metric version, L/100km. |
Good to know before you start
Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back to these topics is the quickest way forward.
| Subtracting large numbers (Grades 2–3) |
|
| Division and decimals (Grades 4–5) |
|
| Unit rates (Grade 6) |
|
| Reading units (elementary to middle school) |
|
How to calculate it in Excel
| Current odometer (mi) | 45300 |
| Previous odometer (mi) | 45000 |
| Distance driven (mi) | =B1-B2 |
| Distance driven (mi) | 300 |
| Gallons added (gal) | 12 |
| Fuel economy (mpg) | =B1/B2 |
| Fuel economy (mpg) | 25 |
| Fuel economy (gal/100mi) | =100/B1 |
| Gallons added (gal) | 12 |
| Gas price ($/gal) | 3.20 |
| Cost of the fill-up ($) | =B1*B2 |
| Cost of the fill-up ($) | 38.40 |
| Distance driven (mi) | 300 |
| Gas cost per mile ($/mi) | =B1/B2 |
The first table subtracts the odometer readings, and B3 shows 300 (miles). The second table is the fill-up method itself, and B3 shows 25 (mpg).
The third table converts to gallons per 100 miles, and B2 shows 4. The fourth and fifth tables use the gas price, and B3 shows 38.4 ($38.40) and 0.128 ($ per mile). Just replace B1 and B2 with your own numbers.
How to calculate it in Google Sheets
| Current odometer (mi) | 45300 |
| Previous odometer (mi) | 45000 |
| Distance driven (mi) | =B1-B2 |
| Distance driven (mi) | 300 |
| Gallons added (gal) | 12 |
| Fuel economy (mpg) | =B1/B2 |
| Fuel economy (mpg) | 25 |
| Fuel economy (gal/100mi) | =100/B1 |
| Gallons added (gal) | 12 |
| Gas price ($/gal) | 3.20 |
| Cost of the fill-up ($) | =B1*B2 |
| Cost of the fill-up ($) | 38.40 |
| Distance driven (mi) | 300 |
| Gas cost per mile ($/mi) | =B1/B2 |
How to calculate it in Python
current_odometer_mi = 45300 # current odometer (miles)
previous_odometer_mi = 45000 # previous odometer (miles)
fuel_gal = 12 # gallons added this time
price_per_gal = 3.20 # gas price ($ per gallon)
# distance driven (miles) = current odometer − previous odometer
distance_mi = current_odometer_mi - previous_odometer_mi
# fuel economy (mpg) = distance ÷ gallons added (fill-up method)
mpg = distance_mi / fuel_gal
# gallons per 100 miles = 100 ÷ mpg
gal_per_100mi = 100 / mpg
# cost of the fill-up ($) and gas cost per mile ($/mi)
cost = fuel_gal * price_per_gal
cost_per_mile = cost / distance_mi
print(f"Distance driven: {distance_mi} mi")
print(f"Fuel economy: {mpg:.2f} mpg ({gal_per_100mi:.2f} gal/100mi)")
print(f"Cost of the fill-up: ${cost:.2f}")
print(f"Gas cost per mile: ${cost_per_mile:.3f}/mi")
How to write it in LaTeX and other math languages (copy and paste)
d = b − a
d = b - a
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>d</mi>
<mo>=</mo>
<mi>b</mi>
<mo>−</mo>
<mi>a</mi>
</mrow>
</math>
d = b - a
distance = currentOdometer - previousOdometer
d := b - a;
d = b - a;
d = b - a
e = d ÷ F
e = \frac{d}{F}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>e</mi>
<mo>=</mo>
<mfrac><mi>d</mi><mi>F</mi></mfrac>
</mrow>
</math>
e = d / F
efficiency = distance/fuel
e := d/F;
e = d/F;
e = d/F
e₁₀₀ = 100 ÷ e
e_{100} = \frac{100}{e}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<msub><mi>e</mi><mn>100</mn></msub>
<mo>=</mo>
<mfrac><mn>100</mn><mi>e</mi></mfrac>
</mrow>
</math>
e_100 = 100 / e
efficiencyLPer100km = 100/efficiency
e100 := 100/e;
e100 = 100/e;
e_100 = 100/e
C = F × u
C = F \times u
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>C</mi>
<mo>=</mo>
<mi>F</mi>
<mo>×</mo>
<mi>u</mi>
</mrow>
</math>
C = F * u
cost = fuel*price
C := F*u;
C = F*u;
C = F×u
k = C ÷ d
k = \frac{C}{d}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>k</mi>
<mo>=</mo>
<mfrac><mi>C</mi><mi>d</mi></mfrac>
</mrow>
</math>
k = C / d
costPerKm = cost/distance
k := C/d;
k = C/d;
k = C/d
How to have ChatGPT do the calculation
You are a fuel economy calculation assistant. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing). At the last fill-up, the odometer read 45,000 miles. At this fill-up, it read 45,300 miles. It took 12 gallons to fill the tank this time (the tank was filled all the way up both times). The gas price is $3.20 per gallon. Find each of the following: 1. The distance driven since the last fill-up (miles) 2. The real-world fuel economy by the fill-up method (mpg), and the same value in gallons per 100 miles 3. The cost of this fill-up ($), and the gas cost per mile ($ per mile) Show the formulas you used and the numbers from the execution result.
How to Use
-
1Enter your numbersType the numbers you want to calculate with into the input fields
-
2CalculatePress the "Calculate" button
-
3Check the resultThe result appears on the spot. The same page also explains the idea behind the calculation and the formula
DataChef Features
No technical knowledge required.
Intuitive and user-friendly operation.
Can be used without registering personal information.
Automatic file deletion by clicking "download".
and rapid file conversion.
No attribution required.
No need to contact us for commercial use permission.
