Cost per Mile Calculator screenshot

Cost per Mile Calculator

Work out the all-in cost of a mile of driving from fuel, insurance, maintenance and depreciation, and the annual total they add up to.

Privacy First
0 Runs
Updated 2026-11-22
Runs in your browser
No upload
Deterministic
Formula stated

What this page does

The cost per mile adds the fuel a year of driving burns to the fixed yearly costs of insurance, maintenance and depreciation, then divides by the miles driven.

How to use it

Enter this sample with the defaults shown:

12000 3.50 30 1200 800 3000

Press Run. The page gives:

Miles:        12000 per year
Fuel:         1400.00 per year (400 units at 3.50)
Fixed:        5000.00 per year (insurance + maintenance + depreciation)
Total:        6400.00 per year
Per mile:     0.5333
Per 100 miles: 53.33
Basis:        annual figures as entered; fuel is miles ÷ miles-per-unit × price per unit

The formula and its basis

Fuel = annual miles ÷ miles per unit of fuel × price per unit. Cost per mile = (fuel + insurance + maintenance + depreciation) ÷ annual miles.

Annual figures as entered, in one currency; fuel is priced per gallon or per litre to match the miles-per-unit figure. Money prints to two decimals, ratios to four, and intermediate values are never rounded.

What it is not

This page is arithmetic on the numbers you enter, with each assumption stated: it is not financial, medical or training advice, and nothing is uploaded, stored or logged.

The cost per mile adds the fuel a year of driving burns to the fixed yearly costs of insurance, maintenance and depreciation, then divides by the miles driven.

The rule this page applies: Fuel = annual miles ÷ miles per unit of fuel × price per unit. Cost per mile = (fuel + insurance + maintenance + depreciation) ÷ annual miles.

Basis: Annual figures as entered, in one currency; fuel is priced per gallon or per litre to match the miles-per-unit figure. Money prints to two decimals, ratios to four, and intermediate values are never rounded.

Worked example: the sample values below, with the defaults, give exactly the output recorded in What to Expect.

How to use the Cost per Mile Calculator

Enter annual miles, fuel price per unit, miles per unit of fuel, insurance, maintenance and depreciation per year (one per line or space separated) in the box, set the options beside it, then press Run. The answer appears beside the form and re-runs on the same input.

Every number in the answer follows from your inputs and the assumptions stated below; the page does not choose a rate for you.

The worked example uses "12000 3.50 30 1200 800 3000" with the defaults shown, and its exact output is printed in What to Expect.

The formula, its basis and its refusals

Fuel = annual miles ÷ miles per unit of fuel × price per unit. Cost per mile = (fuel + insurance + maintenance + depreciation) ÷ annual miles.

Annual figures as entered, in one currency; fuel is priced per gallon or per litre to match the miles-per-unit figure. Money prints to two decimals, ratios to four, and intermediate values are never rounded. Money prints to two decimals, percentages and ratios to four, and intermediate values are never rounded.

It refuses zero miles, zero miles per unit of fuel, and any negative cost, naming the field that failed.

What this page is not

It is arithmetic on the numbers you enter, with each assumption stated. It does not recommend a product, a rate or a course of action, and it is not financial advice.

Where the tool is the wrong choice: A tax deduction or a statutory mileage rate, which this page does not decide; A trip cost, where only fuel matters.

What to Expect

Best for

  • Comparing two cars' running costs before buying
  • Checking a mileage claim against real ownership cost
  • Budgeting a commute

Not ideal for

  • A tax deduction or a statutory mileage rate, which this page does not decide
  • A trip cost, where only fuel matters

What this tool keeps

  • The numbers exactly as you entered them
  • The same answer on every run
  • Nothing sent, stored or logged

What may need cleanup

  • Rates entered as fractions rather than percentages: enter 5 for 5 %
  • A currency symbol pasted beside a number, which the page refuses by name

Common errors

  • It refuses zero miles, zero miles per unit of fuel, and any negative cost, naming the field that failed.
  • A non-numeric value, which the page names rather than silently treating as zero

Example use cases

  • Deciding whether a longer commute is worth a pay rise
  • Checking that a used car's low price is not offset by repairs

Sample input

12000 3.50 30 1200 800 3000

Sample output

Miles: 12000 per year Fuel: 1400.00 per year (400 units at 3.50) Fixed: 5000.00 per year (insurance + maintenance + depreciation) Total: 6400.00 per year Per mile: 0.5333 Per 100 miles: 53.33 Basis: annual figures as entered; fuel is miles ÷ miles-per-unit × price per unit

Who this is for

  • Drivers, commuters and small fleets costing a vehicle per mile

Frequently asked questions

What formula does this page use?

Fuel = annual miles ÷ miles per unit of fuel × price per unit. Cost per mile = (fuel + insurance + maintenance + depreciation) ÷ annual miles.

What does it refuse?

It refuses zero miles, zero miles per unit of fuel, and any negative cost, naming the field that failed.

What does this page not do?

It is arithmetic on the numbers you enter, with each assumption stated. It does not recommend a product, a rate or a course of action, and it is not financial advice.

What rate basis and rounding does it use?

Annual figures as entered, in one currency; fuel is priced per gallon or per litre to match the miles-per-unit figure. Money prints to two decimals, ratios to four, and intermediate values are never rounded. Money prints to two decimals, percentages and ratios to four, and intermediate values are never rounded.

Does it include depreciation?

Yes, when you enter a yearly depreciation figure. Leave it at zero to see cash costs only.

Gallon or litre?

Either: the fuel price and the miles-per-unit figure must use the same unit, and the page multiplies them consistently.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.