Vehicles & TravelFormula-based · Runs in your browser

Fuel Cost Calculator

Estimate fuel used and trip cost from distance, efficiency, and fuel price.

Preparing saved example…

Inputs

Enter the values you know. Optional fields may be left empty.

Local save controls below
Required
Required
Required
Required
$

Result

Updates as valid inputs change.

Calculated locally
Trip fuel cost
Fuel needed
Fuel unit
Cost per 100 distance units

Saved locally, explained clearly

Drafts, calculations, scenarios, and workflow progress stay in this browser unless you export them.

Opening local database…

Calculation steps

Follow what happened from the selected formula to the displayed answer.

Show substituted values and intermediate working
Calculate current inputs to see the working.
  1. 1

    Formula selected

    The calculator uses the following formula or method.

    MPG: fuel = distance ÷ MPG; metric: fuel = distance × L/100 km ÷ 100

  2. 2

    Values entered

    Your values are placed into the calculation.

    Enter values to see what is used in this step.

  3. 3

    Result calculated

    The formula or method produces the following result values.

    Results will appear after a successful calculation.

  4. 4

    Answer formatted

    Displayed values are rounded and formatted using each output’s configured precision.

Scenario comparison

Save working scenarios, then select two or three to compare. Formula versions and inputs remain visible.

No scenarios saved for this calculator yet.

Recent calculations

Successful calculations are retained locally according to your privacy settings.

No local history for this calculator yet.

Data and privacy

How it works

MPG mode treats distance as miles and price as cost per US gallon. Metric mode uses kilometers and liters.

Input query strings and outputs

Use an input name in this page’s URL as ?name=value, and join additional inputs with &. Portable shared links may instead use the compact ?ac= state parameter.

Input query strings

4
  • ?efficiencyType= Efficiency format

    Choice · Required · Default: mpg · Accepted values: mpg, l100km

  • ?distance= Trip distance

    Number · Required · Default: 300

  • ?efficiency= Fuel efficiency

    Number · Required · Default: 30

  • ?fuelPrice= Fuel price per gallon or liter

    Money · Required · Default: 3.5

Outputs

4
  • totalCost Trip fuel cost

    Currency · Primary output

  • fuelNeeded Fuel needed

    Number

  • fuelUnit Fuel unit

    Text

  • costPer100Distance Cost per 100 distance units

    Currency

Limits

Traffic, idling, weather, and route changes are not modeled.

Sources
  • No external reference is listed for this calculator. Its formula and variable definitions are shown above.
Limitations
  • Real costs and performance can differ with road conditions, usage, local prices, and vehicle specifications.