The Handy Calculators logoTheHandyCalculators.com

    Gas Mileage Calculator

    MPG from miles and gallons, plus total trip fuel cost at any price per gallon.

    Autosave on
    Fuel economy
    29.1 MPG
    Metric equivalent
    8.1 L/100km
    Cost per mile
    $0.12

    Trip cost estimator

    Fuel needed
    17.2 gal
    Total trip cost
    $60.16

    Calculate fuel efficiency in MPG (or L/100 km) from miles driven and gallons used at the pump, then estimate the total cost of any upcoming trip at today's gas price.

    How MPG and L/100 km are calculated

    Miles per gallon (MPG) is simply distance driven divided by fuel consumed: MPG = miles ÷ gallons. To get an accurate reading, fill the tank, reset your trip odometer, drive normally for a full tank or two, then refill to the same level (auto shut-off click) and divide trip miles by the gallons it took to top off. A single fill-up gives a noisy estimate; averaging 2–3 tanks smooths out variation from terrain, traffic, and weather.

    Outside the US, fuel economy is reported in liters per 100 kilometers (L/100 km), which inverts the relationship — lower is better. The conversion is L/100 km = 235.215 ÷ MPG. So 30 MPG = 7.84 L/100 km; 40 MPG = 5.88 L/100 km. The 235.215 constant comes from converting gallons to liters (× 3.785) and miles to kilometers (× 1.609), then inverting.

    Cost per mile is the practical metric most drivers actually care about: price per gallon ÷ MPG. At $3.50/gallon and 28 MPG, every mile costs 12.5¢ in fuel. Multiply by your trip distance to estimate fuel cost — this calculator does that automatically in the trip-cost panel.

    Worked example

    You fill up after driving 320 miles and the pump shows 11.0 gallons at $3.50/gallon. MPG = 320 ÷ 11 = 29.1. Metric equivalent = 235.215 ÷ 29.1 = 8.08 L/100 km. Cost per mile = $3.50 ÷ 29.1 = $0.120/mile.

    Planning a 500-mile road trip in the same vehicle: fuel needed = 500 ÷ 29.1 = 17.2 gallons; total fuel cost = 17.2 × $3.50 = $60.20. Round up 10–15% to account for traffic, A/C use, and detours and you'd budget about $70.

    If you switched to a hybrid that gets 48 MPG on the same route: fuel needed = 10.4 gallons, cost = $36.40. The same 500-mile trip costs ~$24 less. Over 12,000 miles/year that's roughly $580 saved on fuel alone.

    Why your real-world MPG differs from the EPA sticker

    EPA tests use controlled driving cycles on a dynamometer with no wind, no hills, mild temperature, and a trained driver. Real-world conditions consistently give 10–20% lower MPG than the sticker.

    Cold starts: an engine needs 5–10 minutes to reach efficient operating temperature. Short trips (under 4 miles) can cut MPG by 30%+.

    A/C and heater: A/C draws 1–4 horsepower from the engine. On a small car, that can shave 10–25% off MPG in summer city driving.

    Speed: aerodynamic drag rises with the square of speed. Going 75 mph instead of 65 mph typically costs 10–15% MPG. Going 85 vs 65 can cost 25%.

    Driving style: aggressive acceleration and hard braking convert fuel directly into heat through the brakes. Smooth driving alone can recover 10–20% MPG.

    Cargo and roof racks: 100 lbs of extra weight ≈ 1% MPG loss; an empty roof rack can cost 2–8% from drag alone.

    How to actually improve your MPG

    Inflate tires to spec — under-inflated tires cost ~3% MPG and wear unevenly. Check monthly when cold.

    Remove roof boxes, racks, and bike carriers when not in use. The drag penalty is permanent whether they're loaded or empty.

    Use cruise control on flat highway stretches; manually feathering the throttle wastes fuel.

    Combine errands into one trip with a fully warmed engine instead of three cold starts.

    Replace clogged air filters and use the manufacturer's recommended motor oil viscosity — both can move the needle 1–3%.

    If you drive 12,000+ miles per year, the spread between a 25 MPG vehicle and a 45 MPG vehicle at $3.50/gallon is about $1,300/year — a meaningful input to next-vehicle decisions.

    Frequently asked questions

    How is MPG calculated?

    Miles driven ÷ gallons used to refill the tank. The most accurate way: fill up, reset trip odometer, drive normally, refill to the same level, and divide trip miles by the gallons it took to top off.

    How do I convert MPG to L/100 km?

    L/100 km = 235.215 ÷ MPG. So 30 MPG ≈ 7.84 L/100 km. Lower L/100 km is better; higher MPG is better.

    Why does my real-world MPG differ from EPA?

    EPA tests use controlled cycles. Real driving with cold starts, A/C, hills, and traffic typically returns 10–20% lower MPG. Aggressive acceleration can cut another 15–30%.

    What gas price should I use?

    Use the price you actually paid at your last fill-up — or check AAA's national average for trip planning. Premium fuel only matters if your engine requires it; most cars rated for 87 octane gain nothing from 91+.

    How can I improve MPG?

    Inflate tires to spec (under-inflated tires cost ~3% MPG), remove roof racks when unused, drive 55–65 mph on highways (vs 75+), and avoid jackrabbit starts. Combined, these can add 10–20%.

    Is MPG the same as fuel efficiency?

    Yes for gasoline vehicles. EVs use MPGe (miles per gallon equivalent) where 33.7 kWh = 1 gallon of gasoline equivalent energy. A 100 MPGe EV uses 33.7 kWh of electricity per 100 miles.

    Why average multiple fill-ups instead of just one?

    A single fill-up can swing 10–15% based on whether the pump auto-shut-off triggered at the same level, terrain on that tank, and weather. Averaging 3–5 tanks gives a much more reliable MPG reading for budgeting and comparisons.

    How much fuel does idling actually waste?

    An idling car burns roughly 0.2–0.5 gallons per hour depending on engine size and accessories like A/C. At $3.50/gallon, 30 minutes of daily idling costs about $130/year. Modern engines don't need warm-up idling — drive gently for the first mile instead.

    By Larius software engineer, NC real estate broker & CRE/business appraiserReviewed by the Handy Calculators editorial teamHow we build calculators

    More in Vehicles & Symbols

    Everyday conversions: miles-per-gallon and trip fuel cost, plus Arabic↔Roman numeral conversion (1–3999).

    See hub →
    Browse all Conversions →