Free calculatorLive resultsSteps and sourcesEmbed on your site, free

Cost Gas Calculator

Fuel Cost and Trip Calculator works out Fuel cost and Total trip cost from Solve for, Distance and Distance unit. The default figures on this page give total trip cost of 35; change any entry and the result, the working and the sources update together.

Total trip cost
35
Fuel Cost and Trip Calculator
Fuel cost
35
Cost per person
35
Fuel needed
10
Fuel needed
10 US gallons
Distance travelled
300
Cost per mile or km
0.1167
Economy in US mpg
30
Economy in L/100km
7.8405
Economy in km/L
12.7543
Worked out from US EPA fuel economy definitions and the mpg to L/100km relationship and 1 other source.

Your figures

Updates as you type
Formatting only. This does not change the calculation.
One-way distance, unless the round-trip option is on.
Ignored when solving for economy.
Price per unit volume, in the volume unit selected below.
Used when solving for economy or distance.
Used only when solving for the fuel price the trip actually worked out at.

How this is worked out

2 steps
  1. Fuel needed = 300 mi / economy = 10 US gallons.
  2. Cost = 10 x 3.5 = 35.

Its 9 worked examples are re-run on every release, last on 15 September 2026. What changed

Sources and references

2 sources
US EPA fuel economy definitions and the mpg to L/100km relationship
The exact conversion constant is 235.214583 L-mi per 100 km-gal, from the exact inch and pound definitions.

Keep this result

Save it, change one figure, then compare the two

The calculation stays free. Save this scenario, adjust one assumption, save that too, and put them side by side to see exactly what the change costs you. A free account keeps 5 scenarios and 2 comparisons; Personal makes both unlimited and adds exports and private links. Nothing is saved unless you press Save.

1 · Calculate2 · Save3 · Compare4 · Export5 · Share
Open workspace

What the Fuel Cost and Trip Calculator calculates

Computes the fuel needed and its cost for a journey from distance, fuel economy and fuel price, in either US or metric units, and can solve instead for the fuel volume alone, the economy achieved, the distance a tank covers, or the fuel price a known spend implies.

How to use this Fuel Cost and Trip Calculator

Enter Solve for, Distance, Distance unit and Fuel economy. Fuel cost updates as you type, and “Use a worked example” loads checked figures you can adjust. Change one figure at a time to see what drives the result.

How the result is worked out

Open “How this is worked out” beside the result for the step-by-step calculation behind Fuel cost, Total trip cost and Cost per person.

The method follows US EPA fuel economy definitions and the mpg to L/100km relationship and NIST Special Publication 811 for the exact gallon, mile and litre definitions.

300 miles at 30 mpg and 3.50 a gallon example

With Distance: 300, Fuel economy: 30, Fuel price: 3.5, Solve for: cost, the calculator returns Fuel needed: 10, Fuel cost: 35. This example is checked against an independent source in the test suite.

What you can compare

Change one input at a time to see how it affects Fuel cost, Total trip cost and Cost per person. The inputs you can vary are Solve for, Distance, Distance unit, Fuel economy, Economy unit and Fuel price.

Results are general information, not financial, tax, legal, medical or engineering advice. Check any decision that matters with a qualified professional.

Embed this calculator on your website

Copy this code into any page. The calculator appears with the figures currently entered, sizes itself to fit, and a small credit line links back here. Free, no account, no ads inside it, no tracking of your readers. Set your own figures and fixed fields; Personal removes the credit line, sets your colour and shows you which sites use it.

Preview

See something wrong? Report a problem with this calculator

Frequently asked questions

Can Google Maps calculate gas cost?

Computes the fuel needed and its cost for a journey from distance, fuel economy and fuel price, in either US or metric units, and can solve instead for the fuel volume alone, the economy achieved. Open “How this is worked out” beside the result to see each step for your own figures.

How do I calculate the cost of fuel for a trip?

It needs Solve for, Distance, Distance unit, Fuel economy, Economy unit and Fuel price. Nothing else is required, and the figures stay in your browser.

How many miles is $20 of gas?

On the figures this page opens with — distance 300, fuel economy 30 and fuel price 3.5 — the total trip cost is 35. No single number fits everyone: change any figure above and the answer updates as you type, with each step of the arithmetic beside it.

How can I calculate the cost of gas for a trip?

The result gives Fuel cost, Total trip cost, Cost per person, Fuel needed, Distance travelled and Cost per mile or km, each labelled with its unit so the figure can be read on its own.

What information do I need for the Fuel Cost and Trip Calculator?

You need Solve for, Distance, Distance unit, Fuel economy, Economy unit, Fuel price, Price is per and Fuel used. The page opens with default figures that give total trip cost of 35, so you can see the scale before entering your own.

What does this Fuel Cost and Trip Calculator show?

It shows Fuel cost, Total trip cost, Cost per person, Fuel needed, Distance travelled, Cost per mile or km, Economy in US mpg and Economy in L/100km, with the working and any warnings for your entries.

Related calculators

View all related calculators10 more