Ah, but if you are going to do that kind of calculation you then have to factor in the costs of exploration, drilling, refining, transporting, storing, and pumping fossil fuels. Plus the intangibles like the economic impact of gas stations to a local economy; etc. You also need to factor in the costs of locating, mining, and processing battery materials vs their real world life span. One could also include the cost of shipping, storing, and recycling the batteries.
Then you get into the maintenance costs. A modern internal combustion engine and its necessary ancillary components comprise hundreds (if not thousands) of components. Many of them moving, in a caustic environment, and subject to wear. Compare that to a BEV where there are a couple dozen drive components with only two moving parts and MTBF ratings. Switch to electric vehicles and suddenly you are only getting the brakes, tires, and transmission/differential serviced. And with regenerative braking your period between maintenance is greatly extended.
The main advantages of electric vehicles are:
1) 90-95% efficient drive train.
2) Can use any energy storage medium that can be converted into electricity. (flywheels, fuel cells, gasoline powered generators, turbines, batteries; etc).
3) More torque at lower (zero) RPM.
4) Less components to wear out.
5) With BEVs you have a centralized fuel delivery system with a pre-built infrastructure that allows you to increase efficiency/environmental impact for millions of vehicles (assuming everyone is driving one) with a single upgrade over a very short period of time.
6) BEVs can actually help balance a power grid by acting as local storage systems for neighborhood power during periods of peak load and consuming poer at off-peak when that power is otherwise wasted.