
Home / Cost per mile
Cost per mile calculator
Enter your mpg and the gas price, then what you pay each year for insurance, maintenance and anything else. The calculator spreads those costs over the miles you drive and adds the gas to give one figure per mile.
Nothing you type leaves your browser. The numbers are kept on this device so they are still there next time.
Two kinds of cost
Gas grows with every mile. Insurance, registration and much of the upkeep are paid by the year whether you drive a lot or a little. The calculator handles them apart. Gas per mile is the price divided by the mpg; the yearly costs are divided by the miles. With the defaults:
$3.505 / 25 mpg = $0.14 / mi
($1,500 + $900) / 12,000 mi = $0.20 / mi
Total → $0.34 / mi
The insurance and maintenance figures are only there so the result is not empty: they are not averages. Type your own from your policy and your repair bills.
Gas per mile by mpg and price
| mpg | $3.00 | $3.505 | $4.00 | $5.00 |
|---|---|---|---|---|
| 15 mpg | $0.20 / mi | $0.23 / mi | $0.27 / mi | $0.33 / mi |
| 20 mpg | $0.15 / mi | $0.18 / mi | $0.20 / mi | $0.25 / mi |
| 25 mpg | $0.12 / mi | $0.14 / mi | $0.16 / mi | $0.20 / mi |
| 30 mpg | $0.10 / mi | $0.12 / mi | $0.13 / mi | $0.17 / mi |
| 40 mpg | $0.08 / mi | $0.09 / mi | $0.10 / mi | $0.13 / mi |
The column at $3.505 is the U.S. average for regular gas in the week of November 30, 2026, from the Energy Information Administration.
Driving more lowers the cost per mile
Yearly costs are shared by every mile. The same $2,400 of insurance and upkeep costs a lot per mile in a car that barely moves, and little in one that covers long distances, while the gas per mile stays the same.
| Miles a year | Other costs per mile | Total per mile |
|---|---|---|
| 4,000 | $0.60 / mi | $0.74 / mi |
| 8,000 | $0.30 / mi | $0.44 / mi |
| 12,000 | $0.20 / mi | $0.34 / mi |
| 20,000 | $0.12 / mi | $0.26 / mi |
That is why a second car used only at weekends can cost more per mile than the daily one, even with cheap gas.
Using the result
The figure helps to compare: driving against a train ticket, a long commute against moving closer, a newer car against keeping the old one. Multiply it by the miles of a trip to see what the trip really costs. For tax and business mileage, the IRS publishes its own standard rates; the mileage reimbursement calculator uses them.
Questions
What should I put in maintenance?
Your own spending over a year: oil changes, tires, brakes and repairs. A year of receipts is the best guide.
Does it include depreciation?
Not unless you add it. Put the value the car loses each year in Other yearly costs if you want it counted.
Why is my result lower than the IRS rate?
The IRS rate is one figure for everyone. Your own costs can be higher or lower.
Can I use it for an electric car?
Use the charging cost calculator for the energy per mile, then add the yearly costs here with 0 for gas.
Other calculators
Sources
- U.S. Energy Information Administration, Gasoline and Diesel Fuel Update (weekly retail prices)
- IRS, Standard mileage rates (IR-2025-128, IR-2026-29)
- fueleconomy.gov (DOE and EPA), Learn more about the fuel economy label for electric vehicles
Figures checked on 2026-12-02. Page updated 2026-12-02.