Gas Mileage (MPG) Calculator

Updated July 2026

Enter the distance you drove and the fuel you used to find your gas mileage in MPG — plus your cost per mile and your consumption in L/100 km. Switch between US and metric units, add a fuel price for the total cost, and see everything computed instantly in your browser.

Fuel economy = miles driven ÷ gallons used. If you drove 300 miles on 10 gallons, that's 30 MPG. Enter your trip and fuel to find your MPG, cost per mile, and L/100 km.
Optional — used to estimate cost per mile and total fuel cost.
Fuel economy
Cost per mile
Total fuel cost
L/100 km
MPG (US)
L/100 km
km / L

How this gas mileage calculator works

Fuel economy tells you how far a vehicle travels on a given amount of fuel. In the United States it is usually expressed as miles per gallon (MPG), while most of the rest of the world uses litres per 100 kilometres (L/100 km). This calculator works in either system: enter the distance you drove and the fuel you burned, and it returns your economy, your cost per mile or kilometre, and your total fuel cost.

The core formula is simple. In US units, MPG = miles driven ÷ gallons used. To get the most accurate figure, fill the tank completely, reset the trip meter, drive normally, then refill and note exactly how many gallons it took to top up — that fuel is what powered the recorded distance.

Worked example: you drive 300 miles and refill with 10 gallons. Your economy is 300 ÷ 10 = 30 MPG. Converting, that is 235.215 ÷ 30 ≈ 7.84 L/100 km. At a fuel price of $3.50 per gallon, the trip cost 10 × $3.50 = $35.00, or about $0.117 per mile.

To convert between the two scales, divide 235.215 by the US MPG to get L/100 km, and divide 235.215 by L/100 km to get MPG back. The table below shows the conversion for common values so you can sanity-check the tool at a glance.

MPG (US)L/100 kmkm / L
2011.768.50
259.4110.63
307.8412.75
405.8817.00
504.7021.25

Reference note: figures use US gallons (1 gallon = 3.785411784 litres) and the standard 235.215 conversion constant. Imperial (UK) gallons differ and are not used here.

Frequently asked questions

How do I calculate MPG?
Divide the miles you drove by the gallons you used. Drove 300 miles on 10 gallons? That is 300 ÷ 10 = 30 MPG. Fill up, reset the trip meter, drive, then refill and note the gallons added for an accurate result.
What is good gas mileage?
For a modern petrol car, above about 30 MPG (around 7.8 L/100 km) is good, and 40 MPG or more is very efficient. Hybrids often reach 50 MPG. The benchmark depends on vehicle type, engine size, and driving conditions.
How do I convert MPG to L/100km?
Divide 235.215 by the US MPG figure. So 30 MPG is 235.215 ÷ 30 ≈ 7.84 L/100 km. A higher MPG means fewer litres per 100 km, since the two scales move in opposite directions.
How do I calculate cost per mile?
Multiply the fuel price per gallon by the gallons used, then divide by the miles driven — or simply divide the price per gallon by your MPG. At $3.50/gallon and 30 MPG, that is about $0.117 per mile.
What is L/100km?
Litres per 100 kilometres is the metric measure of fuel consumption used across much of the world. It states how many litres a vehicle burns to travel 100 km — lower numbers mean better economy.
How can I improve my fuel economy?
Keep tyres inflated, drop excess weight and roof racks, avoid hard acceleration and braking, hold a steady speed, and keep up with servicing. Combining trips and cutting idling also helps.
⚡ Gas Mileage Calculator — by larely ↗

Related tools

Spinner Wheel

A random picker wheel — enter options and spin to choose a winner.

Online Metronome

A free metronome with adjustable BPM, time signature and tap tempo.

Words to Pages Calculator

Estimate how many pages a word count fills at a given font and spacing.

Random Number Generator

Generate random numbers in any range, with no-repeat and sort options.

Zodiac Sign Calculator

Find your western zodiac sign and Chinese zodiac animal from your birth date.

Dice Roller

Roll virtual dice with dice notation, online and free.

Coin Flip

Flip a fair coin online — heads or tails — and flip many at once.

Secret Santa Generator

Randomly assign Secret Santa pairs for a group, with no self-matches.

Random Team Generator

Randomly split a list of names into fair teams by count or size.

Image Compressor & Converter

Compress, resize and convert JPEG, PNG and WebP images in your browser — nothing is upl…

Cipher Encoder & Decoder

Encode and decode Caesar, ROT13, Vigenère and Atbash ciphers, with brute-force.

Username Generator

Generate cool, aesthetic, gamer or professional usernames and handles instantly.

Browse all 251 free tools →