MetricTray
Commute & TravelUpdated Nov 2026Instant Calculator

Gas Cost Calculator

Estimate trip fuel cost from distance, MPG or L/100 km, and pump price.

Specialized inputs for Gas Cost Calculator follow the published formula. Use these fields to explore sensitivity; the guide below has US & UK worked examples.

Working estimate

115

How this calculator works

Road-trip budgets die on fuel surprise. Estimate pump cost before you leave, using the efficiency your car actually gets.

Formula

cost = (distance / mpg) × pricePerGallon

For L/100 km: litres = distanceKm × (Lper100 / 100), then × price/litre.

Worked example (US)

US: 320 miles ÷ 28 MPG × $3.60 ≈ $41.14 fuel.

Worked example (UK)

UK: 180 miles at 45 MPG imperial with £1.45/litre—convert units carefully before comparing.

MetricTray runs this tool entirely in your browser. Inputs are never uploaded to a server, and you can bookmark /tools/gas-cost-calculator/ for one-click reuse. Pair it with related utilities on the tools directory or browse practical write-ups on the blog.

Frequently asked questions

Highway vs city MPG?+

Use a blended figure or separate legs if the trip is mixed.

EV support?+

Swap in kWh/mile and electricity rate for a parallel estimate.

Round trip?+

Double one-way distance—or enter the full loop mileage.

Related tools

Supporting guide

How to Reduce LLM API Costs Without Killing Product Quality

A practical US/UK playbook for cutting OpenAI, Anthropic, and Gemini spend using token budgets, caching, routing, and client-side cost modeling.