The total-out-the-door cost
The total-out-the-door cost isn't exactly the issue.
Electric cars have a lower day-day cost of operation. As the previous person said, the cost for fuel is a fraction of the fuel cost for a gasoline car. A pure electric car has much less maintenance because there are no oil changes, no spark plugs, no this, no that, etc. Taken together an electric car owners has a cost savings over a gas car owner, and the cost savings will over the course of a few years pay for the higher cost of the car.
This is similar to calculating the payback period for solar panels.
The out-the-door-cost is important because the higher that cost, the longer it takes for the savings to make up for the higher cost.