VS a gas car? It can be as short as immediately to as long as never.
Alternative Fuels Data Center: Vehicle Cost Calculator * This website lets you compare two different vehicles choosing distances, mileage, cost per gallon, and state (for electricity cost). If you compare a car like the Mercedes EQS and the S Class (both priced about the same) you save money almost immediately. Though if you compare a car like a Hyundai Kona, which is available in both gas and electric, it varies between 11 years ($4 a gallon gas in Minnesota) and 20+ years ($3.00 a gallon in California) depending upon state and cost of gas. (Those aren't currently gas prices in California obviously, just to show how the results are affected by the change).
*I understand it's a government site, so someone's trust of it might vary.