It’s no secret that upfront cost is one of the major obstacles when it comes to the attractiveness of electric cars on the market.

But drivers should think again, according to a new analysis from the Electric Power Research Institute (EPRI). The study compared the prices of the Nissan Leaf (NASDAQ: NSANY) and Chevy Volt for the 2013 model season against comparable gasoline cars on the market.

Overall, the two plug-ins were within 10 percent of conventional vehicles, both gas and hybrids. Gasoline prices were one of the major factors that could affect the balance, but state and federal incentives and capital costs of the vehicles were even more important. Driving habits and maintenance also played a role.

To account for different driving patterns, EPRI took two different driving scenarios from the dataset used in the report. In one case, 83 percent of driving days were less than 40 miles, and the other scenario had only 53 percent of driving days were less than 40 miles. The differences between the two driving types were more pronounced for those buying the all-electric Leaf rather than the plug-in hybrid Volt.

The Volt has the highest purchase price of any of the cars, although EPRI expects the overall capital costs to go down over time for electric cars with economies of scale and increases in battery efficiency. The Volt makes up for the high purchase price in gas savings, but the difference is slight.

The Leaf, however, has a greater savings when compared to gas and hybrids. EPRI only took into consideration at-home Level 2 charging and an assumption that on the days where the driver needed more range, she took a conventional vehicle. With those assumptions, the Leaf came out at more than $7,000 cheaper than competitors. Leaf also won out over the Volt in terms of monthly spend during a 60-month loan period compared to gas or hybrid cars.

EPRI also looked at California incentives for the Leaf and Volt and found that the combination of state incentives ($1,500 for the Volt and $2,500 for the Leaf), high gas prices and discount on charging equipment made both cars even less to operate over the lifetime. The Leaf came out at more than $10,000 less than its other counterparts with California incentives.

The question, however, is whether capital costs can come down as incentives are discontinued down the road. The cost of Level 2 charging equipment has already been cut in half by some manufacturers, and Nissan slashed about $6,000 from the cost of the Leaf for 2013. The costs will have to continue to come down, unless gas prices rise so high that electric starts to look pretty good.

For the report, EPRI estimated gas at $3.62 a gallon. But about 10 states have gas prices that hover around $4 per gallon, and even some Midwest states saw spikes as high as $4.27 just one month ago, due to refinery issues.

Other factors could help make up for the price differential in coming years if upfront costs for EVs don’t come down fast enough. States like Texas and California are building out fast-charging highways for electric drivers, while the EPA’s updated fuel economy sticker could also help car buyers better estimate the lifetime costs of the vehicle.