How to Use the Fuel Cost Calculator
This calculator handles four fuel-related scenarios: estimate the cost of a trip, calculate your vehicle's fuel efficiency, compare prices between two gas stations, and estimate how far you can travel on a tank of fuel. It supports miles and kilometers for distance, gallons and liters for volume, and four efficiency units: MPG (US), MPG (Imperial), L/100km, and km/L.
Calculation Modes
Trip Cost
Enter your trip distance, vehicle efficiency, and fuel price. The calculator shows the total trip cost and how much fuel you need.
Example: 300 miles, 25 MPG (US), $3.50/gallon
- Distance: 300, Unit: miles
- Efficiency: 25, Unit: MPG (US)
- Price per Gallon: 3.50, Volume Unit: gallons
- Fuel Needed: 12 gallons
- Trip Cost: $42
After calculating, a Trip Cost Breakdown table appears showing Total Cost, Fuel Needed, and Cost per Gallon or Liter.
Example: 500 kilometers, 7.5 L/100km, $1.60/liter
- Distance: 500, Unit: km
- Efficiency: 7.5, Unit: L/100km
- Price per Liter: 1.60, Volume Unit: liters
- Fuel Needed: 37.5 liters
- Trip Cost: $60
After calculating, the same Trip Cost Breakdown table appears.
Efficiency
Enter the distance you traveled and how much fuel you used. The calculator converts to your chosen efficiency unit and shows consumption and cost metrics.
Example: 300 miles, 10 gallons, calculate as MPG (US)
- Distance: 300, Unit: miles
- Fuel Used: 10, Unit: gallons
- Calculate As: MPG (US)
- Efficiency: 30 MPG (US)
- Consumption Rate: 3.3333333 gal/100mi
- Cost per Mile: $0.11666667/mi
- Cost per 100 Miles: $11.666667/100mi
After calculating, two tables appear. The Efficiency Results table shows Efficiency, Consumption Rate, Cost per Mile, and Cost per 100 Miles. The Efficiency Reference table shows ratings from Excellent to Below Average with corresponding MPG (US) and L/100km ranges.
Example: 250 miles, 10 gallons, calculate as MPG (US)
- Distance: 250, Unit: miles
- Fuel Used: 10, Unit: gallons
- Calculate As: MPG (US)
- Efficiency: 25 MPG (US)
- Consumption Rate: 4 gal/100mi
- Cost per Mile: $0.14/mi
- Cost per 100 Miles: $14/100mi
After calculating, the same two tables appear.
Comparison
Enter your trip distance, vehicle efficiency, and fuel prices at two stations. The calculator shows how much you save by choosing the cheaper option.
Example: 300 miles, 25 MPG (US), Station 1 at $3.50, Station 2 at $3.30
- Distance: 300, Unit: miles
- Efficiency: 25, Unit: MPG (US)
- Station 1 Price: 3.50
- Station 2 Price: 3.30
- Station 1 Cost: $42
- Station 2 Cost: $39.6
- Your Savings: $2.4
After calculating, two tables appear. The Price Comparison Breakdown shows Station 1 Cost, Station 2 Cost, and Your Savings. The Annual Projection shows Per Week, Per Month, and Per Year savings based on making that same trip every week for 52 weeks.
Range
Enter how much fuel you have and your vehicle's efficiency. The calculator estimates how far you can travel.
Example: 10 gallons, 30 MPG (US), show range in miles
- Fuel Available: 10, Unit: gallons
- Efficiency: 30, Unit: MPG (US)
- Show Range In: miles
- Estimated Range: 300 miles
- Round Trip: 150 miles
- 75% Fuel (Reserve): 225 miles
- 50% Fuel: 150 miles
After calculating, two tables appear. The Range Estimation table shows Estimated Range, Round Trip, 75% Fuel (Reserve), and 50% Fuel. The Range Reference table shows typical distances for daily commutes, weekend trips, long road trips, and cross-country drives.
Example: 45 liters, 6.5 L/100km, show range in kilometers
- Fuel Available: 45, Unit: liters
- Efficiency: 6.5, Unit: L/100km
- Show Range In: km
- Estimated Range: 692.30769 km
- Round Trip: 346.15385 km
- 75% Fuel (Reserve): 519.23077 km
- 50% Fuel: 346.15385 km
After calculating, the same two tables appear.
Precision and Notation Settings
Use the settings bar above the tabs to control how results display:
- Decimal places: Adjust from 0 to 16 decimal places (default is 8)
- Notation: Switch between auto, fixed, exponential, and engineering notation (default is auto)
Your decimal places and notation settings save to your browser automatically. When you return to this calculator, your last chosen format loads without needing to adjust it again.
Common Use Cases
Budgeting a Road Trip
You are driving 450 miles in a car that gets 28 MPG, and gas is $3.75/gallon:
- Switch to Trip Cost
- Distance: 450, Unit: miles
- Efficiency: 28, Unit: MPG (US)
- Price: 3.75, Volume Unit: gallons
- Trip Cost: $60.267857
Checking Your Real-World MPG
You drove 280 miles and used 9.5 gallons:
- Switch to Efficiency
- Distance: 280, Unit: miles
- Fuel Used: 9.5, Unit: gallons
- Calculate As: MPG (US)
- Efficiency: 29.473684 MPG (US). Check the Efficiency Reference table for your rating
Choosing Between Two Stations
Station A on your route charges $3.45/gallon. Station B two miles away charges $3.25/gallon. For a 300-mile weekly commute in a 25 MPG car:
- Switch to Comparison
- Distance: 300, Unit: miles
- Efficiency: 25, Unit: MPG (US)
- Station 1 Price: 3.45, Station 2 Price: 3.25
- Your Savings: $2.4 per trip. The Annual Projection shows $124.8 per year
Planning a Long Drive
You have 12 gallons left and your car gets 26 MPG:
- Switch to Range
- Fuel Available: 12, Unit: gallons
- Efficiency: 26, Unit: MPG (US)
- Show Range In: miles
- Estimated Range: 312 miles
- Check the 75% Fuel (Reserve) row for a conservative estimate: 234 miles
Tips for Accurate Calculations
- Match your units to your region: pick what you normally use; conversions are automatic
- MPG (US) and MPG (Imp) are different: an Imperial gallon is larger, so pick the one used in your country
- Lower L/100km means better efficiency: it is the inverse of MPG
- The price label changes dynamically: it switches between Price per Gallon and Price per Liter based on your volume unit
- Comparison mode projects annual savings: it assumes that same trip every week for 52 weeks
- Use the 75% Fuel row as a buffer: plan refueling stops at about three-quarters of your range
- Efficiency mode uses a fixed $3.50/gal reference: your actual cost depends on local prices
- Comparison mode converts to gallons internally: any distance and efficiency units work
Troubleshooting
Required
This appears when a field is left empty. Enter a value in all required fields before calculating.
Distance must be positive
Enter a positive distance. Zero and negative distances are not valid.
Efficiency must be positive
Enter a positive efficiency value. Zero and negative efficiency are not valid.
Price cannot be negative
Fuel prices can be zero or positive. Negative prices are not valid.
Fuel used must be positive
In Efficiency mode, enter a positive amount of fuel consumed.
Fuel amount must be positive
In Range mode, enter a positive amount of available fuel.
Please select a distance unit
Choose miles or kilometers from the dropdown.
Please select a volume unit
Choose gallons or liters from the dropdown.
Please select an efficiency unit
Choose MPG (US), MPG (Imp), L/100km, or km/L from the dropdown.
Please select a fuel unit
In Range mode, choose gallons or liters from the dropdown.
Please enter valid numbers
One or more fields contains non-numeric text. Enter numbers only.
Values must be positive
Zero or negative values were entered where only positive values are accepted. Check that distance, efficiency, fuel used, and fuel amount are all greater than zero.
Breakdown tables not appearing
The details section renders after a successful calculation with no validation errors. Check that all required fields are filled and valid, then click Calculate.