Calculates it based on Wh/mi. Battery left times kwh/mi divided by 100. So if you have. let's say 35% battery left and you drive at 300 kwh/mi, your range would be (300*35/100) = 105 mil range.
Your driving habit, heater / ac usage and other aspects would have a say in this calculation though.
I am not entirely sure about the calculation parameter being 300 kwh/mi though. I got this number based on what I see on my car. It might be slightly less than 300.