Fuel Cost and MPG Calculator

Plan what a drive will cost in gas, or check how many miles per gallon your car really gets. Enter the distance, your fuel economy and the price at the pump, and the calculator does the rest, with metric figures alongside.

Enter your trip or fill-up

From your map app.

Your car's miles per gallon. 25 is only an example.

The default, $4.00, is an example price. Type the price at your station.

Whole number, 1 or more.

Fuel cost

$48.00

12 gallons for 300 miles

Trip fuel cost
Distance driven300 miles · 482.8 km
Fuel economy25 mpg · 9.41 L/100 km
Fuel used12 gallons · 45.4 L
Price per gallon$4.00
Fuel cost$48.00
Cost per mile$0.16

Formula: gallons = miles ÷ mpg; cost = gallons × price per gallon. The default $4.00 a gallon is an example price, not today's price: type the price at your station. The U.S. Energy Information Administration publishes the weekly U.S. average in its Gasoline and Diesel Fuel Update.

How much does gas cost for a trip?

Divide the miles by your miles per gallon to get the gallons, then multiply by the price per gallon. A 300-mile trip at 25 mpg uses 12 gallons, which costs $48.00 at the $4.00 example price, or $0.16 a mile. For a round trip the distance doubles, and if friends share the ride you can split the total.

Gallons = miles ÷ mpg
Fuel cost = gallons × price per gallon
Cost per mile = price per gallon ÷ mpg

The cost per mile is handy for comparing cars: it does not depend on the trip at all, only on the price and the fuel economy.

Fuel cost per mile

To find the fuel cost per mile, divide the price of a gallon by the miles per gallon. At $3.50 a gallon and 25 mpg that is $3.50 ÷ 25 = $0.14 a mile. The gallons per mile is the flip side, 1 ÷ mpg: 0.04 gallons a mile at 25 mpg. These prices are examples, so replace them with the one on your station's sign.

Fuel cost per mile at three example gas prices
Fuel economyGallons per mile$3.00 a gallon$3.50 a gallon$4.00 a gallon
15 mpg0.067$0.200$0.233$0.267
20 mpg0.05$0.150$0.175$0.200
25 mpg0.04$0.120$0.140$0.160
30 mpg0.033$0.100$0.117$0.133
40 mpg0.025$0.075$0.088$0.100
50 mpg0.02$0.060$0.070$0.080

The example gas price

The price box starts at $4.00 a gallon. That is an example price, a round number for you to replace, not today's price. Gas prices change every week and differ a lot from one state to another, so type the price on the sign at your station. For the national figure, the U.S. Energy Information Administration publishes the average retail price of regular gasoline every week in its Gasoline and Diesel Fuel Update.

Fuel cost of 100 miles at $4.00 a gallon
Fuel economyGallonsCostL/100 km
15 mpg6.67$26.6715.7
20 mpg5$20.0011.8
25 mpg4$16.009.4
30 mpg3.33$13.337.8
40 mpg2.5$10.005.9
50 mpg2$8.004.7

Worked example: a 300-mile drive

A car that gets 25 mpg makes a 300-mile trip with gas at $4.00 a gallon, the example price.

  • Gallons: 300 ÷ 25 = 12 gallons (45.4 liters)
  • Cost: 12 × $4.00 = $48.00
  • Cost per mile: $4.00 ÷ 25 = $0.16

Make it a round trip of 600 miles shared by three people, and the car burns 24 gallons that cost $96.00, or $32.00 each.

How do you calculate miles per gallon?

Divide the miles you drove by the gallons it took to refill the tank. The rating on a window sticker is a lab figure, and your own driving, speed, load and weather move it up or down. To measure yours, fill the tank and reset the trip meter. Drive as usual, fill the tank again, and note the gallons on the receipt.

Say the trip meter shows 350 miles and the second fill takes 12.5 gallons. That is 350 ÷ 12.5 = 28 mpg, or 8.4 liters per 100 km. At $4.00 a gallon those miles cost $50.00, about $0.143 a mile. Averaging several tanks gives a steadier number than a single one.

Sharing the cost of a ride

Carpools and group trips often split the fuel bill evenly. Enter how many people share the cost and the calculator divides the total for you. The cost per mile stays the same whoever pays, so for riders who join for only part of a trip, multiply the miles they ride by the cost per mile instead. At $4.00 a gallon and 25 mpg, a rider who joins for 80 of the 300 miles owes $12.80 of the fuel. Tolls and parking are separate costs, so add them to the total yourself. To split tolls, parking and other shared costs among the riders, use the split bill calculator.

Miles per gallon and liters per 100 km

Most of the world states fuel use as liters per 100 kilometers, which runs the other way: a lower number means less fuel. The two convert with fixed factors, 1 mile = 1.609344 km and 1 U.S. gallon = 3.785411784 liters, so liters per 100 km = 235.21 ÷ mpg. The calculator shows both, which helps when a rental car or an owner's manual uses the metric figure.

Working out the cost of driving an electric car instead? Use the electricity cost calculator with the charger's kilowatt-hours. For larger wheels, the tire size calculator shows how a new size changes what the odometer counts, and so your measured mpg. To budget a heating bill in the same way, try the heating cost calculator, and to total the hours of a long drive, the hours calculator.

Fuel Cost and MPG Calculator FAQ

How do I calculate the gas cost of a trip?

Divide the miles by your mpg to get gallons, then multiply by the price per gallon. 300 miles at 25 mpg is 12 gallons, $48.00 at $4.00 a gallon.

How do I work out my miles per gallon?

Fill the tank, reset the trip meter, drive, then fill up again. Divide the miles driven by the gallons it took to refill the tank.

Is the default gas price today's price?

No. $4.00 is an example price. Type the price at your station; the Energy Information Administration publishes the weekly U.S. average in its Gasoline and Diesel Fuel Update.

How do I convert mpg to liters per 100 km?

Divide 235.21 by the miles per gallon. 25 mpg is about 9.41 liters per 100 km.

How do you work out the fuel cost per mile?

Divide the price of a gallon by your mpg. At $3.50 a gallon and 25 mpg the fuel costs $0.14 a mile, so 100 miles cost $14.00.

Guides

Last updated . Free to use, no sign-up. How we check our numbers.