An easy way to calculate gas mileage is to remember the odometer reading or to reset the mileage counter when filling up a gas tank. When doing so next time, obtain the mileage accrued between the two gas fill-ups. Then divide the mileage figure by the amount of gas filled the second time to obtain the gas mileage.
A gas mileage calculator turns two odometer readings and one fill-up into the number that actually describes your car's fuel economy. The method is simple and reliable: note your odometer when you fill the tank, drive normally, then at the next fill-up record the new odometer reading and how much fuel you put in. The distance covered divided by the fuel added is your gas mileage.
This matters because the figure on the window sticker is a laboratory result, not a promise. Official EPA and WLTP ratings come from standardised test cycles designed for comparability between vehicles, not for predicting what any individual driver will see. Your actual mileage depends on your commute, your right foot, your tyre pressure, the weather, and the load you carry. Measuring it yourself is the only way to know, and it takes about ten seconds per fill-up.
The calculator works in both US units (miles and gallons, giving MPG) and metric units (kilometres and litres, giving km/L and L/100 km), and converts between all three so you can read the result in whichever measure is familiar.
The technique matters more than the arithmetic. Follow these steps and the result will be accurate:
The most common mistake is using the volume from the first fill rather than the second. The fuel you burn is what you replace afterwards, not what you started with. The second most common is topping up by hand after the pump cuts off, which adds an inconsistent amount and corrupts the comparison between the two fills.
The core calculation is a single division:
MPG = miles driven ÷ gallons used
km/L = kilometres driven ÷ litres used
Europe more commonly reports fuel consumption rather than fuel economy - litres per 100 kilometres, which is an inverted measure:
L/100 km = 100 ÷ (km/L)
The inversion is worth pausing on, because it reverses the direction of "better". With MPG and km/L, higher is better - more distance per unit of fuel. With L/100 km, lower is better - less fuel per unit of distance. Converting between the US and metric systems uses the relationship MPG × L/100 km ≈ 235.2, which is where the calculator's conversions come from.
Entering the fuel price adds the figures that matter for budgeting: what the fill cost, and what each mile or kilometre costs you in fuel. Cost per mile is simply the fill cost divided by the distance covered, and it is the single most useful number for comparing vehicles, evaluating a commute, or deciding whether a trip is worth driving.
The reciprocal - miles per dollar - is sometimes more intuitive. At 24 MPG with fuel at $3.00 a gallon, each mile costs 12.5 cents, or equivalently every dollar buys you 8 miles.
Official ratings are produced under tightly controlled conditions: a fixed drive cycle, moderate temperature, no passengers, no cargo, no air conditioning, and a professional driver following a prescribed speed trace. Almost nothing about ordinary driving matches that.
Driving style is the largest single variable under your control. Aggressive acceleration and hard braking can cut fuel economy by 15% to 30% in stop-and-go conditions. Every hard acceleration converts fuel into kinetic energy that the brakes then throw away as heat.
Speed matters more than most drivers expect. Aerodynamic drag rises with the square of speed, so power demand rises roughly with the cube. Most cars peak in efficiency somewhere between 50 and 60 mph (80-95 km/h), and economy falls off sharply above that. Driving at 80 mph instead of 65 typically costs 15% to 25%.
Short trips are disproportionately expensive. A cold engine runs rich and its lubricants are thick, so the first few miles can consume fuel at double the warmed-up rate. A commute made of short hops will always show worse economy than the same distance driven in one go.
Cold weather compounds this: denser air increases drag, tyre pressure drops, winter fuel blends carry slightly less energy, and the engine takes longer to reach operating temperature. A 10% to 20% winter penalty is normal.
Air conditioning can reduce economy by 5% to 25%, with the largest effect on short trips and in small-engined cars.
Weight and drag from cargo, roof boxes, and bike racks all take their toll. Roughly every 45 kg (100 lb) of extra weight costs about 1%, and a roof box can cost 10% to 25% at highway speed even when empty.
Ease off the accelerator. Smooth, gradual acceleration and anticipating traffic so you coast rather than brake is the cheapest and most effective change available. Look far enough ahead that you rarely need the brake pedal hard.
Moderate your highway speed. Dropping from 80 to 65 mph typically saves 15% or more, and costs only a few minutes on most journeys.
Keep tyres properly inflated. Under-inflated tyres increase rolling resistance; correcting significantly low pressures can improve economy by around 3%. Check monthly when the tyres are cold, and use the figure on the door jamb rather than the number moulded on the tyre sidewall, which is a maximum rather than a recommendation.
Remove unnecessary weight and drag. Take the roof rack off when you are not using it, and clear out cargo you are not carrying for a reason.
Keep up with maintenance. A clogged air filter, worn spark plugs, dragging brakes, or the wrong grade of engine oil all cost fuel. A malfunctioning oxygen sensor alone can cost up to 40%. If the check-engine light is on, fuel economy is often the first casualty.
Combine trips. Several errands in one warmed-up journey uses considerably less fuel than the same errands made as separate cold starts.
Use cruise control on flat highways. Steady speed is efficient. On hilly terrain, though, cruise control can be counterproductive because it accelerates hard to hold speed uphill.
Avoid extended idling. An idling engine gets zero miles per gallon. Modern engines do not need warming up beyond a few seconds before gentle driving, and restarting uses less fuel than idling for more than about a minute.
Choose the right vehicle. The single biggest determinant is what you drive. All-wheel-drive vehicles are generally less efficient than two-wheel-drive equivalents because the drivetrain has more to turn, and larger, heavier, less aerodynamic vehicles pay a permanent penalty.
For context, typical modern figures are roughly:
One counterintuitive property of MPG is worth understanding, because it routinely misleads people comparing vehicles. Improvements at the low end save far more fuel than improvements at the high end. Going from 15 to 20 MPG saves about 1.7 gallons per 100 miles; going from 40 to 50 MPG - a larger jump in both absolute and percentage terms - saves only about 0.5 gallons per 100 miles. This is the "MPG illusion", and it is precisely why L/100 km is the more informative measure: it is linear in fuel consumed, so equal differences represent equal savings.
A single measurement is a snapshot and can easily mislead. One tank measured during a week of highway driving will look excellent; the same car measured over a week of school runs in January will look poor. Neither is wrong, but neither is representative on its own.
Measuring every fill-up for a few months gives you a genuine average and, more usefully, a baseline. Once you know your normal figure, a sudden drop becomes a diagnostic signal - it often precedes a noticeable mechanical symptom, and commonly points to tyre pressure, a failing sensor, a dragging brake, or a new driving pattern. Many drivers find the trend more valuable than any individual reading.
It is also worth being sceptical of the car's own trip computer. Onboard fuel economy displays are estimates derived from injector timing, and they are frequently optimistic by a few percent. The odometer-and-pump method measured here is the ground truth against which the display should be checked.
Once you know your real cost per mile, several everyday questions stop being guesswork. Comparing two vehicles becomes concrete: at 15,000 miles a year, a car returning 22 MPG versus one returning 32 MPG differs by roughly 213 gallons annually, which at $3.50 a gallon is about $745 a year, or well over $5,000 across a typical ownership period. That gap frequently outweighs a modest difference in purchase price.
Evaluating a commute works the same way. An extra 20 miles each way, five days a week, is roughly 10,000 additional miles a year. At 25 MPG and $3.50 a gallon that is about $1,400 in fuel alone, before accounting for the maintenance, tyres, and depreciation that mileage also drives. Knowing your cost per mile turns a vague sense that a longer commute is expensive into a number you can weigh against rent or salary.
Deciding whether to drive or fly is another case where the figure helps. Fuel is only part of driving's true cost, but it is the part people most often underestimate, and comparing it directly against a fare is straightforward once you have a reliable per-mile number.
It is worth remembering that fuel is not the whole picture. Depreciation, insurance, maintenance, and tyres typically add substantially more per mile than fuel does for a newer vehicle. Fuel economy is the most visible and most controllable component, but treat it as one input to a decision rather than the whole answer.
The second. The fuel you add at the end is what replaces exactly what you burned over the measured distance. Using the first fill's volume is the most common error in this calculation and produces a meaningless result.
Because the rating comes from a standardised laboratory cycle with no passengers, no cargo, no air conditioning, mild temperatures, and a prescribed speed profile. Real driving involves cold starts, traffic, higher speeds, and weather. Being 10-20% below the sticker figure is entirely normal.
They measure the same thing in opposite directions. MPG is distance per unit of fuel, so higher is better. L/100 km is fuel per unit of distance, so lower is better. They are related by MPG × L/100 km ≈ 235.2, and the calculator shows both regardless of which units you enter.
No, and the difference is large enough to matter. A US gallon is about 3.785 litres while an imperial (UK) gallon is about 4.546 litres, so an imperial MPG figure is roughly 20% higher than the US figure for the same car. This calculator uses US gallons.
Usually within a few percent, but typically optimistic. Onboard computers estimate consumption from injector data rather than measuring fuel directly. Calculating from odometer readings and actual pump volumes, as here, is the more reliable method - and worth doing a few times to learn your display's bias.
Common causes are under-inflated tyres, a change in driving pattern such as more short trips, colder weather, added weight or a roof rack, or a developing mechanical fault. A failing oxygen sensor, dragging brakes, or a clogged air filter can all cost significant economy. A sharp unexplained drop is worth investigating.
Not unless your engine requires it. In a vehicle designed for regular fuel, higher-octane petrol delivers no measurable economy benefit and simply costs more. In engines that specify premium, using regular can cause the ignition timing to retard, which does reduce both power and economy.
At least three or four to get a meaningful average, and ideally a full year to capture seasonal variation. Any single tank reflects whatever driving happened to fill it, so treat one measurement as a data point rather than an answer.
This Gas Mileage Calculator is provided for educational and general informational purposes only. Results depend entirely on the accuracy of the odometer readings and fuel volumes entered, and on consistent fill-up technique. Fuel economy varies substantially with driving conditions, vehicle condition, load, and weather. Consult a qualified mechanic if you observe an unexplained and persistent drop in fuel economy.