ThisCalculator

Auto and travel

Gas and Electric Calculator: Compare Fuel Costs

Updated · Standard formula, shown below

Gas cost 11.67 $
Electric cost
4.50 $
Result
EV savings
7.17 $
Result
Distance
100 miles
You entered

Gas and Electric Calculator: Compare Fuel Costs

This calculator compares the cost of driving a given distance with a gasoline vehicle versus an electric vehicle. You enter the distance, your gas price per gallon, your electricity rate per kWh, and the efficiency of both vehicles, and it returns the fuel cost for each and the difference. The result shows which option is cheaper and by how much, per trip and per year.

Formula

The calculator uses two basic formulas:

  • Gas cost = (Distance ÷ MPG) × Gas price per gallon
  • Electric cost = (Distance ÷ 100) × kWh per 100 miles × Electricity rate per kWh

Where:

  • Distance (miles) – how far you plan to drive.
  • MPG – miles per gallon your gas vehicle achieves.
  • Gas price ($/gal) – what you pay at the pump.
  • kWh/100mi – electric vehicle efficiency, the standard EPA rating.
  • Electricity rate ($/kWh) – what you pay per kilowatt-hour from your utility.

Both formulas are simple unit conversions. The gas formula converts miles to gallons (miles ÷ mpg), then multiplies by price per gallon. The electric formula converts miles to hundreds of miles, multiplies by kWh per 100 miles to get total kWh, then multiplies by the rate.

Worked Example

Using the default values: distance = 100 miles, gas price = $3.50/gal, electricity rate = $0.15/kWh, gas MPG = 30, EV efficiency = 30 kWh/100mi.

  1. Gas cost: 100 miles ÷ 30 mpg = 3.333 gallons. 3.333 × $3.50 = $11.67
  2. Electric cost: 100 miles ÷ 100 = 1 (hundred miles). 1 × 30 kWh = 30 kWh. 30 × $0.15 = $4.50
  3. Savings: $11.67 – $4.50 = $7.17

So for a 100-mile trip, the EV costs about $7.17 less in fuel. Over 12,000 miles a year, that becomes roughly $860 in annual savings.

When to Use This Calculator

Use this calculator when you are comparing a specific gas car and an EV, or when you want to estimate your own fuel costs. It is most accurate for a single trip or a recurring commute. For a yearly comparison, multiply the per-trip result by the number of trips you make in a year, or enter your annual mileage as the distance.

The calculator is also useful for estimating the payback period of switching to an EV. If the EV costs $5,000 more upfront, and you save $860 per year in fuel, it would take about 5.8 years to break even – before considering maintenance, insurance, or tax incentives.

How to Read the Results

The first output is the gas cost, the second is the electric cost, and the third is the savings (gas minus electric). A positive savings means the EV is cheaper; a negative savings means the gas vehicle is cheaper.

Remember that these are fuel-only costs. They do not include purchase price, insurance, maintenance, registration, or charging installation. An EV may have lower maintenance (no oil changes, fewer brake replacements), but higher insurance or registration in some areas.

Also note that electricity rates vary by time of day. If your utility offers time-of-use pricing, charging overnight can be much cheaper than the average rate. The calculator uses a single rate, so you may want to run it twice: once with your off-peak rate and once with your peak rate.

Common Mistakes and Misconceptions

  • Using the wrong efficiency for EVs: EV efficiency is usually given in kWh per 100 miles, not miles per gallon equivalent (MPGe). MPGe is for comparing to gas cars, but for cost you need actual kWh used. If you only know MPGe, you can convert: 1 gallon of gas = 33.7 kWh, so kWh/100mi = 3370 ÷ MPGe.
  • Forgetting charging losses: The electricity that comes out of your wall is not all stored in the battery. Charging is about 85-95% efficient. If your car’s rating is 30 kWh/100mi, you might actually use 33-35 kWh from the wall. Many online calculators ignore this, making EVs look slightly cheaper than reality.
  • Using the wrong electricity rate: Your bill may have a flat rate, but also delivery charges, taxes, and demand fees. The “effectiveâ€� rate is your total bill divided by total kWh. Check your bill to find that number.
  • Comparing different vehicle classes: A gas SUV and an EV sedan are not comparable. You should compare vehicles in the same class (e.g., a gas sedan vs. an electric sedan) to get a fair efficiency comparison.
  • Ignoring public charging costs: If you charge at public stations, the rate can be 2-3 times higher than home electricity. Some fast chargers cost $0.40-$0.60 per kWh, which can erase the savings.

Limitations of the Formula

This calculator is a simplified model. Real-world fuel costs depend on driving conditions, weather, tire pressure, driving style, and terrain. Gas MPG is usually lower in city driving than highway, while EV efficiency is often better in city driving due to regenerative braking.

The calculator also assumes a constant electricity rate. In reality, many utilities have tiered rates or time-of-use pricing. For accurate results, use your actual effective rate and consider when you will charge.

Finally, the calculator does not include the cost of installing a home charger, which can range from a few hundred to a few thousand dollars. If you cannot charge at home, the comparison changes significantly.

Gas vs. Electric: Broader Cost Comparison

While fuel is a major cost, it is not the only one. Here are other factors to consider:

  • Upfront price: EVs often have a higher sticker price, but tax credits and rebates can reduce the gap.
  • Maintenance: EVs have fewer moving parts, no oil changes, and brake pads last longer. However, tire wear can be higher due to instant torque and heavier weight.
  • Insurance: EVs can be more expensive to insure because repair costs are higher.
  • Depreciation: EVs historically depreciate faster, but that is changing as battery technology improves.
  • Fuel price volatility: Gas prices fluctuate with oil markets, while electricity prices are more stable.

For a complete comparison, you would need to estimate these costs over the life of the vehicle. This calculator handles only the fuel portion, which is often the biggest variable.

Frequently Asked Questions

How do I find my electricity rate?

Look at your utility bill. It will show your total usage in kWh and the total charge. Divide the total charge by the total kWh to get your effective rate. For example, if your bill is $120 for 800 kWh, your effective rate is $0.15/kWh.

What is a good MPG for a gas car?

For a new car, 30 mpg is about average for a sedan, while SUVs often get 20-25 mpg. Hybrids can get 40-50 mpg, and plug-in hybrids can do even better on short trips. Use the EPA rating for your specific vehicle.

What is a typical EV efficiency?

Most modern EVs use between 25 and 35 kWh per 100 miles. A Tesla Model 3 is around 25, a Ford Mustang Mach-E is around 33, and a large pickup like the F-150 Lightning is around 45. Check the EPA rating for the exact model.

Does cold weather affect the comparison?

Yes. Cold temperatures reduce EV range by 20-30% because the battery chemistry slows down and you use power for heating. Gas cars also lose some efficiency in cold weather, but not as much. If you live in a cold climate, adjust the EV efficiency upward (e.g., 30 kWh/100mi becomes 40).

Is it cheaper to charge at home or at a public station?

Almost always cheaper at home. The average U.S. residential rate is about $0.16/kWh, while public Level 2 chargers often cost $0.20-$0.30/kWh and DC fast chargers can cost $0.40-$0.60/kWh. However, if you have free charging at work or a store, that is cheapest of all.

Why is the calculator showing a negative savings?

A negative savings means the gas vehicle is cheaper for that trip. This can happen if gas prices are very low, electricity rates are high, or the EV is very inefficient (e.g., a large truck) while the gas car is very efficient (e.g., a hybrid).

Related

Formula used
in d | Distance | miles | 100 | 0
in g_price | Gas price | $/gal | 3.50 | 0
in e_price | Electricity rate | $/kWh | 0.15 | 0
in g_mpg | Gas vehicle efficiency | mpg | 30 | 0
in e_kwh | Electric vehicle efficiency | kWh/100mi | 30 | 0
out gas_cost | Gas cost | $ | (d / g_mpg) * g_price | 2
out elec_cost | Electric cost | $ | (d / 100) * e_kwh * e_price | 2
out savings | EV savings | $ | gas_cost - elec_cost | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.