Electric vehicles cost more to buy than gasoline cars, and they may lose value more quickly. Even for people eager to own a car with no tailpipe emissions, it’s reasonable to wonder whether it makes sense to buy one now.

The answer may well be yes, but there are a lot of factors to consider, many of which depend on your driving habits and how important it is to you to reduce your impact on the environment. And because electric vehicles are a new technology, there is less certainty than for gasoline-powered vehicles about how the numbers will shake out over time.

Here’s what we know.

Most electric cars haven’t been on the road that long, so it’s hard to say definitively how long batteries will remain usable. Lithium-ion batteries, the kind used in virtually all electric vehicles, do lose range over time.

But the degradation is very slow. Electric cars from Tesla and other automakers have software that does a good job of protecting batteries from excess heat or voltage that can cause damage, especially when charging.

Automakers usually guarantee electric vehicle batteries for eight years or 100,000 miles, and most will replace a battery if it loses more than 30 percent of its capacity during the warranty period.

One thing to note: Batteries will still work in freezing weather and extreme heat, but their range could be temporarily reduced.