Estimate gas cost

To estimate gas cost, we will derive a simple formula. To improve accuracy and practicality, the formula and the calculator below will include city miles and highway miles.

Usually, you will see MPG (miles per gallon) rating as 20 CITY / 30 HWY 

This means that your vehicle will give you 20 miles per gallon driving in the city and 30 miles per gallon driving on the highway.

To derive our formula, the strategy we will use is to see how much money you spend on gas per miles. This situation can be expressed as dollar per miles.

Say the cost of gas is 3 dollars per gallon and the efficiency of your vehicle is 20 CITY / 30 HWY

Let us just work with the efficiency on the highway for now.

Look at the following ratio. It is a ratio of the cost of gas to the fuel efficiency of your specific vehicle.

3 dollars per gallon / 30 miles per gallon

3 dollars / 30 miles

Since gallon is on top and at the bottom, it will cancel in the ratio.

Now the ratio gives you the money spent per 30 miles.

To calculate money spent on gas for driving 90 miles, just multiply the ratio immediately above by 90.

3 dollars / 30 miles
× 90      equation 1

We get  
3 dollars × 90 miles / 30 miles

We get  
270 dollars / 30
= 9 dollars

Let us make a generalization of equation 1 above.

Suppose gas price is x and the efficiency of your vehicle is c CITY / h HWY

Notice that in c CITY / h HWY,  c is city efficiency and h is highway efficiency.

In our example above c = 20 miles and h = 30 miles

D is the distance you drive your car on the highway

Estimate gas cost
The cost of gas on the highway is  
x / h
× D

If d is the distance you drive in the city,

The cost of gas in the city is  
x / c
× d

Total cost of gas =  
x / h
× D   +
x / c
× d
Total cost of gas =
 
x / h
× D   +
x / c
× d


Example:


Estimate gas cost if gas price is 3 dollars, your vehicle efficiency is 20 CITY / 30 HWY, and you drive 30 miles on the highway and 10 miles in the city.

Just plug in the numbers in the formula

Total cost of gas =  
3 / 30
× 30   +
3 / 20
× 10

Total cost of gas =  
90 / 30
  +
30 / 20

Total cost of gas = 3 + 1.5 = 4.5 dollars


Example:


Estimate gas cost if gas price is 3 dollars, your vehicle efficiency is 20 CITY / 30 HWY, and you drive 30 miles on the highway and 10 miles in the city.

Just plug in the numbers in the formula

Total cost of gas =  
3 / 30
× 30   +
3 / 20
× 10

Total cost of gas =  
90 / 30
  +
30 / 20

Total cost of gas = 3 + 1.5 = 4.5 dollars

Estimate gas cost calculator

The following calculator will estimate the cost of gas for any trip. You can use it as a trip planner. 

Recent Articles

  1. Find the Number of Combinations

    Jul 30, 21 06:15 AM

    Learn quickly how to find the number of combinations with this easy to follow lesson.

    Read More

Enjoy this page? Please pay it forward. Here's how...

Would you prefer to share this page with others by linking to it?

  1. Click on the HTML link code below.
  2. Copy and paste it, adding a note of your own, into your blog, a Web page, forums, a blog comment, your Facebook account, or anywhere that someone would find this page valuable.