I have crunched the CO2 comparison numbers between EV's and gas cars multiple times over the past several years and keep getting similar answers each time. In general the EV's have about half the CO2 emissions of gas cars because about 40% of the electric power is emission free, and the EV's are inherently more energy efficient per mile because they have regenerative braking.
The comparison has gotten much more apples to apples as of late because we now have a virtually identical vehicle being manufactured in both electric and gas form - the F150 lightning and F150 2.7 Eco Boost. Using the owner reported figures that the Lightning averages about 2.4 miles/kwh over the year, and the Eco Boost averages 22 mpg overall. The emission numbers would shake out thusly:
Lightning using the US electricity average emission rate of .86 lbs CO2 / kwh for all sources combined - 0.36 lbs CO2 / mile
Lightning on natural gas fired turbine utility averaging 40% thermal efficiency - 0.42 lbs CO2 / mile
Lightning in my immediate area which is 100% coal fired power - 0.84 lb CO2 / mile
Eco Boost F150 averaging 22 mpg on E10 - .86 lb CO2 / mile.
You might legitimately add about 5% to the Lightning numbers for electrical transmission and distribution losses, but then there is also a loss factor on the oil and gas gathering and processing. I've never been able to find the CO2 intensity for processing a gallon of gas however.
People also like to point out the energy needed for mining and processing battery materials but I've never seen any numbers on that at all and it would have to be distributed over the life of the car so that calculation would start to get real fuzzy.