The Real Cost of Owning a Car (and Going Electric)
Beyond the sticker price — depreciation, financing, fuel, insurance and maintenance — plus how electric cars compare on running cost, range and charging time, with a total-cost view.
Verified formula Updated Jun 2026 Private — runs on your device
Miles per gallon
25.00
For general information only — not financial, tax, legal or medical advice. Verify before you rely on it.
The Miles Per Gallon Calculator works out your miles per gallon in an instant. Enter distance driven and fuel used and the result updates as you type — it is free, needs no sign-up, and runs entirely in your browser so your figures stay private.
The Miles Per Gallon Calculator uses the formula:
Miles per gallon = Distance driven ÷ Fuel used
For example, with distance driven of 300 miles and fuel used of 12 gallons, the miles per gallon is 25.00.
| Distance driven | 300 miles |
|---|---|
| Fuel used | 12 gallons |
| Miles per gallon | 25.00 |
|---|
Results are estimates for educational use, not professional advice.
Beyond the sticker price — depreciation, financing, fuel, insurance and maintenance — plus how electric cars compare on running cost, range and charging time, with a total-cost view.
Reference table of miles per gallon for Miles Per Gallon across a range of distance driven values — exact, engine-computed figures you can read off at a glance.
Learn how to calculate Miles Per Gallon — the formula explained step by step, with worked examples and a free calculator to check your answer.