In deciding whether an electric vehicle is cheaper than a gas-powered car, especially as petroleum prices climb again, experts say customers have to consider the costs of charging infrastructure, energy prices and maintenance costs — like replacing a battery pack.

Deterioration of EV batteries begins the first time a vehicle is plugged in, according to scientists. The average vehicle typically loses about 2% of its capacity every year, reducing the range it can travel on a charge. Replacing that battery can cost thousands of dollars. Some buyers say that’s an additional obstacle for them to get into an EV.

Read more: An EV battery begins declining at first charge. When must it be replaced?