Originally posted by chroot
Just use statistical mechanics to solve for the temperature when nearly all (99.9%?) of gas particles have velocities less than the planet's escape velocity (which depends upon its mass and radius).
 Warren

What do you define as 'escape'? Escape how far from the planet's ionosphere?