Joy of Tools

Gas cost calculator

Type the gas price, the distance and your car's mpg. The cost updates as you type.

What you enter stays on this page and is not sent anywhere.

Type the price you pay at the pump; it is not filled in for you.

Type the fuel price to see the cost.

Source, checked October 19, 2026: NIST Handbook 44 (2026), Appendix C: General Tables of Units of Measurement, UK Weights & Measures Act 1985, Schedule 1

How to use it

  1. Type today's price per gallon (or per liter) and pick your currency.
  2. Choose a trip, a monthly commute or two cars, then type the distance and fuel economy.
  3. Read the cost, the fuel you need and, for trips, each passenger's share.

Questions

How is the gas cost of a trip worked out?

Miles divided by mpg gives the gallons you burn; gallons times the price per gallon gives the cost. 300 miles at 30 mpg is 10 gallons, so at $3.50 a gallon the trip costs $35.

Can I use L/100 km or km per liter instead of mpg?

Yes. Pick the fuel economy unit and distance unit you have, and the price per liter if you pay by the liter. Numbers you already typed are converted when you switch.

What is the difference between US and UK mpg?

UK mpg uses the imperial gallon of 4.546 liters, US mpg the US gallon of 3.785 liters. The same car shows about 20% more mpg in the UK figure, so choose the one on your spec sheet.

Why is there no gas price filled in?

Prices change daily and differ by state and station, so the calculator does not guess. Type the price at your pump or from a price app for the most accurate result.

More tools