This MPG calculator — also called a mileage and fuel efficiency calculator — estimates your fuel consumption and the cost of a trip before you set off. Whether you want to know your gas mileage over a given distance or how much petrol a journey will burn, the calculation comes down to a simple relationship between miles driven and gallons used. This guide shows the formula, the units, and a worked trip so you can reproduce any result by hand.
MPG, or miles per gallon, is calculated by dividing the miles you travel by the gallons of fuel you burn: MPG = distance (miles) divided by fuel (gallons). The metric version relates liters per 100 km to the same distance-and-fuel idea. In the United States, an average car gets about 25 MPG, so a 300-mile trip uses roughly 12 gallons. That single ratio lets you estimate both the fuel a journey needs and what it will cost.
What is the formula for calculating MPG?
Gas mileage is the relationship between the distance traveled and the amount of fuel burned. In the imperial system the formula is:
In the metric system the equivalent relation uses liters per 100 km:
The calculator itself works from two equations that extend the same idea to trip fuel and cost:
The table below collects the reference values behind these formulas, all drawn from the source material:
| Figure | Value | What it means |
|---|---|---|
| US average fuel economy | 25 MPG | miles per gallon assumed for a typical US car |
| Fuel for a 300-mile trip | 12 gallons | 300 miles divided by 25 MPG |
| Small compact fuel tank | 12 gallons | typical smaller tank capacity |
| Larger car fuel tank | up to 16 gallons | typical larger tank capacity |
| Ford Focus 1.6 economy | 7.61 L/100 km | average for 1998–2005 models |
Your own gas consumption also depends on your car model, its year of production, the engine size, and your driving efficiency — so the 25 MPG figure is a benchmark, not a promise.
Worked example: a 300-mile trip at 25 MPG
Suppose you plan to drive 300 miles in a car that gets the US average of 25 miles per gallon. Using the formula:
The trip therefore needs 12 gallons of fuel. To find the cost, multiply that fuel by your price per gallon using the second calculator equation. This is exactly the calculation the source gives for a 300-mile drive — divide distance by MPG to get gallons, then multiply by price to get trip cost.
How do I use the MPG calculator?
The tool estimates gas mileage from the distance you cover and the average fuel consumption of your car. The inputs are:
- Distance — how far you plan to travel.
- Fuel economy — the average fuel use of your car.
- Price of petrol — entered in the Fuel price and trip cost section.
From those three entries the calculator reports the total fuel needed for the route and the total trip cost. If you do not know your average fuel use in liters, you can change the unit: the related fuel economy converter handles miles per US gallon, miles per UK gallon, and liters per 100 km. Once you know your car's fuel efficiency, a drive time calculator can go on to estimate journey time, arrival time and total driving cost.
Frequently Asked Questions
How does a car calculate average mpg?
In modern cars the engine management system knows how much fuel the engine has consumed and how many miles the vehicle has traveled. By dividing the distance in miles by the amount of fuel in gallons, the car can display the average mpg (miles per gallon).
Can I calculate MPG without the calculator?
Yes. Record how many miles the car travels, find out how many gallons of fuel it used over that distance, then divide the miles by the gallons. The result is the MPG for that trip.
Does the MPG calculator include the trip cost?
Yes. The Fuel price and trip cost section takes the price of petrol and multiplies it by the fuel burned, so you get the total cost of the tour alongside the fuel estimate.
References
- Omni MPG calculator source content: gas mileage definition, imperial and metric formulas, and worked trip figures.
- Standard unit-conversion references for miles per gallon and liters per 100 km.
- General arithmetic references for distance, fuel and cost calculations.