Test Grade Calculator - Calculate Your Test Score in Seconds
Work out your fuel economy in MPG or L/100 km, and estimate what a trip will cost in fuel
Last updated: November 2, 2026
How to Use the Gas Mileage Calculator (MPG & Fuel Cost)
How to calculate gas mileage
- Choose your units. Pick miles and gallons (US) or kilometers and liters.
- Choose what to find. Select My fuel economy to calculate MPG from a fill-up, or Trip fuel and cost to plan a journey.
- Enter the numbers. For fuel economy, enter the distance driven and the fuel it used. For a trip, enter the distance and your car's fuel economy.
- Add a fuel price (optional). Enter the price per gallon or liter to see the cost.
- Read the results. You will see MPG, L/100 km and km per liter, or the fuel and cost for the trip.
For the most accurate MPG, fill up completely at the start and end of the stretch you measure.
How Test Grade Calculation Works
Fuel economy formulas
MPG = Miles driven ÷ Gallons used
L/100 km = Liters used ÷ Kilometers driven × 100
To convert between the two: L/100 km = 235.215 ÷ MPG (US gallons), and km per liter = 100 ÷ (L/100 km).
Worked example
You drive 300 miles and refill with 10 gallons.
- MPG = 300 ÷ 10 = 30 mpg
- L/100 km = 235.215 ÷ 30 = 7.84 L/100 km
- Kilometers per liter = 100 ÷ 7.84 = 12.75 km/L
Trip fuel and cost
Fuel needed = Distance ÷ MPG (or Distance × L/100 km ÷ 100 in metric)
Trip cost = Fuel needed × Fuel price
A 450-mile trip at 30 mpg needs 450 ÷ 30 = 15 gallons. At $3.50 a gallon that costs $52.50.
Measuring accurately
Fill the tank, reset the trip meter, drive normally, then refill at the same pump and note the fuel added. Using one full tank or more smooths out small differences in how full each fill-up is.
MPG vs L/100 km
Higher MPG is better, but with L/100 km a lower figure is better. They measure the same thing from opposite directions.
About Gas Mileage Calculator (MPG & Fuel Cost)
Our gas mileage calculator (mpg & fuel cost) is a free, easy-to-use tool designed to help youwork out your fuel economy in mpg or l/100 km, and estimate what a trip will cost in fuel. For professionals or those who need quick calculations, our calculator provides accurate results instantly.
Frequently Asked Questions
How do you calculate miles per gallon?
Divide the miles you drove by the gallons of fuel you used. If you drove 300 miles and refilled 10 gallons, you got 300 ÷ 10 = 30 miles per gallon.
How do I convert MPG to L/100 km?
Divide 235.215 by the MPG figure (US gallons). 30 mpg is 235.215 ÷ 30 = 7.84 L/100 km. The same formula works in reverse: divide 235.215 by the L/100 km value to get MPG.
How do I work out the fuel cost of a trip?
Divide the trip distance by your MPG to get the gallons needed, then multiply by the price per gallon. A 450-mile trip at 30 mpg uses 15 gallons, which costs $52.50 at $3.50 a gallon.
Is a higher or lower L/100 km better?
Lower is better. L/100 km shows how many liters you burn to travel 100 kilometers, so a car using 6 L/100 km is more efficient than one using 9 L/100 km. MPG is the opposite: higher is better.
What is a good MPG?
For petrol cars, roughly 25 to 35 mpg is typical for a modern sedan, while many small hybrids exceed 45 mpg and large trucks often get under 20 mpg. What counts as good depends on the vehicle type.
Why is my real MPG lower than the rated figure?
Ratings come from standard tests. Real driving with cold starts, short trips, heavy traffic, high speeds, hills, roof racks, under-inflated tires or aggressive acceleration all use more fuel.
Does this work for electric cars?
No. It is designed for liquid fuel in gallons or liters. Electric vehicles are measured in kWh per 100 miles or miles per kWh, which uses a different calculation.
Your result will appear here
Loading…