Automotive
Instant, private, and free
Gas Mileage Calculator.
Calculate your car's MPG, L/100km, and trip fuel cost.
Set your values
Results update as you type.
How to Use
Enter the distance you drove, the fuel you used, and the fuel price to compute your vehicle's fuel economy and the cost of the trip.
FAQs
How is MPG calculated?
MPG = Distance (miles) ÷ Fuel Used (gallons). For metric mode, we compute L/100km = (Fuel Used in L ÷ Distance in km) × 100.
What is the difference between MPG and L/100km?
MPG (US/imperial) is distance per fuel unit — higher is better. L/100km (metric) is fuel per fixed distance — lower is better.
How do I estimate trip cost?
Trip Cost = Fuel Used × Fuel Price. Use the cost-per-mile value to project costs across longer distances.
How to Use the Gas Mileage Calculator
Compute your vehicle's MPG (or L/100km) and trip fuel cost based on the distance you drove and the fuel you used.
- Pick a unit system: imperial (miles and gallons) or metric (km and liters).
- Enter the distance you traveled on your trip.
- Enter the fuel you used for that trip.
- Enter the price per gallon (or per liter) for trip cost estimates.
Fuel Economy Formulas
MPG
Higher MPG = better fuel economy.
Example:
Input: 300 miles, 10 gallons
Calculation: 300 ÷ 10
Result: 30 MPG
L/100km
Lower L/100km = better fuel economy.
Example:
Input: 40 liters, 500 km
Calculation: (40 ÷ 500) × 100
Result: 8 L/100km
Trip Cost
Multiply gallons by $/gallon (or liters by $/liter).
Example:
Input: 10 gal × $3.50
Calculation: 10 × 3.50
Result: $35.00
Real-World Use Cases
Road Trips
Plan fuel budgets for long drives.
MPG Tracking
Compare fill-ups to see if your car's efficiency is changing.
Tips
Tips
- Fill up your tank completely to get accurate MPG per tank.
- Cost per mile is a great way to compare commutes or vehicles.
Related Calculators
Cite this calculator
Canonical URL: https://mathify.one/en/automotive/gas-mileage
Cite as: Mathify. (2026). Gas Mileage Calculator. https://mathify.one/en/automotive/gas-mileage
Use Cases
Track Your Vehicle's Fuel Efficiency
Monitor your car's MPG or L/100km over time to identify changes in fuel economy, which can indicate maintenance issues or driving habit impacts.
Example: After a road trip, enter 300 miles and 10 gallons to see your MPG.
Budget for a Trip
Estimate the total fuel cost for an upcoming journey by entering the expected distance, your vehicle's typical fuel consumption, and current fuel price.
Example: Plan a 500-mile trip with a car that gets 25 MPG and gas at $3.50/gallon.
Frequently Asked Questions
- How do I calculate my car's MPG?
- Enter the distance traveled and the fuel used (in gallons) into the calculator. It will automatically compute your miles per gallon (MPG) by dividing distance by fuel used.
- Can I use liters and kilometers?
- Yes, the calculator supports metric units. Enter distance in kilometers and fuel used in liters to get fuel economy in L/100km, along with trip fuel cost and cost per kilometer.
- What is cost per mile?
- Cost per mile is the total fuel cost for your trip divided by the distance traveled. It helps you understand the fuel expense for each mile driven.
Tips & Common Mistakes
Tips
- For accurate MPG, fill your tank completely, reset your trip odometer, and record the distance and fuel needed to refill next time.
- Use the same units (imperial or metric) for both distance and fuel to avoid calculation errors.
- Check your tire pressure regularly; under-inflated tires can lower fuel economy.
- Compare your calculated MPG with the EPA rating for your vehicle to spot potential issues.
Common Mistakes to Avoid
- Mixing units, such as entering miles with liters, which leads to incorrect results.
- Using the fuel price per gallon when you entered fuel in liters, or vice versa.
- Forgetting to include the fuel used for the entire trip, not just a portion.
Last updated: August 13, 2026