Barometric Formula

Climb a mountain and the air thins — but by exactly how much, and why exponentially rather than linearly? The barometric formula answers both. In an atmosphere held at a single temperature TT under uniform gravity gg, the pressure and number density fall off as n(z)=n0 e−mgz/kBTn(z)=n_0\,e^{-mgz/k_BT}, an exponential decay whose only scale is the scale height H=kBT/mgH=k_BT/mg — the altitude over which the density drops by a factor of ee. For Earth's air that height is about 8.4 km8.4\,\mathrm{km}, comparable to the tallest peaks, which is precisely why the summit of Everest holds only a third of sea-level pressure. What makes the formula a jewel of statistical mechanics is that it can be derived two completely independent ways that meet at the same answer. The macroscopic route balances forces: each layer of air must support the weight of everything above it (hydrostatic equilibrium), and combined with the ideal-gas law this yields a first-order differential equation with an exponential solution. The microscopic route counts molecules: because gravity couples only to height, the canonical Boltzmann factor e−U/kBTe^{-U/k_BT} with U=mgzU=mgz gives the spatial density directly. The two agree because they are the same physics seen from two altitudes of description — and the barometric formula is really the position-space sibling of the Maxwell-Boltzmann velocity distribution, governed by the same TT. The formula is the uniform-gravity special case of the general Boltzmann distribution in an external potential, and it has a reach far beyond meteorology. Replace gravity with a centrifugal field and you get the gas centrifuge that separates uranium isotopes; replace mm with a buoyant mass and you recover Perrin's colloid experiment that first measured Avogadro's number and settled the reality of atoms.

Key takeaways
  • In an isothermal atmosphere under uniform gravity, pressure and number density fall off exponentially with height: n(z)=n0 e−mgz/kBTn(z)=n_0\,e^{-mgz/k_BT}, and likewise for PP and ρ\rho.
  • The single emergent length is the scale height H=kBT/mg=RT/MgH=k_BT/mg=RT/Mg — the altitude over which density drops by a factor ee; for air at 288 K288\,\mathrm K, H≈8.4 kmH\approx8.4\,\mathrm{km}.
  • Two independent derivations agree exactly: hydrostatic force balance (with the ideal-gas law) and the microscopic Boltzmann factor e−mgz/kBTe^{-mgz/k_BT}.
  • It is the spatial counterpart of the Maxwell-Boltzmann velocity distribution — momenta give e−p2/2mkBTe^{-p^2/2mk_BT}, position in a field gives e−U/kBTe^{-U/k_BT}, with the same TT.
  • Because H∝1/mH\propto1/m, heavier molecules settle lower — gravitational separation, exploited in centrifuges for isotope enrichment.
  • The uniform-gravity case is a special case of the general external-potential density n(r)∝e−U(r)/kBTn(\mathbf r)\propto e^{-U(\mathbf r)/k_BT}.
  • Key idea: a classical gas in a gravitational field arranges itself so that density decays as e−mgz/kBTe^{-mgz/k_BT}, an exponential set entirely by the ratio of thermal energy kBTk_BT to gravitational energy mgzmgz, with scale height H=kBT/mgH=k_BT/mg.
The core insight

A classical gas in uniform gravity at temperature TT arranges itself so that its number density decays exponentially with height, n(z)=n0 e−mgz/kBTn(z)=n_0\,e^{-mgz/k_BT}, with scale height H=kBT/mgH=k_BT/mg — the altitude over which thermal energy and gravitational energy come into balance and the density falls by a factor of ee.

Where this lives today

The barometric formula and its scale height remain the working backbone of planetary and stellar atmosphere science. Every model of a planetary atmosphere begins by computing H=kBT/mgH=k_BT/mg to set the vertical grid; comparing HH to the planet's radius, and the thermal speed to the escape velocity, tells you whether an atmosphere is gravitationally retained over geological time — the reason Earth keeps its nitrogen but has lost its primordial hydrogen and helium. In laboratory and industrial practice the same n∝e−U/kBTn\propto e^{-U/k_BT} law, with gravity replaced by the centrifugal potential −12mω2r2-\tfrac12 m\omega^2 r^2, drives the gas centrifuge: the tiny mass difference between 235UF6^{235}\mathrm{UF_6} and 238UF6^{238}\mathrm{UF_6} is amplified by the enormous centrifugal acceleration inside a rapidly rotating gas centrifuge, producing a measurable separation that enables uranium enrichment. In soft-matter physics, sedimentation equilibrium of colloids, polymers, and macromolecules — the modern descendant of Perrin's experiment — is a standard tool of the analytical ultracentrifuge for measuring particle masses. And in optical-trapping and cold-atom experiments, the density of atoms in a gravitational or optical potential is read directly through the same Boltzmann profile, now imaged atom by atom.

The physical picture

Think of the air molecules as a swarm of tiny balls bouncing in a gravitational well. A molecule reaches height zz only if it has enough upward kinetic energy to pay the potential cost mgzmgz, and the Boltzmann factor e−mgz/kBTe^{-mgz/k_BT} is exactly the fraction of molecules for which that cost is thermally affordable. Higher up, fewer qualify, and the density thins exponentially. The same picture explains why the decay is exponential and not linear: each thin layer of air must hold up the weight of the entire column above it, and since that weight is itself proportional to the local density, the balance is self-similar — a constant fractional drop per unit height, which is the signature of an exponential. The one number that controls everything is the scale height H=kBT/mgH=k_BT/mg, the altitude at which gravitational energy mgHmgH exactly equals thermal energy kBTk_BT. Below HH thermal jostling keeps the gas well-mixed; above it gravity wins and the density plummets. For Earth's air H≈8.4 kmH\approx8.4\,\mathrm{km}, which is why mountaineers feel the thinning air so acutely — a few kilometres is already a full ee-folding.

Figure
Molecules in a gravitational well: the density thins exponentially with height. The scale height H is where the density has dropped to n0/e — thermal energy kT balances gravitational energy mgH there.
height z → ← denser density n(z) thinner → z = H : n = n0/e n(z) = n0 e^(−z/H)

The second figure is the punchline: the scale height is inversely proportional to molecular mass, so light and heavy gases separate under gravity. Hydrogen, fourteen times lighter than nitrogen, has a scale height fourteen times larger; its density barely changes over the first ten kilometres, while a heavy gas hugs the ground. Plotting several species on one graph, the light gas is a gently sloping line and the heavy one a steep cliff — the geometric picture of gravitational fractionation, and the exact principle a centrifuge exploits to enrich uranium.

Figure
Punchline: scale height H ∝ 1/mass, so gases separate by weight. Hydrogen (H≈121 km) decays slowly; nitrogen (8.7 km) and oxygen (7.6 km) fall fast — light species dominate high up.
height z (km) → n(z) / n0 1 1/e H2: H≈121 km N2: H≈8.7 km O2: H≈7.6 km

The core equations

The central result is the exponential density (or pressure) profile. It follows from the balance between thermal spreading and gravitational settling, and the exponent is simply the ratio of the gravitational potential energy mgzmgz of a molecule to the thermal energy kBTk_BT.

n(z)=n0 exp⁡ ⁣(−mgzkBT),P(z)=P0 exp⁡ ⁣(−mgzkBT)(1)n(z)=n_0\,\exp\!\left(-\frac{mgz}{k_BT}\right),\qquad P(z)=P_0\,\exp\!\left(-\frac{mgz}{k_BT}\right) \qquad (1)

where: n(z)n(z) — number density at height zz; P(z)P(z) — pressure at height zz; n0,P0n_0,P_0 — reference values at z=0z=0; mm — mass of one molecule; gg — gravitational acceleration (assumed uniform); kB=1.380649×10−23 J/Kk_B=1.380649\times10^{-23}\,\mathrm{J/K}; TT — the (constant) temperature. Reading it: at fixed TT the ideal-gas law makes PP, nn, and ρ\rho all proportional, so they share the identical exponential profile. The exponent is dimensionless — energy over energy. The single length scale controlling the decay is the scale height, which can be written per-particle or per-mole.

H=kBTmg=RTMg(2)H=\frac{k_BT}{mg}=\frac{RT}{Mg} \qquad (2)

where: HH — the ee-folding height; R=NAkB=8.314 J mol−1K−1R=N_Ak_B=8.314\,\mathrm{J\,mol^{-1}K^{-1}}; M=NAmM=N_Am — the molar mass. Reading it: HH is the altitude at which mgH=kBTmgH=k_BT, so the density there is n0/en_0/e. The two forms are identical because R=NAkBR=N_Ak_B and M=NAmM=N_Am; a light or hot gas has a large HH and extends far, a heavy or cold gas a small HH and hugs the ground. The macroscopic starting point is hydrostatic equilibrium: the pressure gradient supports the weight of the gas.

dPdz=−ρ(z) g=−mgkBT P(z)(3)\frac{dP}{dz}=-\rho(z)\,g=-\frac{mg}{k_BT}\,P(z) \qquad (3)

where: dP/dzdP/dz — the vertical pressure gradient; ρ=mn\rho=mn — mass density; the second equality uses P=nkBTP=nk_BT to write ρ=(m/kBT)P\rho=(m/k_BT)P. Reading it: this is a first-order linear ODE with constant coefficient 1/H1/H; its solution is the exponential of equation (1). The microscopic starting point is the canonical Boltzmann factor for a molecule whose energy separates into kinetic and gravitational parts.

n(z)∝∫d3p  exp⁡ ⁣(−p2/2m+mgzkBT)=C e−mgz/kBT(4)n(z)\propto\int d^3p\;\exp\!\left(-\frac{p^2/2m+mgz}{k_BT}\right)=C\,e^{-mgz/k_BT} \qquad (4)

where: C=(2πmkBT)3/2C=(2\pi mk_BT)^{3/2} is the momentum integral, the same at every height. Reading it: because the energy is a sum of a momentum part and a position part, the Boltzmann factor factorizes; integrating out momenta leaves exactly the configurational factor e−mgz/kBTe^{-mgz/k_BT} — the identical profile as the macroscopic derivation. A quick consequence worth remembering: for an isothermal atmosphere extending from z=0z=0 to ∞\infty, the mean height is ⟨z⟩=H\langle z\rangle=H, so the mean gravitational potential energy is ⟨U⟩=mgH=kBT\langle U\rangle=mgH=k_BT. These are expectation values over the exponential density distribution, not the maximum height reached by a molecule.

⟨z⟩=H,⟨U⟩=mg⟨z⟩=mgH=kBT(5)\langle z\rangle=H,\qquad \langle U\rangle=mg\langle z\rangle=mgH=k_BT \qquad (5)

where: ⟨z⟩\langle z\rangle — the average altitude; ⟨U⟩\langle U\rangle — the average gravitational potential energy. Reading it: a coordinate appearing linearly in the energy (over the half-line z≥0z\ge0) contributes a full kBTk_BT to the average energy — not the 12kBT\tfrac12 k_BT of a quadratic degree of freedom, a small but instructive echo of the generalized equipartition rule kBT/nk_BT/n with n=1n=1.

Derivation AThe macroscopic route: hydrostatics plus the ideal-gas law

The goal is to derive the exponential pressure profile from mechanical equilibrium alone, treating the atmosphere as a continuous fluid at uniform temperature. The strategy is to write down the hydrostatic balance for a thin slab of air, use the ideal-gas law to eliminate the density in favour of the pressure, obtain a first-order linear differential equation, and integrate it. The only physical inputs are that each layer supports the weight above it and that the gas obeys P=nkBTP=nk_BT at constant TT.

Step 1. Balance forces on a thin slab between zz and z+dzz+dz of cross-sectional area AA. It feels an upward push P(z)AP(z)A from below, a downward push P(z+dz)AP(z+dz)A from above, and its own weight ρgA dz\rho g A\,dz. Equilibrium requires P(z)A−P(z+dz)A−ρgA dz=0P(z)A-P(z+dz)A-\rho g A\,dz=0, which in the differential limit is dP=−ρg dzdP=-\rho g\,dz.

Step 2. Eliminate the density using the ideal-gas law at constant temperature. Since P=nkBTP=nk_BT and ρ=mn\rho=mn, we have ρ=(m/kBT) P\rho=(m/k_BT)\,P. Substituting, dPdz=−mgkBT P\dfrac{dP}{dz}=-\dfrac{mg}{k_BT}\,P. Why this is an exponential. The differential equation has the form dP/dz=−P/HdP/dz=-P/H, so the fractional change in pressure over a small height interval dzdz is the constant fraction −dz/H-dz/H. Repeating the same fractional decrease layer after layer produces an exponential profile.

Step 3. Separate variables and integrate from the reference level to height zz: ∫P0PdP′P′=−mgkBT∫0zdz′\displaystyle\int_{P_0}^{P}\frac{dP'}{P'}=-\frac{mg}{k_BT}\int_0^z dz', giving ln⁡(P/P0)=−mgz/kBT\ln(P/P_0)=-mgz/k_BT.

Step 4. Exponentiate: P(z)=P0 e−mgz/kBTP(z)=P_0\,e^{-mgz/k_BT}. Because P∝n∝ρP\propto n\propto\rho at fixed TT, all three obey the same profile. In the limit g→0g\to0 the exponent vanishes and P=P0P=P_0 (a uniform, weightless gas), as it must. Note: the ODE dP/dz=−(mg/kBT)PdP/dz=-(mg/k_BT)P integrates symbolically to P=P0 e−mgz/kBTP=P_0\,e^{-mgz/k_BT}, and the two forms of the scale height satisfy the identity kBT/mg=RT/Mgk_BT/mg=RT/Mg exactly.

Go deeper · Derivation B · 1 minThe microscopic route: the Boltzmann factor and its agreement with hydrostatics
Derivation BThe microscopic route: the Boltzmann factor and its agreement with hydrostatics

The goal is to obtain the identical density profile from the canonical ensemble, showing that the barometric law is the position-space projection of the Boltzmann distribution and that the same temperature governs both the velocity distribution and the spatial profile. The strategy is to write the single-molecule energy as kinetic plus gravitational, use that the Boltzmann factor of a sum factorizes, and integrate out the momenta — leaving only the configurational factor, which must match the macroscopic result.

Step 1. Write the single-particle energy E(p,r)=p22m+mgzE(\mathbf p,\mathbf r)=\dfrac{p^2}{2m}+mgz, kinetic plus gravitational potential. The canonical phase-space density is f∝e−E/kBT=e−p2/2mkBT e−mgz/kBTf\propto e^{-E/k_BT}=e^{-p^2/2mk_BT}\,e^{-mgz/k_BT}, a product because the exponent is a sum.

Step 2. Obtain the spatial density by integrating out the momenta: n(z)∝∫d3p  e−p2/2mkBT e−mgz/kBTn(z)\propto\displaystyle\int d^3p\;e^{-p^2/2mk_BT}\,e^{-mgz/k_BT}. The momentum Gaussian integrates to the constant C=(2πmkBT)3/2C=(2\pi mk_BT)^{3/2}, which is the same at every height. Why the momentum integral drops out. The kinetic energy does not depend on zz, so the velocity distribution is identical at every altitude — the air at the summit is locally the same Maxwell-Boltzmann gas as at sea level, just rarer. The height dependence lives entirely in the configurational factor.

Step 3. The surviving factor is n(z)=n0 e−mgz/kBTn(z)=n_0\,e^{-mgz/k_BT} with n0=n(0)n_0=n(0) — exactly the macroscopic barometric law. The two derivations agree because hydrostatic balance is the coarse-grained statement of the same microscopic weighting.

Step 4. As a cross-check, the mean height is ⟨z⟩=∫0∞z e−z/Hdz∫0∞e−z/Hdz=H\langle z\rangle=\dfrac{\int_0^\infty z\,e^{-z/H}dz}{\int_0^\infty e^{-z/H}dz}=H, so the mean potential energy is ⟨U⟩=mgH=kBT\langle U\rangle=mgH=k_BT — the linear-potential analogue of equipartition. Note: the momentum Gaussian ∫e−p2/2mkBTdp=2πmkBT\int e^{-p^2/2mk_BT}dp=\sqrt{2\pi mk_BT} is height-independent, confirming that the velocity distribution is identical at every altitude; the Boltzmann and hydrostatic profiles agree exactly; and ⟨z⟩=H\langle z\rangle=H with ⟨U⟩=kBT\langle U\rangle=k_BT.

Limiting cases

The profile behaves in instructive ways at the edges of its parameters.

CaseResultMeaning
Low altitude, z≪Hz\ll HP≈P0(1−z/H)P\approx P_0(1-z/H)Linearizing gives a constant gradient dP/dz≈−ρ0gdP/dz\approx-\rho_0 g — ordinary incompressible hydrostatics near the surface.
High temperature, T→∞T\to\inftyH→∞H\to\infty, n→n0n\to n_0Thermal motion overwhelms gravity; the gas fills the column uniformly.
Heavy or cold, mg/kBT→∞mg/k_BT\to\inftynn collapses to z=0z=0Gravity dominates; nearly all molecules settle into a thin layer at the floor.
Multiple speciesni=ni,0 e−migz/kBTn_i=n_{i,0}\,e^{-m_ig z/k_BT}Each gas has its own Hi=kBT/migH_i=k_BT/m_ig; heavy species are relatively enriched below (gravitational fractionation).

Worked examples

Example 1 — The scale height of air and the pressure at the summit of Everest (compute the length, then the boundary number). Take dry air at T=288 KT=288\,\mathrm K, molar mass M=0.02896 kg/molM=0.02896\,\mathrm{kg/mol}, and g=9.81 m/s2g=9.81\,\mathrm{m/s^2}.

Step 1. Compute the molecular mass: m=M/NA=0.02896/(6.022×1023)=4.81×10−26 kgm=M/N_A=0.02896/(6.022\times10^{23})=4.81\times10^{-26}\,\mathrm{kg}.

Step 2. Compute the scale height: H=kBT/mg=(1.381×10−23)(288)/[(4.81×10−26)(9.81)]=8.43 kmH=k_BT/mg=(1.381\times10^{-23})(288)/[(4.81\times10^{-26})(9.81)]=\mathbf{8.43\,km}. (Equivalently H=RT/Mg=(8.314)(288)/[(0.02896)(9.81)]H=RT/Mg=(8.314)(288)/[(0.02896)(9.81)], the same number.)

Step 3. Boundary number. At the summit of Everest, h=8848 mh=8848\,\mathrm m, the isothermal formula gives P/P0=e−h/H=e−8848/8430=e−1.05=0.35P/P_0=e^{-h/H}=e^{-8848/8430}=e^{-1.05}=\mathbf{0.35}. The observed value is about 0.310.31–0.330.33; the isothermal model overestimates because the real atmosphere cools with height, making it denser aloft than a uniform-temperature column would be. Even this crude one-temperature model captures the key fact — a third of an atmosphere at the roof of the world — and explains the need for supplemental oxygen.

Example 2 — Gravitational separation of hydrogen and nitrogen (why the upper atmosphere is light-gas enriched). Compare the scale heights of hydrogen (M=0.002 kg/molM=0.002\,\mathrm{kg/mol}) and nitrogen (M=0.028 kg/molM=0.028\,\mathrm{kg/mol}) at 288 K288\,\mathrm K.

Step 1. Since H=RT/(Mg)H=RT/(Mg), the scale height is inversely proportional to the molar mass. Nitrogen: HN2=RT/MN2g=(8.314)(288)/[(0.028)(9.81)]=8.7 kmH_{\mathrm{N_2}}=RT/M_{\mathrm{N_2}}g=(8.314)(288)/[(0.028)(9.81)]=\mathbf{8.7\,km}. Hydrogen: HH2=(8.314)(288)/[(0.002)(9.81)]=121 kmH_{\mathrm{H_2}}=(8.314)(288)/[(0.002)(9.81)]=\mathbf{121\,km}.

Step 2. Apply the profiles. At a height of 50 km50\,\mathrm{km}, nitrogen's density has fallen by e−50/8.7=e−5.75=3.2×10−3e^{-50/8.7}=e^{-5.75}=3.2\times10^{-3} of its surface value, while hydrogen's has fallen only by e−50/121=e−0.41=0.66e^{-50/121}=e^{-0.41}=0.66.

Step 3. Boundary number. The ratio of hydrogen to nitrogen abundance has grown by a factor 0.66/(3.2×10−3)≈2100.66/(3.2\times10^{-3})\approx\mathbf{210} relative to the ground. In diffusive equilibrium the abundance ratio of hydrogen to nitrogen increases exponentially with altitude because hydrogen has the larger scale height. In Earth's atmosphere, however, turbulent mixing keeps the homosphere (roughly the lowest 80–100 km) nearly uniform in composition, so significant gravitational separation appears only above this region. The same dependence on molecular mass is exploited much more efficiently in gas centrifuges, where the effective acceleration is enormously larger than gravity.

Origins · 1 minbarometric formula and how this was discovered
BF
barometric formula
statistical-mechanics concept · Halley 1686; Laplace; Boltzmann 1868

The barometric formula relates atmospheric pressure to altitude through the exponential P=P0 e−mgz/kBTP=P_0\,e^{-mgz/k_BT}. Edmond Halley (1686) first published a quantitative pressure-altitude relation from Boyle's law and barometer readings, and Pierre-Simon Laplace refined the barometric height formula for surveying and meteorology in the early 1800s. Its statistical-mechanical meaning came with Ludwig Boltzmann, whose distribution e−U/kBTe^{-U/k_BT} (1868–1877) revealed the atmosphere's exponential thinning as a special case of the general law for a gas in any external potential. The formula's most celebrated use was by Jean Perrin (1908–1913), who applied its colloidal analogue to settling resin spheres to measure Avogadro's number and confirm the reality of atoms.

History
1643
— Torricelli invents the mercury barometer, showing air has weight.
1686
— Halley publishes a quantitative relation between barometric pressure and altitude.
1868
— Boltzmann introduces the distribution e^(−U/kT), making the atmosphere's decay a special case.
1905
— Einstein's Brownian-motion theory sets the stage for measuring molecular constants from fluctuations.
1909
— Perrin measures Avogadro's number from the vertical distribution of colloidal particles.

Going further

References. Pathria & Beale, Statistical Mechanics, 3rd ed., §3.7 (equipartition and external-field discussions) · Reif, Fundamentals of Statistical and Thermal Physics, §7.9 and §1 · Kardar, Statistical Physics of Particles, Ch. 4 · Sethna, Statistical Mechanics: Entropy, Order Parameters, and Complexity, Ch. 3 · Landau & Lifshitz, Statistical Physics Part 1, §38. Key results to keep in mind: (i) the hydrostatic ODE dP/dz=−(mg/kBT)PdP/dz=-(mg/k_BT)P integrates to P=P0 e−mgz/kBTP=P_0\,e^{-mgz/k_BT}; (ii) the canonical factorization yields the identical configurational density; (iii) H=kBT/mg=RT/Mg≈8.4 kmH=k_BT/mg=RT/Mg\approx8.4\,\mathrm{km} for dry air at 288 K288\,\mathrm K; (iv) the isothermal Everest ratio e−8848/8430≈0.35e^{-8848/8430}\approx0.35; (v) ⟨z⟩=H\langle z\rangle=H and ⟨U⟩=kBT\langle U\rangle=k_BT, and the mass-scaling H∝1/mH\propto1/m. Constants used throughout: kB=1.380649×10−23 J/Kk_B=1.380649\times10^{-23}\,\mathrm{J/K}, R=8.314 J mol−1K−1R=8.314\,\mathrm{J\,mol^{-1}K^{-1}}, NA=6.022×1023N_A=6.022\times10^{23}.

Builds on: Classical Ideal Gas · Maxwell-Boltzmann Velocity Distribution · Equipartition Theorem Leads to: Maxwell-Boltzmann Speed Distribution · Virial Theorem in Statistical Mechanics · Boltzmann Distribution in External Potentials

Why is the atmosphere's decay exponential and not linear?

Because the balance is self-similar. Each thin layer of air must hold up the weight of the entire column above it, and that weight is proportional to the local density, which is proportional to the local pressure. So the fractional drop in pressure per unit height is constant — and a quantity whose fractional rate of change is constant decays exponentially, P=P0 e−z/HP=P_0\,e^{-z/H}. A linear drop would require the weight above to be independent of altitude, which is false: as you go up there is less air above, so the pressure falls more slowly, producing the concave exponential rather than a straight line.

Why do the force-balance and Boltzmann-factor derivations give the same answer?

Because they are the same physics described at two levels. The Boltzmann factor e−mgz/kBTe^{-mgz/k_BT} is the microscopic probability that a molecule sits at height zz, given only that its energy there is mgzmgz. Hydrostatic equilibrium is the macroscopic, coarse-grained statement of that same weighting: when you average the microscopic distribution over many molecules, the net upward pressure gradient must exactly support the weight. They must agree — if they did not, the gas would not be in equilibrium. The agreement is a concrete demonstration that thermodynamics (force balance) and statistical mechanics (the Boltzmann distribution) are consistent.

Why is the mean potential energy kT and not ½kT?

Equipartition gives 12kBT\tfrac12 k_BT per quadratic degree of freedom, but the gravitational potential U=mgzU=mgz is linear in the coordinate, not quadratic. The generalized equipartition rule is kBT/nk_BT/n for an energy homogeneous of degree nn; here n=1n=1, so the share is a full kBTk_BT. You can also see it directly: the mean height is ⟨z⟩=H=kBT/mg\langle z\rangle=H=k_BT/mg, so ⟨U⟩=mg⟨z⟩=kBT\langle U\rangle=mg\langle z\rangle=k_BT. The linear potential over the half-line z≥0z\ge0 stores twice the energy of a quadratic coordinate at the same temperature.

Does the formula work for a real atmosphere?

Only as a first approximation. The exponential law assumes a single constant temperature, but the real troposphere cools with altitude at roughly 6.5 K6.5\,\mathrm{K} per kilometre (the adiabatic lapse rate). Because a cooler gas is denser, the true profile falls off somewhat faster than the isothermal exponential predicts — the isothermal formula gives 0.350.35 of sea-level pressure at Everest's summit, while the measured value is closer to 0.310.31. For accurate work you replace the constant TT with T(z)T(z) and integrate P=P0exp⁡[−∫0zmg/kBT(z′) dz′]P=P_0\exp[-\int_0^z mg/k_BT(z')\,dz']; a linear lapse rate then gives a power-law rather than a pure exponential.

How did Perrin use this to measure Avogadro's number?

Perrin suspended micron-sized resin spheres in water and watched their equilibrium vertical distribution under a microscope. The same barometric law applies, but with the molecular mass mm replaced by the buoyant mass m∗=V(ρparticle−ρfluid)m^*=V(\rho_{\text{particle}}-\rho_{\text{fluid}}), which accounts for the water the sphere displaces. By counting how the particle concentration fell with height and knowing m∗m^*, gg, and TT, he could solve n(z)=n0 e−m∗gz/kBTn(z)=n_0\,e^{-m^*gz/k_BT} for kBk_B — and hence for Avogadro's number NA=R/kBN_A=R/k_B. The result agreed with values from utterly different methods, which is what clinched the reality of atoms and won Perrin the 1926 Nobel Prize.

How does a gas centrifuge relate to the barometric formula?

It is the same law with the gravitational potential mgzmgz replaced by the centrifugal potential −12mω2r2-\tfrac12 m\omega^2 r^2. Spinning the gas at angular velocity ω\omega gives a density profile n(r)∝e+mω2r2/2kBTn(r)\propto e^{+m\omega^2 r^2/2k_BT} — density now increases outward, and increases faster for heavier molecules. The tiny mass difference between 235UF6^{235}\mathrm{UF_6} and 238UF6^{238}\mathrm{UF_6} (less than 1%1\%) produces a small but exploitable difference in the radial profiles; rotating at rim speeds near the speed of sound amplifies the separation, and cascading thousands of centrifuges enriches uranium. The physics is identical to the atmosphere — only the external potential has changed.

What is the general law behind the barometric formula?

The barometric formula is the uniform-gravity special case of the general Boltzmann distribution in an external potential: for a classical gas in any potential U(r)U(\mathbf r) at temperature TT, the number density is n(r)=n0 e−U(r)/kBTn(\mathbf r)=n_0\,e^{-U(\mathbf r)/k_BT}. Setting U=mgzU=mgz recovers the atmosphere; setting U=−12mω2r2U=-\tfrac12 m\omega^2 r^2 gives the centrifuge; setting U=m∗gzU=m^*gz with a buoyant mass gives Perrin's colloids. The momentum degrees of freedom always integrate out to a height-independent constant, leaving the configurational Boltzmann factor to shape the spatial density — which is why the same exponential structure recurs across all these problems.

Before this

Where this leads