Key numbers
- 300 mi at 30 mpg, $3.50/gal: 10 gal = $35 (11.7¢ per mile)
- 30 mpg (US) = 7.84 L/100 km = 12.75 km/L = 36.0 mpg (UK)
- 1 US gallon = 3.785411784 L; 1 UK gallon = 4.54609 L (exact)
- US regular gas averaged $4.284/gal in the week of Oct 19, 2026 (EIA)
- Slowing down 5–10 mph improves fuel economy 7%–14% (fueleconomy.gov)
On this page
- How to use the Fuel Cost Calculator
- How do you calculate fuel cost for a trip?
- How much gas for a 500, 1,000 or 3,000 mile trip?
- How to use the gas cost calculator
- What is the formula to convert mpg to L/100 km?
- Why does a small mpg gain save so much in a thirsty car?
- How does speed affect fuel economy?
- How do you measure your real mpg with the odometer?
- Tips for a cheaper trip
- Frequently asked questions
How to use the Fuel Cost Calculator
- 1Get a clear view of the skyMount your phone in a holder with a clear view of the sky before you set off.
- 2Tap Start and allow locationYour browser asks for location permission once. The first GPS fix usually arrives in 5–30 seconds.
- 3Pick your unitChoose km/h, mph, knots or m/s. Your choice is remembered on this device.
- 4Read speed, max, average and distanceThe gauge and digital readout update about once a second. Distance and average count only while you are moving.
- 5Stop or resetTap Stop to pause, Reset to clear the trip. Nothing is stored or sent anywhere.
Works in any modern phone browser. Back to the tool ↑

How do you calculate fuel cost for a trip?
Fuel cost = distance ÷ fuel economy × fuel price. A 300-mile drive in a car that gets 30 mpg burns 300 ÷ 30 = 10 US gallons; at $3.50 a gallon that is $35. The fuel cost calculator above does exactly this, then doubles it for a round trip and splits it between passengers.
gallons = miles ÷ mpg · cost = gallons × price per gallon · cost per mile = price ÷ mpg
In metric countries fuel economy is quoted the other way round, as fuel per distance (L/100 km) or distance per fuel (km/L):
litres = km × L/100 km ÷ 100 · litres = km ÷ km/L · cost = litres × price per litre
Internally the calculator converts everything to kilometres and litres using exact definitions from NIST SP 811 (1 mile = 1.609344 km, 1 US gallon = 3.785411784 L, 1 UK gallon = 4.54609 L), so you can mix units freely: miles with L/100 km, or km/L with a price per US gallon. It rounds only for display, and the maths is covered by unit tests.
How much gas for a 500, 1,000 or 3,000 mile trip?
Divide the miles by your mpg for gallons, then multiply by the price. At the EIA US average of $4.284 a gallon (regular, week of Oct 19, 2026), a 1,000-mile drive costs about $143 at 30 mpg. The average new US vehicle gets 27.2 mpg in real-world driving according to the EPA Automotive Trends Report (model year 2024), so 25–30 mpg is a fair guess if you don’t know yours.
| Trip (one way) | 20 mpg (pickup, large SUV) | 25 mpg (midsize SUV) | 30 mpg (sedan) | 40 mpg (hybrid) |
|---|---|---|---|---|
| 400 miles | 20 gal · $86 | 16 gal · $69 | 13.3 gal · $57 | 10 gal · $43 |
| 500 miles | 25 gal · $107 | 20 gal · $86 | 16.7 gal · $71 | 12.5 gal · $54 |
| 1,000 miles | 50 gal · $214 | 40 gal · $171 | 33.3 gal · $143 | 25 gal · $107 |
| 3,000 miles | 150 gal · $643 | 120 gal · $514 | 100 gal · $428 | 75 gal · $321 |
Computed at $4.284 per US gallon; prices vary by state and week, so enter today’s local price above. Highway speed matters too: fueleconomy.gov says mileage drops rapidly above 50 mph, so a 3,000-mile interstate trip at 75–80 mph can use more fuel than the label suggests.
How many miles is $20 of gas?
At $4.284 a gallon, $20 buys 4.67 gallons: about 93 miles at 20 mpg, 117 miles at 25 mpg, 140 miles at 30 mpg and 187 miles at 40 mpg. The formula is dollars ÷ price per gallon × mpg.
How to use the gas cost calculator
Pick US or Metric, enter distance, fuel economy and fuel price, and read the total. Everything updates as you type.
- Choose a unit system. US loads miles, mpg (US) and $ per gallon; Metric loads km, L/100 km and price per litre. You can still change any unit by hand.
- Trip distance (one way). Take it from a map app, or from your GPS odometer after the drive.
- Fuel economy. mpg (US), mpg (UK), L/100 km or km/L. Use your measured figure (see below) rather than the window-sticker number if you have it.
- Fuel price. Per US gallon, per UK gallon or per litre, in any currency: dollars, pounds, rupees or rupiah all work because the calculator never converts money.
- Round trip and People sharing. Tick Round trip to double the distance; set people to split the bill.
The results show Total fuel cost, Fuel used, Cost per distance (per mile or per km) and Per person, plus a line converting your fuel economy into all three systems.
Three worked trips (computed with the site's fuel library)
US road trip: 300 mi each way, 30 mpg, $4.284/gal (EIA average, week of Oct 19, 2026), round trip, 4 people → 20 gal, $85.68, $21.42 each.
India: 500 km at 15 km/L, ₹100 per litre → 33.33 L, ₹3,333, ₹6.67 per km.
UK: 200 miles at 45 mpg (UK), £1.40 per litre → 20.2 L, £28.29, 14.1p per mile.
What is the formula to convert mpg to L/100 km?
L/100 km = 235.215 ÷ US mpg, and L/100 km = 282.481 ÷ UK mpg. Because one unit measures distance per fuel and the other fuel per distance, the conversion is a division, not a multiplication, and it works the same in both directions. km/L is simply 100 ÷ L/100 km.
| US mpg | L/100 km | km/L | UK mpg | US gal per 1,000 mi | Fuel cost per 1,000 mi at $4.284/gal |
|---|---|---|---|---|---|
| 15 | 15.7 | 6.4 | 18.0 | 66.7 | $286 |
| 20 | 11.8 | 8.5 | 24.0 | 50.0 | $214 |
| 25 | 9.4 | 10.6 | 30.0 | 40.0 | $171 |
| 30 | 7.8 | 12.8 | 36.0 | 33.3 | $143 |
| 35 | 6.7 | 14.9 | 42.0 | 28.6 | $122 |
| 40 | 5.9 | 17.0 | 48.0 | 25.0 | $107 |
| 50 | 4.7 | 21.3 | 60.0 | 20.0 | $86 |
Table computed with src/lib/fuel.ts; price is the EIA US regular retail average for the week of October 19, 2026, used as a dated example only. Prices change every week and differ widely by state and country, so type the price at your pump.
UK figures look about 20% better than US ones for the same car because the imperial gallon is larger (4.54609 L vs 3.785411784 L). Always check which gallon a quoted mpg uses before comparing cars across the Atlantic.
Why does a small mpg gain save so much in a thirsty car?
Because fuel used is distance divided by mpg, the savings shrink as mpg rises. Going from 10 to 20 mpg saves 50 gallons every 1,000 miles; going from 40 to 50 mpg saves only 5.

This is why fuel per distance (L/100 km, or gallons per 100 miles) is the clearer measure for comparing running costs: it scales straight with what you pay. If you are choosing between replacing a 15 mpg truck or a 35 mpg sedan, the truck upgrade saves far more fuel.
How does speed affect fuel economy?
Above about 50 mph, fuel economy usually falls quickly. The US Department of Energy and EPA’s fueleconomy.gov says “gas mileage usually decreases rapidly at speeds above 50 mph” and suggests treating each 5 mph over 50 as paying roughly an extra $0.30 per gallon. Its estimates come from an Oak Ridge National Laboratory study (SAE paper 2013-01-1113).
The same page puts numbers on other habits:
| Driving habit (fueleconomy.gov) | Effect on fuel economy |
|---|---|
| Slowing down 5–10 mph on the highway | 7%–14% better |
| Aggressive driving (speeding, hard acceleration and braking), highway | 15%–30% worse |
| Aggressive driving, stop-and-go traffic | 10%–40% worse |
| An extra 100 lb in the vehicle | about 1% worse |
| Idling | ¼ to ½ gallon per hour |
Put into a trip: 1,000 miles in a 25 mpg car at $4.284/gal costs $171.36. A 7% improvement (26.75 mpg) brings it to $160.15 and 14% (28.5 mpg) to $150.32, a saving of $11–$21. Speed also changes travel time, so weigh both: the speed, distance and time calculator shows that 65 instead of 70 mph adds under 7 minutes per 100 miles.
To hold a steady, economical speed, check it against an independent reading. Car speedometers often read a little high; the online speedometer uses your phone’s GPS, and GPS vs car speedometer explains the difference. GPS speed is itself an estimate that depends on signal and sky view.
How do you measure your real mpg with the odometer?
Fill up, reset the trip odometer, drive, refill, and divide miles by gallons added. This “tank-to-tank” method uses the fuel you actually bought, so it captures your driving, load and weather.
- Fill the tank until the pump clicks off. Reset trip meter A (or start the GPS odometer).
- Drive normally for most of a tank.
- Refill at the same pump if possible, again to the first click. Note the gallons (or litres) added.
- Divide: 312.4 miles ÷ 11.2 gallons = 27.9 mpg. In metric, litres × 100 ÷ km gives L/100 km.
- Repeat for three or more tanks and average, because the click-off point varies.
Two errors creep in. Your odometer distance depends on tire size, so worn or replacement tires shift it a few percent; the tire size calculator shows how much. And the dashboard’s “average mpg” display is an estimate that may differ from tank-to-tank figures, so trust the pump.
Tips for a cheaper trip
Drive smoothly, keep highway speeds moderate, and carry less. These cost nothing and come straight from the DOE figures above.
- Use the real distance, door to door, both ways. The commonest underestimate is forgetting the return leg; tick Round trip.
- Use your measured mpg, not the label. Highway mpg at 75 mph, a roof box or a full load can be well below the sticker.
- Avoid long idling. At ¼ to ½ gallon an hour it adds up in drive-throughs and queues.
- Split fairly. Agree before the trip whether tolls and parking are shared too; the calculator covers fuel only.
The calculator gives an estimate for planning: real use varies with traffic, terrain, weather and vehicle condition, and it is not a quote or legal record. If you are the driver, enter numbers before you leave or let a passenger do it; never operate a phone while driving.
FAQ
Frequently asked questions
How do I calculate fuel cost for a trip?
Divide the distance by your fuel economy to get gallons, then multiply by the price per gallon. 300 miles ÷ 30 mpg = 10 gallons; 10 × $3.50 = $35. Double it for a round trip and divide by the number of people to split it.
How do you calculate gas mileage (mpg)?
Fill the tank, reset the trip odometer, drive normally, then refill and divide the miles driven by the gallons you added. 312.4 miles ÷ 11.2 gallons = 27.9 mpg. Average three or more fill-ups for a reliable figure.
How do you convert mpg to L/100 km?
Divide 235.215 by the US mpg figure. 30 mpg is 235.215 ÷ 30 = 7.84 L/100 km, and 25 mpg is 9.41 L/100 km. The same formula works backwards: 235.215 ÷ L/100 km gives US mpg. For UK mpg use 282.481 instead.
How much does it cost to drive 1,000 miles?
At $4.284 a gallon (EIA US regular average, week of Oct 19, 2026), 1,000 miles costs about $171 in a 25 mpg car, $143 at 30 mpg and $107 at 40 mpg. Enter your own price in the calculator, since prices change weekly and by state.
How many miles is $20 of gas?
Divide $20 by the price per gallon, then multiply by your mpg. At the EIA US average of $4.284 a gallon (Oct 19, 2026), $20 buys 4.67 gallons: about 117 miles in a 25 mpg car, 140 miles at 30 mpg and 187 miles in a 40 mpg hybrid.
How much will gas cost for a 500-mile trip?
About $71 in a 30 mpg car at $4.284 a gallon, the EIA US average for the week of Oct 19, 2026: 500 ÷ 30 = 16.7 gallons. A 20 mpg pickup needs 25 gallons ($107) and a 40 mpg hybrid 12.5 gallons ($54). Double it for the drive home.
What is the most fuel-efficient speed to drive?
For most cars it is below about 50 mph. The US Department of Energy says gas mileage usually decreases rapidly above 50 mph, and that each 5 mph over 50 is like paying about $0.30 more per gallon. Slowing down 5–10 mph improves fuel economy 7%–14%.
How do I calculate fuel cost per mile?
Divide the price per gallon by your mpg. At $3.50 a gallon and 30 mpg, fuel costs 3.50 ÷ 30 = $0.117, about 11.7 cents per mile. In metric, multiply L/100 km by the price per litre and divide by 100 for cost per km.
Is a UK gallon the same as a US gallon?
No. A UK (imperial) gallon is 4.54609 litres and a US gallon is 3.785411784 litres, so the UK gallon is about 20% larger. That is why 30 mpg in the US equals about 36 mpg in the UK for the same car.
How do I split gas money for a road trip?
Work out the total fuel cost for the whole trip, including the drive home, and divide by the number of people. A 300-mile trip each way at 30 mpg and $4.284 a gallon costs $85.68, or $21.42 each for four people.
4 Sources
- U.S. DOE / EPA fueleconomy.gov: Driving More Efficiently (mileage drops rapidly above 50 mph; +$0.30/gal per 5 mph; 7%–14% from slowing 5–10 mph)
- U.S. Energy Information Administration: Gasoline and Diesel Fuel Update (US regular $4.284/gal, week of Oct 19, 2026)
- U.S. EPA Automotive Trends Report, highlights (MY2024 new-vehicle real-world fuel economy record 27.2 mpg)
- NIST SP 811, Appendix B.9: gallon (US) = 3.785411784 L, gallon (UK) = 4.54609 L, mile = 1,609.344 m
Last updated October 25, 2026 by Izhar Ahmad Danish. Found an error? Tell us.
