Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Estimated Trip Cost
$14.00
Trip Input Details
Distance 100 miles
Fuel Efficiency 25 miles per gallon
Fuel Price $3.50 per gallon
One-Way Trip Results
Fuel Needed 4.00 gallons
Trip Cost $14.00
CO₂ Emissions 35.55 kg
Round Trip Estimates
Total Fuel Needed 8.00 gallons
Total Cost $28.00
Total CO₂ Emissions 71.10 kg

What Is the Gas Cost Calculator?

The Gas Cost Calculator helps you estimate how much fuel a trip will cost before you set off. Whether you're planning a road trip, budgeting a daily commute, or splitting fuel costs with friends, this tool turns your distance, vehicle efficiency, and current fuel price into a clear dollar (or any currency) figure. It works worldwide because it supports both imperial and metric units — miles or kilometers, miles per gallon (mpg), kilometers per liter (kpl), or liters per 100 km — and lets you enter the price per gallon or per liter to match your region.

How to Use It

  • Distance: Enter the total trip distance in miles or kilometers.
  • Fuel efficiency: Enter your vehicle's economy using the unit you prefer (mpg, kpl, or L/100 km).
  • Fuel price: Enter the current pump price per gallon or per liter.
  • The calculator instantly shows how much fuel you'll use and the total cost.

You can find your vehicle's efficiency on the manufacturer's spec sheet, your dashboard trip computer, or by dividing distance traveled by fuel used over a few fill-ups.

The Formula Explained

The core math is simple. First, work out the fuel needed, then multiply by price:

$$\text{Trip Cost} = \frac{D}{E} \times P \\[1.5em] \text{where}\quad \left\{ \begin{aligned} D &= \text{Distance}\ (\text{miles}) \\ E &= \text{Efficiency}\ (\text{mpg}) \\ P &= \text{Fuel Price}\ (\text{USD/gal}) \end{aligned} \right.$$
  • Using mpg: Fuel used = Distance \(\div\) mpg, then Cost = Fuel used \(\times\) price per gallon.
  • Using L/100 km: Fuel used = (Distance \(\div\) 100) \(\times\) L/100 km, then Cost = Fuel used \(\times\) price per liter.
Advertisement
Diagram showing trip cost equals distance divided by fuel efficiency times fuel price
The gas cost formula: divide distance by fuel efficiency, then multiply by fuel price.

Worked Example

Suppose you're driving 300 miles in a car that gets 30 mpg, with gas priced at $3.50 per gallon:

  • Fuel used = \(300 \div 30 = 10\) gallons
  • Total cost = \(10 \times \$3.50 =\) $35.00

For a metric example: 480 km at 7 L/100 km, fuel at $1.60/L \(\rightarrow (480 \div 100) \times 7 = 33.6\) liters \(\times \$1.60 =\) $53.76.

Worked example showing a car traveling a distance with fuel gauge and resulting cost
Worked example: distance, fuel efficiency, and price combine into a total trip cost.

Frequently Asked Questions

Does this account for traffic or terrain? No. The estimate assumes steady, real-world efficiency. Heavy traffic, hills, and aggressive driving raise consumption, so add a buffer of 10–15% for tough conditions.

Can I use it for a round trip? Yes — simply enter the total round-trip distance, or double a one-way figure.

What about electric vehicles? This tool is designed for gasoline and diesel vehicles. EVs use cost per kWh instead, which requires a different calculation.

Last updated: