# Is there a calculation for determining the thickness of a planet's atmosphere?

I'm wondering if there a way to determine how thick (from the surface to the edge of space(karman line)) a planet's atmosphere would be. Assume an earth body like Earth or Mars (not a gas giant). I imagine there a lots of variables involved, like atmospheric composition, density, gravity, planet size...The possibilities seem endless, but I wonder if anybody has ever come up with a sort of generic equation that could give a ballpark figure as the thickness of a given planet's atmosphere?

• Possibly relevant: Kármán line Nov 22, 2016 at 18:49
• The factors would necessarily include magnetic field (lower, lose atmosphere faster) and age (loss over time).. Nov 22, 2016 at 19:10
• If you can first define "edge of space", then yes. Nov 22, 2016 at 19:25

To clarify, atmospheres don't simply abruptly stop existing at a certain height. They decrease in density and pressure exponentially with height, while how strongly that happens is controlled by temperature $$T$$, mean molecular weight $$\mu$$ of the atmospheric constituents and local strength of gravity $$g$$.
Taken together the scale height $$H$$ is
$$H = \frac{k_B T}{\mu g}$$ and then the density $$\rho$$ decreases relative to some reference density $$\rho_0$$ as $$\rho (z) = \rho_0 \cdot exp(-z/H)$$ and $$z$$ being the distance to this reference level. Same goes for the pressure with height, but not for the temperature.
However it is useful for the purpose you're asking about, as ,for example, in Earth's atmosphere in a layer $$1.0 \cdot H$$ thick, 63.2% of the total atmospheric mass is contained.
However as I said, atmospheres continue up to far into space (which is arbitrarily defined to start at $$z=100km$$ for Earth) and connect smoothly to the interplanetary medium. Also because of this, any body's atmosphere is always escaping. So what 'thickness' really means, is dependent on how much physics you want to neglect.