For many, the hardest part of having an electric vehicle is route planning on longer trips. In-range drives aren't really an issue, but if you have to stop to charge, it can be a bit of a hassle estimating when and where to do it, and it gets more complicated the longer the trip is. A conservative estimate just wastes time, which is already at a premium with you having to wait at each pit stop to top up. But for EVs with Google Maps built-in, like the recent Polestar 2 and Volvo XC40 Recharge, it's less of an issue thanks to some new tweaks rolling out now.

The math behind these changes and how they work is pretty complex, but even a cursory overview demonstrates how difficult a problem like this is. The shortest or most direct route may actually not be the most ideal when taking into account charging stations, the distance between them, the time spent charging, and the difference in charging time depending on the current battery level — among a huge list of other variables.

It's counter-intuitive, but this sort of problem is actually easier for Google to solve if there are fewer charging stations in a given area: You don't have a choice where to stop based purely on range, and those limited options make for a more predictable route. But in markets where EV charging is flourishing, like Europe and the denser parts of the US coasts, it's more computationally intensive due to the sheer number of choices. And while those extra options mean range anxiety isn't as much of a problem for EV owners, since they can top up almost anywhere, it does make finding the ideal route for longer trips harder.

There are also a lot of variables to balance on top of the much simpler problem of direct routing. Google's also taking into account road characteristics like length, elevation, and slope during your trip. It's even estimating the battery level it expects you to have when you get to a given charging station to figure out how long it takes to charge, as one affects the other — charging from 20% to 60% for a certain leg of the trip might be faster than 0% to 40% or 60% to 100%, as you may end up doing on another route.

Ultimately, Google Maps' new system calculates and optimizes everything so that you don't have to, finding a route for any trip with two or more stops that minimizes how long you have to spend not just in transit but waiting for a charge, with an accurate ETA that takes it all into account. Best of all, this fancy math happens in less than 10 seconds.

For short trips with only one recharge, you'll be able to select from a list of charging stations, with estimates for things like estimated charging time conveniently listed. And in Europe, it will also list which payment methods are accepted — since that can actually be an issue in that market. You can even see if a given charging spot has something like a grocery store or cafe nearby, so you can run some errands, pick up a coffee, or hop on Wi-Fi for a bit of quick work while you wait.

This functionality is rolling out now for EVs with Google Maps built-in, which is just the Polestar 2 and Volvo XC40 for now. But new cars with Android Automotive are coming, starting with GM this year. More EVs with Android Automotive and Google Maps are coming, and features like these can help diminish range anxiety on longer trips and provide one more good reason to go electric with your next car.