Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

EV vs Gas Car Fuel Cost Calculator (Cost per Mile, Yearly Savings and Payback Years)

Enter your distance per month, the gas car's fuel economy and gas price, and the EV's efficiency and electricity rate. The charging loss and the price difference are optional (enter the price difference to also get the payback period).

A blank charging loss counts as 10%. The price difference is "EV price − gas car price"; enter a negative value if the EV is cheaper (the difference in what you actually pay after tax credits and rebates gives a more realistic result). Real-world fuel economy and efficiency (from your fill-ups or the average shown in the car) give a more realistic result than the official ratings.
Result and graph
Enter your miles per month, fuel economy, gas price, EV efficiency, electricity rate and so on in the fields on the left and press "Calculate". The result and a graph will appear here.

What you can do on this page

  • Enter your miles per month, the gas car's fuel economy (mpg), the gas price ($ per gallon), the EV's efficiency (mi/kWh) and your electricity rate ($ per kWh), and you get the cost per mile of each car, the monthly and yearly fuel (electricity) cost and the difference on the spot
  • Enter the EV's charging loss (the part of the electricity you buy that does not reach the battery) to compare with the electricity cost you actually pay (a blank counts as 10%)
  • Enter the price difference (EV price − gas car price) to also get the simple payback period, the years it takes for the fuel savings to earn back the price gap, and a graph of total cost over the years (the point where the two lines cross is the payback year)
  • A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
This page compares only the fuel cost (gas and electricity) of driving the same distance. It does not include taxes, insurance, maintenance, tires, battery wear, resale value, tax credits and rebates (these depend on current federal and state rules) or the cost of installing a home charger. Gas prices and electricity rates change over time and by plan, so enter the price at your usual gas station and the rate of your electricity plan (you can find it on your electric bill or your utility's website). The result is a calculation for the inputs you enter, not advice on which car to choose. For the cost of charging one EV in more detail, use the EV Charging Cost Calculator; for gas alone, use the Gas Cost Calculator.

What is this calculation used for?

Looking at the yearly fuel cost difference when deciding whether to switch to an EV for commuting

If you drive 1,000 miles a month and compare a 25 mpg car with gas at $3.20 a gallon against an EV that gets 3.5 mi/kWh at $0.17 per kWh with 10% loss, the cost per mile is $0.128 for the gas car and about $0.054 for the EV. The yearly fuel cost is $1,536 for the gas car and about $648 for the EV, a difference of about $888 a year (all are calculations for these inputs).
Looking at the yearly amount, not "how much less per month", makes it easier to compare with the price difference and other running costs. If the EV costs $8,000 more, it takes about 9.0 years for the fuel savings alone to earn back the price gap, which you can weigh against how long you plan to keep the car.

Seeing that the difference is smaller for people who drive less

With the same two cars, someone who drives only 400 miles a month has a yearly difference of about $355, so earning back an $8,000 price gap would take about 22.5 years. On the other hand, someone who drives 3,000 miles a month, like a rideshare or sales driver, has a difference of about $2,665 a year and earns it back in about 3.0 years.
The fuel cost difference is proportional to the miles driven, so "how many miles you drive a year" decides whether you get the benefit of the EV's lower fuel cost. For the same pair of cars, the size of the difference is very different for someone who drives only on weekends and someone who drives long distances every day.

Seeing how the result changes if you can charge overnight at a lower rate

Many utilities offer time-of-use or EV plans with cheaper rates at night. For example, if you can charge at $0.10 per kWh, the EV's yearly electricity cost at 1,000 miles a month, 3.5 mi/kWh and 10% loss is about $381, and the difference from the gas car (25 mpg at $3.20 a gallon, $1,536 a year) grows to about $1,155 a year (the rates are examples; check your own plan).
On the other hand, if you cannot charge at home and mostly use DC fast chargers at a high rate (for example, $0.45 per kWh), the EV's yearly electricity cost is about $1,714, about $178 more than the gas car. Where you charge and at what rate has a big effect on the EV's fuel cost.

Sorting out the price difference and running costs when replacing a car

Comparing a 40 mpg hybrid (gas at $3.20 a gallon) with an EV that gets 4 mi/kWh ($0.15 per kWh, 10% loss) at 600 miles a month, the yearly fuel cost is $576 for the hybrid and $300 for the EV, a difference of $276 a year. If the EV costs $6,000 more, the fuel savings alone would take about 21.7 years to earn it back, so you would decide based on things other than fuel as well (tax credits and rebates, registration fees, maintenance, battery warranty, resale value, the effort of charging, quietness and so on).
The result on this page is "the difference in fuel cost only", so add or subtract the other costs separately. Fuel is the main difference for people who drive a lot; for people who drive little, the other factors matter more.

Planning the fuel budget for a household or a business

A business with several company cars estimates the fuel cost at 2,000 miles a month per car: a gas car (20 mpg at $3.20 a gallon) costs about $3,840 a year, and an EV (3 mi/kWh at $0.15 per kWh with 10% loss) costs about $1,333 a year. Multiply by the number of vehicles to see how much the choice of vehicle changes the yearly fuel budget.
For a household too, "gas" in the budget turns into "electricity" with an EV, so estimating the yearly amount in advance shows how your budget will change after switching. Gas prices and electricity rates change, so updating the inputs once a year keeps the estimate current.

Formula

Gas car fuel cost per mile ($/mi)
Standard notation (the usual math form)
\(c_g\) \(=\) \(p\) \(\div\) \(f\)
In words (symbols replaced with words)
③ \(c_g\): gas car fuel cost per mile ($/mi) \(=\) ① \(p\): gas price ($/gal) \(\div\) ② \(f\): fuel economy (mpg)
The formula in words
① Take the \(p\): gas price ($/gal)
② divide it by the \(f\): fuel economy (mpg)
③ and you get the \(c_g\): gas car fuel cost per mile ($/mi)
Quick example
For a gas car that gets 24 mpg with gas at $3.20 a gallon, the fuel cost per mile is
\(c_g\): gas car fuel cost per mile ($/mi) \(=\) gas price ($3.20/gal) \(\div\) fuel economy (24 mpg)
\(3.20 \div 24 = 0.13333\cdots \approx 0.1333\)
Key idea
If 1 gallon takes you 24 miles, each mile uses \(\dfrac{1}{24}\) of a gallon. Multiply that by the price of 1 gallon, and "price ÷ fuel economy" is the cost of one mile. Following the units confirms it: "$/gal ÷ mi/gal = $/mi"; the gallons cancel out and only dollars per mile remain. Here it is about 13.3 cents per mile. The EPA rating and your real-world fuel economy often differ; city driving, air conditioning and many short trips lower it. Your real-world mpg from fill-up records, or the average shown in the car, gives a more realistic result.
EV electricity cost per mile ($/mi)
Standard notation (the usual math form)
\(c_e\) \(=\) \(u\) \(\div\) \(\left(1 - \dfrac{L}{100}\right)\) \(\div\) \(\eta\)
In words (symbols replaced with words)
④ \(c_e\): EV electricity cost per mile ($/mi) \(=\) ① \(u\): electricity rate ($/kWh) \(\div\) ② (1 − charging loss \(L\) (%) ÷ 100) \(\div\) ③ \(\eta\): efficiency (mi/kWh)
The formula in words
① Take the \(u\): electricity rate ($/kWh)
② divide it by "1 − charging loss \(L\) (%) ÷ 100", the share that reaches the battery to get the effective price per kWh in the battery,
③ divide that by the \(\eta\): efficiency (mi/kWh)
④ and you get the \(c_e\): EV electricity cost per mile ($/mi)
Quick example
For an EV with an electricity rate of $0.18 per kWh, a charging loss of 10% and an efficiency of 4 mi/kWh, the electricity cost per mile is
\(c_e\): EV electricity cost per mile ($/mi) \(=\) rate ($0.18/kWh) \(\div\) (1 − 10% ÷ 100) \(\div\) efficiency (4 mi/kWh)
\(0.18 \div \left(1 - \dfrac{10}{100}\right) \div 4 = 0.18 \div 0.9 \div 4 = 0.20 \div 4 = 0.05\)
Key idea
The shape is the same "price ÷ efficiency" as formula 1, but an EV has charging loss. Part of the electricity you buy never reaches the battery: it is lost in the onboard charger, which turns AC into DC, and in cooling and control while charging (about 10% is typical for Level 2 charging at home). So each kWh in the battery costs "rate ÷ (1 − loss ÷ 100)" (for example, at $0.18 per kWh and 10% loss, \(0.18 \div 0.9 = 0.20\) dollars per kWh). Note that this is not "10% more", which would be \(0.18 \times 1.1 = 0.198\) dollars. Only 90% of what you buy arrives, so working backward from what arrives gives "÷ 0.9". Divide that effective price by the efficiency (miles per kWh) to get the cost of one mile. If you mostly use DC fast chargers that bill per kWh measured at the charger's output, use a smaller loss (a few percent).
Yearly fuel cost (gas car and EV)
Standard notation (the usual math form)
\(G\) \(=\) \(c_g\) \(\times\) \(d\) \(\times\) \(12\)
\(E\) \(=\) \(c_e\) \(\times\) \(d\) \(\times\) \(12\)
In words (symbols replaced with words)
④ \(G\): gas car yearly fuel cost ($) \(=\) ① \(c_g\): gas car fuel cost per mile ($/mi) \(\times\) ② \(d\): miles per month (mi) \(\times\) ③ 12 months in a year
⑥ \(E\): EV yearly electricity cost ($) \(=\) ⑤ \(c_e\): EV electricity cost per mile ($/mi) \(\times\) \(d\): miles per month (mi) \(\times\) 12 months in a year
The formula in words
① Take the \(c_g\): gas car fuel cost per mile ($/mi)
② multiply it by the \(d\): miles per month (mi) to get the monthly fuel cost,
③ multiply that by 12 months in a year
④ and you get the \(G\): gas car yearly fuel cost ($)
⑤ In the same way, multiply the \(c_e\): EV electricity cost per mile ($/mi) by the miles per month and 12,
⑥ and you get the \(E\): EV yearly electricity cost ($)
Quick example
With a cost per mile of $0.1333 for the gas car (the example for formula 1) and $0.05 for the EV (the example for formula 2), and 1,000 miles a month, the yearly fuel costs are
\(G\): gas car yearly fuel cost ($) \(=\) per mile ($0.1333/mi) \(\times\) miles per month (1,000 mi) \(\times\) 12
\(E\): EV yearly electricity cost ($) \(=\) per mile ($0.05/mi) \(\times\) miles per month (1,000 mi) \(\times\) 12
\(G = 0.1333 \times 1000 \times 12 = 1599.6 \quad \left( \dfrac{3.20}{24} \times 1000 \times 12 = 1600 \right)\)
\(E = 0.05 \times 1000 \times 12 = 600\)
Key idea
Once the cost per mile is known, the rest is simply proportional to the miles you drive. Multiply by the miles per month for the monthly fuel cost, and by 12 more for the yearly fuel cost (the calculator shows both). The first line for the gas car uses the cost per mile rounded to $0.1333 ($1,599.60), and the value in parentheses uses the unrounded value, \(3.20 \div 24 = 0.13333\ldots\) dollars ($1,600). Rounding partway through shifts the answer a little, so the calculator uses the unrounded value. A realistic way to estimate your miles per month is "round-trip commute × workdays + weekend driving". If the same car is driven twice as far, the fuel cost doubles and so does the difference, so your miles have a big effect on the result.
Yearly difference (gas car − EV)
Standard notation (the usual math form)
\(\Delta\) \(=\) \(G\) \(-\) \(E\)
In words (symbols replaced with words)
③ \(\Delta\): yearly difference ($) \(=\) ① \(G\): gas car yearly fuel cost ($) \(-\) ② \(E\): EV yearly electricity cost ($)
The formula in words
① Take the \(G\): gas car yearly fuel cost ($)
② subtract the \(E\): EV yearly electricity cost ($)
③ and you get the \(\Delta\): yearly difference ($) (positive means the EV's fuel cost is lower; negative means the gas car's is lower)
Quick example
With a gas car yearly fuel cost of $1,600 and an EV yearly electricity cost of $600 (the example for formula 3), the yearly difference is
\(\Delta\): yearly difference ($) \(=\) gas car ($1,600) \(-\) EV ($600)
\(1600 - 600 = 1000\)
Key idea
The difference is "gas car − EV", so a positive value means the EV's fuel cost is lower by that much each year, and a negative value means the gas car's is lower. Which one is lower depends on your inputs: when gas prices fall, electricity rates rise, efficiency drops in winter, or you mostly use expensive DC fast chargers, the EV's fuel cost can be the higher one. Per mile, the difference is \(c_g - c_e\), and multiplying it by the miles per year (\(d \times 12\)) gives the yearly difference. So the more you drive, the bigger the difference, and the less you drive, the smaller it is.
Simple payback period for the price difference (years)
Standard notation (the usual math form)
\(T\) \(=\) \(\Delta P\) \(\div\) \(\Delta\)
In words (symbols replaced with words)
③ \(T\): simple payback period (years) \(=\) ① \(\Delta P\): price difference ($) \(\div\) ② \(\Delta\): yearly difference ($)
The formula in words
① Take the \(\Delta P\): price difference ($) = EV price − gas car price
② divide it by the \(\Delta\): yearly difference ($) = how much the gap shrinks each year through fuel costs
③ and you get the \(T\): simple payback period (years) (the years it takes for the more expensive car to earn back the price gap through lower fuel costs)
Quick example
If the EV costs $7,500 more and the yearly difference is $1,000 (the example for formula 4; the EV's fuel cost is lower), the simple payback period is
\(T\): simple payback period (years) \(=\) price difference ($7,500) \(\div\) yearly difference ($1,000)
\(7500 \div 1000 = 7.5\)
Key idea
The simple payback period is a rough guide: just the price difference divided by the savings per year. The formula makes sense only when the car that costs more to buy is the one with the lower fuel cost. If the EV costs more (\(\Delta P > 0\)) and its fuel cost is lower (\(\Delta > 0\)), it is the years the EV takes to earn back the price gap. If the gas car costs more (\(\Delta P < 0\)) and its fuel cost is lower (\(\Delta < 0\)), a negative divided by a negative is positive, and it is the years the gas car takes to earn back the price gap. If the same car is cheaper both to buy and to fuel, the gap only grows, so no payback is needed (the calculator says so). If the car that costs more to buy also has the same or higher fuel cost, the gap never closes, so it is never paid back. If the payback period is longer than you plan to keep the car, or longer than the battery warranty (often 8 years or 100,000 miles in the US), the fuel savings alone will not earn back the price gap. This calculation leaves out taxes, insurance, maintenance, battery wear, resale value, tax credits and rebates and the cost of installing a charger, so consider those too when you decide.
Find the cost per mile of the gas car with "gas price ÷ fuel economy" and of the EV with "electricity rate ÷ (1 − charging loss ÷ 100) ÷ efficiency", then multiply each by the miles per month and 12 to get the yearly fuel cost. The difference (gas car − EV) is the yearly difference, and the price difference divided by it is the simple payback period. The calculation shows how much the fuel costs differ for your inputs, not which car is the better deal.

Symbols and terms

Symbols

\(p\) Gas price ($ per gallon). The price of 1 gallon of gas. It is the first letter of "price".
\(f\) The gas car's fuel economy (mpg), how many miles it goes on 1 gallon. It is the first letter of "fuel economy".
\(c_g\) The gas car's fuel cost per mile ($ per mile). \(c\) stands for "cost", and the small \(g\) for "gasoline".
\(u\) Electricity rate. The price of 1 kWh ($ per kWh). It is the first letter of "unit price".
\(L\) Charging loss (%). The share of the electricity you buy that does not reach the battery. It is the first letter of "loss".
\(\eta\) The EV's efficiency (mi/kWh), how far it goes on 1 kWh. The Greek letter eta is often used for efficiency; here it shows how well the car turns electricity into distance.
\(c_e\) The EV's electricity cost per mile ($ per mile). The small \(e\) stands for "electric".
\(d\) Miles per month. It is the first letter of "distance".
\(G\) The gas car's yearly fuel cost ($). It is the first letter of "gasoline".
\(E\) The EV's yearly electricity cost ($). It is the first letter of "electric".
\(\Delta\) Yearly difference ($) = gas car yearly fuel cost − EV yearly electricity cost. The Greek letter delta is often used for a difference or a change (it matches D, the first letter of "difference").
\(\Delta P\) Price difference ($) = EV price − gas car price. \(P\) stands for "price", and \(\Delta\) is added because it is a difference.
\(T\) Simple payback period (years). It is the first letter of "time".

Terms

fuel economy How many miles a car goes on 1 gallon of fuel (mpg). The larger the number, the better the car uses fuel. The EPA rating (measured in standard tests) and the value you get in real driving often differ; you can measure your own real-world mpg with the fill-up method (miles from one full tank to the next ÷ gallons added).
efficiency How far an EV goes on 1 kWh (mi/kWh), the EV version of mpg. The larger the number, the better the car uses electricity. The EPA label shows it as kWh per 100 miles instead. It changes with the car, speed, heating and temperature, and tends to drop in winter.
kWh (kilowatt-hour) A unit of electrical energy. Using 1 kW of power for 1 hour uses 1 kWh. Both EV battery sizes and electric bills are counted in this unit.
charging loss The part of the electricity you buy that is lost, mostly as heat, before it reaches the battery. The main causes are the onboard charger, which turns AC into DC, and the cooling and control systems that run while charging. About 10% is typical for Level 2 charging at home.
electricity rate The price of 1 kWh of electricity ($ per kWh). It depends on your utility, your plan, how much you use and, on time-of-use plans, the time of day. Divide your bill by the kWh used to find your home's rough average rate.
running costs The costs of keeping a car every year. Besides fuel, they include registration fees and taxes, insurance, maintenance, tires, parking and so on. This page compares only the fuel part (gas and electricity).
simple payback period The price difference of the more expensive choice divided by the savings per year. "Simple" means it assumes the same savings every year and ignores the time value of money (such as interest). It is a rough guide; how long you will keep the car and battery wear need separate thought.
proportional A relationship where if one amount doubles or triples, the other also doubles or triples. Fuel cost is proportional to the miles driven, so its graph is a straight line through the origin, and the slope is the cost per mile (or per year).

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back to these topics is the quickest way forward.

Unit rates (Grade 6)
  • Understanding how to compare amounts "per 1 unit", such as miles per gallon, miles per kWh or dollars per mile
  • Being able to build a formula by following the units, as in price ($/gal) ÷ fuel economy (mi/gal) = dollars per mile
Percents (Grades 6–7)
  • Being able to change a percent into a decimal, as in "10% is 0.1 times"
  • Understanding how to work backward from a percent: to undo a 10% decrease, divide by 0.9 (not multiply by 1.1)
Proportional relationships (Grades 6–7)
  • Understanding the proportional relationship that driving twice as far doubles both the fuel cost and the difference
  • Knowing that the graph of a proportional relationship is a straight line through the origin, and that its slope is the cost per year
Positive and negative numbers (Grades 6–7)
  • Being able to read a negative "gas car − EV" as "the EV costs more"
  • Knowing that a negative divided by a negative is positive (used for the gas car's payback period)
Linear functions and where two lines cross (Grade 8)
  • Seeing that "starting amount + amount per year × years" has the form of a linear function (intercept + slope × years)
  • Understanding that the point where the two lines cross is the year when the total costs become equal, that is, the payback year
Power and energy (middle school science)
  • Being able to tell power (W, kW), how fast electricity is used, from energy (Wh, kWh), the total amount of electricity used
  • Knowing that an electric bill is energy (kWh) × rate

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to find the gas car fuel cost per mile
Gas price ($/gal) 3.20
Fuel economy (mpg) 24
Gas car fuel cost per mile ($/mi) =B1/B2
Table to find the EV electricity cost per mile
Electricity rate ($/kWh) 0.18
Charging loss (%) 10
Efficiency (mi/kWh) 4
EV electricity cost per mile ($/mi) =B1/(1-B2/100)/B3
Table to find the yearly fuel cost (gas car and EV)
Gas car fuel cost per mile ($/mi) 0.1333
EV electricity cost per mile ($/mi) 0.05
Miles per month (mi) 1000
Gas car monthly fuel cost ($) =B1*B3
EV monthly electricity cost ($) =B2*B3
Gas car yearly fuel cost ($) =B4*12
EV yearly electricity cost ($) =B5*12
Table to find the yearly difference
Gas car yearly fuel cost ($) 1600
EV yearly electricity cost ($) 600
Yearly difference ($, gas car − EV) =B1-B2
Table to find the simple payback period
Price difference ($, EV − gas car) 7500
Yearly difference ($, gas car − EV) 1000
Simple payback period (years) =B1/B2
After pasting, the upper cells in column B are your inputs and the formula cells are calculated automatically.
The first table is the example of gas at $3.20 a gallon and 24 mpg, and B3 shows about 0.1333 ($ per mile). The second table is the example of $0.18 per kWh, 10% loss and 4 mi/kWh, and B4 shows 0.05 ($ per mile). The third table multiplies those two values by 1,000 miles a month: monthly, $133.30 for the gas car and $50 for the EV; yearly, $1,599.60 for the gas car and $600 for the EV (because the gas car's cost per mile is rounded to 0.1333, this differs slightly from the calculator's $1,600).
The fourth table is the yearly difference, and B3 shows 1000 ($1,000). The fifth table divides the $7,500 price difference by it, and B3 shows 7.5 (years). If the yearly difference is negative (the gas car's fuel cost is lower) and the price difference is positive, this table's result is also negative; that means the price gap cannot be earned back through fuel costs, so do not read it as a number of years. Just replace the numbers in column B with your own.

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to find the gas car fuel cost per mile
Gas price ($/gal) 3.20
Fuel economy (mpg) 24
Gas car fuel cost per mile ($/mi) =B1/B2
Table to find the EV electricity cost per mile
Electricity rate ($/kWh) 0.18
Charging loss (%) 10
Efficiency (mi/kWh) 4
EV electricity cost per mile ($/mi) =B1/(1-B2/100)/B3
Table to find the yearly fuel cost (gas car and EV)
Gas car fuel cost per mile ($/mi) 0.1333
EV electricity cost per mile ($/mi) 0.05
Miles per month (mi) 1000
Gas car monthly fuel cost ($) =B1*B3
EV monthly electricity cost ($) =B2*B3
Gas car yearly fuel cost ($) =B4*12
EV yearly electricity cost ($) =B5*12
Table to find the yearly difference
Gas car yearly fuel cost ($) 1600
EV yearly electricity cost ($) 600
Yearly difference ($, gas car − EV) =B1-B2
Table to find the simple payback period
Price difference ($, EV − gas car) 7500
Yearly difference ($, gas car − EV) 1000
Simple payback period (years) =B1/B2
These formulas use only basic arithmetic, so the same formulas as in Excel work as is. Copy the whole table, paste it into cell A1, and replace column B with your own numbers.

How to calculate it in Python

monthly_mi = 1000            # miles per month
gas_mpg = 24                 # gas car fuel economy (mpg)
gas_price_per_gal = 3.20     # gas price ($ per gallon)
ev_mi_per_kwh = 4            # EV efficiency (mi/kWh)
elec_price_per_kwh = 0.18    # electricity rate ($ per kWh)
loss_percent = 10            # charging loss (%)
price_diff = 7500            # price difference ($, EV − gas car)

# cost per mile ($/mi): gas car = price ÷ mpg, EV = rate ÷ (1 − loss ÷ 100) ÷ efficiency
gas_cost_per_mile = gas_price_per_gal / gas_mpg
ev_cost_per_mile = elec_price_per_kwh / (1 - loss_percent / 100) / ev_mi_per_kwh
# yearly fuel cost ($) = cost per mile × miles per month × 12
gas_yearly = gas_cost_per_mile * monthly_mi * 12
ev_yearly = ev_cost_per_mile * monthly_mi * 12
# yearly difference ($; positive means the EV's fuel cost is lower)
yearly_diff = gas_yearly - ev_yearly

print(f"Gas car fuel cost per mile: ${gas_cost_per_mile:.4f}/mi")
print(f"EV electricity cost per mile: ${ev_cost_per_mile:.4f}/mi")
print(f"Yearly fuel cost: gas car ${gas_yearly:.2f} / EV ${ev_yearly:.2f}")
print(f"Yearly difference (gas car − EV): ${yearly_diff:.2f}")
# simple payback period: meaningful only when the more expensive car also has the lower fuel cost
if (price_diff > 0 and yearly_diff > 0) or (price_diff < 0 and yearly_diff < 0):
    print(f"Simple payback period: {price_diff / yearly_diff:.1f} years")
else:
    print("Simple payback period: does not apply to these inputs")
Runs with the standard library only. Replace the first seven values (miles, mpg, gas price, efficiency, electricity rate, loss and price difference) with your own and run it. The last if statement shows the payback period only when the more expensive car also has the lower fuel cost.

How to write it in LaTeX and other math languages (copy and paste)

Gas car fuel cost per mile ($/mi)
c_g = p ÷ f
c_g = \frac{p}{f}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msub><mi>c</mi><mi>g</mi></msub>
    <mo>=</mo>
    <mfrac><mi>p</mi><mi>f</mi></mfrac>
  </mrow>
</math>
c_g = p / f
gasCostPerKm = gasPrice/fuelEconomy
c_g := p/f;
c_g = p/f;
c_g = p/f
EV electricity cost per mile ($/mi)
c_e = u ÷ (1 − L ÷ 100) ÷ η
c_e = \frac{u}{\left(1 - \frac{L}{100}\right)\eta}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msub><mi>c</mi><mi>e</mi></msub>
    <mo>=</mo>
    <mfrac>
      <mi>u</mi>
      <mrow>
        <mo>(</mo><mn>1</mn><mo>&#x2212;</mo><mfrac><mi>L</mi><mn>100</mn></mfrac><mo>)</mo>
        <mi>&#x3B7;</mi>
      </mrow>
    </mfrac>
  </mrow>
</math>
c_e = u / ((1 - L/100) * eta)
evCostPerKm = elecPrice/((1 - loss/100)*efficiency)
c_e := u/((1 - L/100)*eta);
c_e = u/((1 - L/100)*eta);
c_e = u/((1−L/100)η)
Yearly fuel cost (gas car and EV)
G = c_g × d × 12,  E = c_e × d × 12
G = c_g \times d \times 12, \quad E = c_e \times d \times 12
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>G</mi><mo>=</mo>
    <msub><mi>c</mi><mi>g</mi></msub><mo>&#xD7;</mo><mi>d</mi><mo>&#xD7;</mo><mn>12</mn>
    <mo>,</mo><mspace width="1em"/>
    <mi>E</mi><mo>=</mo>
    <msub><mi>c</mi><mi>e</mi></msub><mo>&#xD7;</mo><mi>d</mi><mo>&#xD7;</mo><mn>12</mn>
  </mrow>
</math>
G = c_g * d * 12, E = c_e * d * 12
gasYearly = gasCostPerKm*monthlyDistance*12; evYearly = evCostPerKm*monthlyDistance*12
G := c_g*d*12; E := c_e*d*12;
G = c_g*d*12; E = c_e*d*12;
G = c_g×d×12, E = c_e×d×12
Yearly difference (gas car − EV)
Δ = G − E
\Delta = G - E
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>&#x394;</mi>
    <mo>=</mo>
    <mi>G</mi>
    <mo>&#x2212;</mo>
    <mi>E</mi>
  </mrow>
</math>
Delta = G - E
yearlyDiff = gasYearly - evYearly
Delta := G - E;
Delta = G - E;
Δ = G−E
Simple payback period for the price difference (years)
T = ΔP ÷ Δ
T = \frac{\Delta P}{\Delta}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>T</mi>
    <mo>=</mo>
    <mfrac>
      <mrow><mi>&#x394;</mi><mi>P</mi></mrow>
      <mi>&#x394;</mi>
    </mfrac>
  </mrow>
</math>
T = (Delta P) / Delta
paybackYears = priceDiff/yearlyDiff
T := DeltaP/Delta;
T = DeltaP/Delta;
T = ΔP/Δ

How to have ChatGPT  do the calculation

You are a calculation assistant for comparing car fuel costs. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

I drive 1,000 miles a month. The gas car gets 24 mpg with gas at $3.20 per gallon. The EV gets 4 mi/kWh with electricity at $0.18 per kWh and a charging loss of 10%. The EV costs $7,500 more to buy.
Find the gas car's fuel cost per mile with "gas price ÷ fuel economy", the EV's electricity cost per mile with "rate ÷ (1 − loss ÷ 100) ÷ efficiency", and the yearly fuel cost with "cost per mile × miles per month × 12".
Find each of the following:
1. The cost per mile of the gas car and the EV ($ per mile)
2. The monthly and yearly fuel cost of the gas car and the EV ($)
3. The yearly difference (gas car − EV) ($)
4. The simple payback period: the price difference divided by the yearly difference (years). If the yearly difference is negative, answer that "the price gap cannot be earned back through fuel costs"

Show the formulas you used and the numbers from the execution result. Do not include taxes, insurance, maintenance or tax credits.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.