⛽ Gas Cost & MPG Calculator
Enter distance, MPG and gas price to see trip, monthly and yearly fuel cost — or work out your car’s real MPG from a fill-up.
How to use the gas cost calculator
Trip & monthly cost works out how much gas a drive costs from the distance, your car's fuel economy and the price of gas, then scales it to a month and a year. For a commute, enter the one-way distance, choose Round trip, and set the number of driving days (about 22 for a five-day work week). For a single road trip, set days to 1.
Actual MPG calculates your car's real fuel economy from the miles driven and the gallons you put in, and compares it with the EPA rating if you enter one. Switch to Metric to use kilometers, liters and km/L — the numbers you already typed are converted for you.
The $3.50 per gallon default is only an example, not today's gas price. Prices vary by state, station, day and grade, so type in what you actually pay. The U.S. Energy Information Administration (EIA) publishes weekly average prices, and apps like GasBuddy show local stations.
Gas cost formula
gallons = miles ÷ MPGtrip cost = gallons × price per gallonmonthly cost = trip cost × driving days
Example: a 15-mile commute each way (30 miles a day), 22 days a month, in a car that gets 25 MPG with gas at $3.50:
- Monthly miles: 30 × 22 = 660 miles
- Monthly gas: 660 ÷ 25 = 26.4 gallons
- Monthly cost: 26.4 × $3.50 = $92.40 (about $1,109 a year)
Per mile, cost per mile = price per gallon ÷ MPG — here $3.50 ÷ 25 = 14 cents a mile. That is fuel only; the IRS standard mileage rate is much higher because it also covers depreciation, insurance and maintenance.
Monthly gas cost by miles and MPG (at $3.50/gal, example)
| Miles per month | 20 MPG | 25 MPG | 30 MPG | 40 MPG |
|---|---|---|---|---|
| 500 mi | $88 | $70 | $58 | $44 |
| 1,000 mi | $175 | $140 | $117 | $88 |
| 1,500 mi | $262 | $210 | $175 | $131 |
| 2,000 mi | $350 | $280 | $233 | $175 |
A 40 MPG car spends exactly half as much on gas as a 20 MPG car for the same miles. Before switching cars, plug in your own monthly mileage to see what the difference is worth.
How to calculate your real MPG (fill-up method)
- Fill the tank and reset your trip odometer to zero.
- Drive normally. The more of the tank you use, the more accurate the result.
- Fill up again and note the gallons it took and the miles on the trip odometer.
MPG = miles driven ÷ gallons added
Example: 350 miles on 12.5 gallons = 28.0 MPG (8.4 L/100 km). Pumps click off at slightly different points, so averaging two or three fill-ups at the same station gives a better number. Dashboard MPG readouts are estimates and are often a little optimistic.
MPG, km/L and L/100 km
The US uses miles per gallon (higher is better). Korea and Japan use km/L, while Europe, Canada and Australia use liters per 100 km (lower is better). L/100 km = 235.215 ÷ MPG and km/L = MPG × 0.4251. So 25 MPG = 9.4 L/100 km = 10.6 km/L. Note that a UK (imperial) gallon is 20% bigger than a US gallon, so UK MPG figures look higher for the same car.
Why real MPG is lower than the EPA rating
- Stop-and-go traffic and short trips — idling and cold engines burn extra fuel.
- Speed and hard acceleration — aerodynamic drag rises steeply above about 50 mph.
- A/C, roof racks, heavy cargo and under-inflated tires all cut fuel economy.
This calculator gives an estimate from the distance, fuel economy and price you enter. The default price is an example and may not match current prices. Tolls, parking and maintenance are not included. Nothing you enter leaves your browser.