Gas car: cost per mile = price per gallon ÷ miles per gallon
Let's assume 30 mpg and $4.50 a gallon, that's $0.15 per mile.
Electric car: cost per mile = price per kWh ÷ miles per kWh
Let's assume 3.5 miles per kWh and residential rates of $0.14 per kWh, that's $0.04 per mile.
Fast chargers will push the cost much higher in the US. They can charge $0.60 per kWh or higher at peak hours, which would put you at $0.17 per mile in the same car. There are ways to bring that cost down too if that's your only way to charge.