I believe I can shed some light on this question.
TL;DR: I think it uses an average from the history of the last 100 miles.
I did a long tour this weekend on high-speed (70+) highways with AC, and my average efficiency went way down (mid to low 4s in mi/kWh). I did a full charge and the estimated range was about 280. I resumed my normal commute immediately after the full charge, and after resetting the trip odometer/efficiency calculator, it took about 15-20 miles to get back up to the usual 6ish mi/kWh from where it started at 3.9. (I have also noticed it starts at 3.9 after I reset the trip odometer). I've driven about 140 miles since the full charge and resetting the trip odometer, and for the first 100 miles, the estimated range was stuck around 270 +/- 10mi. It was not until about almost exactly 100 miles into the "trip" that the range meter started to steadily decrease below 260. Since that time, the estimated range and the trip odometer distance have been adding up to the expected range given the trip efficiency, which at 6 mi/kWh is 360, whereas before, the est. range+trip distance just kept climbing.
It makes sense to me that they would pick some magic number like "100 miles" for efficiency average to calculate the estimated range. It should be large enough so there aren't wild fluctuations in the estimate, but small enough that it reflects recent trends.