How to calculate trip gas cost
Gas cost = (Miles ÷ MPG) × Price per gallon
Worked example. Total gas cost: $70.00.
Example inputs — Trip distance (one way): 300 miles; Round trip?: Yes, round trip; Your car's fuel economy: 30 MPG; Gas price per gallon: $3.50. Starting values are illustrative.
From George Guju, founder of Calculyn · Educational calculator guidance, not professional advice.
How it works
Divide your total miles by your car's MPG to get gallons needed, then multiply by the price per gallon. Round trips double the one-way distance.
Assumptions & limitations
- Constant fuel economy for the whole trip
- Round trip doubles the one-way distance
- Gas price stays the same along the route
Formula and assumptions reviewed October 2026 by the Calculyn team. How we build our calculators
Frequently asked questions
How do I find my car's real MPG?
Reset your trip computer at a fill-up and check it at the next one, or divide miles driven by gallons pumped.
Should I add extra for city driving or detours?
Adding 10% to the distance is a good buffer for detours, traffic, and driving around at your destination.
