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 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 ca be expressed as dollar per miles.
Say the cost of gas is 3 dollars per gallon.
And the effeciency 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.
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
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
Total cost of gas =
x
h
× D +

x
c
× d

Total cost of gas =
x
h
× D +

x
c
× d

Total cost of gas =
3
30
× 30 +

3
20
× 10

Total cost of gas =
90
30
+

30
20

Total cost of gas =
3
30
× 30 +

3
20
× 10

Total cost of gas =
90
30
+

30
20

The following calculator will estimate the cost of gas for any trip. You can use it as a trip planner.
May 21, 18 09:24 AM
Explore exponential and logarithmic functions with these easy to follow math lessons
New math lessons
Your email is safe with us. We will only use it to inform you about new math lessons.
May 21, 18 09:24 AM
Explore exponential and logarithmic functions with these easy to follow math lessons
Our Top Pages
Formula for percentage
Compatible numbers
Basic math test
Basic math formulas
Types of angles
Math problem solver
Algebra word problems
Surface area of a cube
Finding the average
Scale drawings
Everything you need to prepare for an important exam!
K12 tests, GED math test, basic math tests, geometry tests, algebra tests.
Real Life Math Skills
Learn about investing money, budgeting your money, paying taxes, mortgage loans, and even the math involved in playing baseball.