Car Gas Calculator: Fuel Cost, MPG, and Trip Use
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
A car gas calculator estimates how much fuel a trip will use and, if you enter a fuel price, how much that fuel will cost. Enter the distance, your car’s fuel economy, and the price per gallon or liter to get an estimated fuel quantity and trip cost.
Formula
Fuel needed = trip distance ÷ fuel economy. Estimated fuel cost = fuel needed × fuel price.
- d is trip distance in miles.
- e is fuel economy in miles per US gallon (mpg).
- p is fuel price in dollars per US gallon.
- fuel is the estimated fuel required, in US gallons.
- cost is the estimated fuel expense, in dollars.
The calculation assumes the fuel economy you enter applies to the whole trip. If you know consumption in gallons per 100 miles instead, divide that figure by 100 and multiply by the distance; the result is gallons used. For metric inputs, use a calculator configured for kilometers, liters per 100 kilometers, and price per liter, or convert all values consistently before calculating.
Worked Example
Using the calculator’s defaults:
- Distance: 100 miles; fuel economy: 25 miles per gallon; fuel price: $3.50 per gallon.
- Fuel needed = 100 ÷ 25 = 4 gallons.
- Estimated fuel cost = 4 × $3.50 = $14.00.
The result is an estimate of 4.00 gallons and $14.00 for fuel. It is not a guaranteed amount that the vehicle will consume or that a trip will cost.
What a Car Gas Calculator Is Useful For
Fuel calculators help with practical planning: estimating the fuel budget for a drive, comparing two routes, or seeing how a change in distance or fuel economy affects consumption. The calculation is simple, but it is useful when the inputs describe the same trip and use compatible units.
For example, a 300-mile drive in a car averaging 30 mpg requires about 10 gallons: 300 ÷ 30 = 10. At $3.50 per gallon, the estimated fuel expense is $35. A longer route or lower actual mpg raises the estimate; a shorter route or better efficiency lowers it.
A one-way estimate covers only the distance entered. For a round trip, enter the total distance, or double a one-way distance if the return route is identical. If the return route differs, estimate each leg separately and add the results.
How to Get a Useful Fuel-Economy Figure
A vehicle’s advertised or dashboard fuel-economy figure can be a starting point, but actual consumption changes with conditions. For a personal estimate, calculate fuel economy from your own driving over a measured distance:
- Record the odometer reading when you fill the tank. For a more consistent comparison, fill to the same level each time.
- At a later fill, record how many gallons or liters were added and the distance driven since the previous fill.
- For US mpg, divide miles driven by gallons used. For liters per 100 kilometers, divide liters used by kilometers driven, then multiply by 100.
One tank gives only a snapshot. Traffic, weather, speed, terrain, tire condition, load, and air-conditioning use can all affect consumption. A longer tracking period that includes ordinary driving is usually a more representative basis for an estimate than a single unusually easy or difficult trip.
Units, Assumptions, and Common Mistakes
Fuel economy and fuel consumption express related ideas in opposite ways. Miles per gallon (mpg) tells you how far a vehicle travels per gallon; a higher mpg means less fuel per mile. Liters per 100 kilometers (L/100 km) tells you how much fuel is used over a fixed distance; a lower value means less fuel. Do not enter an L/100 km number into an mpg field—the formulas are not interchangeable without conversion.
- Check the gallon type. A US gallon is about 3.785 liters. An imperial gallon is about 4.546 liters. If a fuel-economy figure uses imperial gallons, it cannot be treated as US mpg without conversion.
- Keep distance units consistent. Miles divided by miles per gallon gives gallons. Kilometers divided by kilometers per liter gives liters.
- Match the price to the fuel unit. Dollars per gallon must be multiplied by gallons, not liters.
- Do not overinterpret decimals. A result such as 4.27 gallons is a mathematical estimate, not a promise of exact fuel use. The inputs themselves may be rounded.
The basic formula assumes a constant average fuel economy and a fixed fuel price. It does not account for changing conditions, fuel left in the tank, detours, idling, or differences between a car’s displayed estimate and measured consumption.
Frequently Asked Questions
How do I calculate gas for a road trip?
Divide the trip’s total distance by the car’s fuel economy. With miles and US mpg, the answer is gallons. Multiply gallons by the price per gallon to estimate fuel cost.
How much gas does a 100-mile drive use?
It depends on the vehicle’s fuel economy. At 25 mpg, 100 miles takes about 4 gallons; at 40 mpg, it takes about 2.5 gallons, assuming those averages hold for the trip.
How do I calculate trip fuel cost in kilometers?
With fuel economy in kilometers per liter, divide kilometers by kilometers per liter to get liters, then multiply by the price per liter. With L/100 km, calculate liters as distance in kilometers × L/100 km ÷ 100.
Should I use city or highway mpg?
Choose the figure that best matches the planned driving, if you have one. For a mixed trip, a combined or personally measured average may be more useful. Actual results can differ from published figures.
Does this calculator include the whole cost of driving?
No. It estimates fuel only. It does not include tolls, parking, maintenance, depreciation, or other travel expenses.
Related
Formula used
in d | Trip distance | miles | 100 | 0 in e | Fuel economy | mpg | 25 | 0 in p | Fuel price | dollars/gallon | 3.50 | 0 out fuel | Fuel needed | gallons | d / e | 2 out cost | Estimated fuel cost | dollars | fuel * p | 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.