# Barometric formula

The barometric formula is a formula used to model how the air pressure (or air density) changes with altitude.

## Pressure equations

There are two equations for computing pressure as a function of height. The first equation is applicable to the atmospheric layers in which the temperature is assumed to vary with altitude at a non null lapse rate of $L_{b}$:
$P=P_{b}\left[1-{\frac {L_{M,b}}{T_{M,b}}}(h-h_{b})\right]^{\frac {g_{0}'M_{0}}{R^{*}L_{M,b}}}$ The second equation is applicable to the atmospheric layers in which the temperature is assumed not to vary with altitude (lapse rate is null):
$P=P_{b}\exp \left[{\frac {-g_{0}M\left(h-h_{b}\right)}{R^{*}{T_{M,b}}}}\right]$ where:
* $P_{b}$ = reference pressure
* $T_{M,b}$ = reference temperature (K)
* $L_{M,b}$ = temperature lapse rate (K/m) in ISA
* $h$ = geopotential height at which pressure is calculated (m)
* $h_{b}$ = geopotential height of reference level b (meters; e.g., h$_b$ = 11 000 m)
* $R^{*}$ = universal gas constant: 8.3144598 J/(mol·K)
* $g_{0}$ = gravitational acceleration: 9.80665 m/s$^2$
* $M$ = molar mass of Earth's air: 0.0289644 kg/mol
Or converted to imperial units:
* $P_{b}$ = reference pressure
* $T_{M,b}$ = reference temperature (K)
* $L_{M,b}$ = temperature lapse rate (K/ft) in ISA
* $h$ = height at which pressure is calculated (ft)
* $h_{b}$ = height of reference level b (feet; e.g., h$_b$ = 36,089 ft)
* $R^{*}$ = universal gas constant; using feet, kelvins, and (SI) moles: 8.9494596×10$^4$ lb·ft$^2$/(lb-mol·K·s$^2$)
* $g_{0}$ = gravitational acceleration: 32.17405 ft/s$^2$
* $M$ = molar mass of Earth's air: 28.9644 lb/lb-mol
The value of subscript b ranges from 0 to 6 in accordance with each of seven successive layers of the atmosphere shown in the table below. In these equations, g$_0$, M and R$^*$ are each single-valued constants, while P, L, T, and h are multivalued constants in accordance with the table below. The values used for M, g$_0$, and R$^*$ are in accordance with the U.S. Standard Atmosphere, 1976, and the value for R$^*$ in particular does not agree with standard values for this constant. The reference value for P$_b$ for b = 0 is the defined sea level value, P$_0$ = 101 325 Pa or 29.92126 inHg. Values of P$_b$ of b = 1 through b = 6 are obtained from the application of the appropriate member of the pair equations 1 and 2 for the case when h = h$_{b+1}$.
| Subscript b | Geopotential height above MSL (h) | Geopotential height above MSL (h) | Static pressure | Static pressure | Standard temperature (K) | Temperature lapse rate | Temperature lapse rate | Exponent g0 M / R L |
| Subscript b | (m) | (ft) | (Pa) | (inHg) | Standard temperature (K) | (K/m) | (K/ft) | Exponent g0 M / R L |
| 0 | 0 | 0 | 101 325.00 | 29.92126 | 288.15 | 0.0065 | 0.0019812 | 5.25588 |
| 1 | 11 000 | 36,089 | 22 632.10 | 6.683245 | 216.65 | 0.0 | 0.0 | — |
| 2 | 20 000 | 65,617 | 5474.89 | 1.616734 | 216.65 | -0.001 | -0.0003048 | -34.1626 |
| 3 | 32 000 | 104,987 | 868.02 | 0.2563258 | 228.65 | -0.0028 | -0.00085344 | -12.2009 |
| 4 | 47 000 | 154,199 | 110.91 | 0.0327506 | 270.65 | 0.0 | 0.0 | — |
| 5 | 51 000 | 167,323 | 66.94 | 0.01976704 | 270.65 | 0.0028 | 0.00085344 | 12.2009 |
| 6 | 71 000 | 232,940 | 3.96 | 0.00116833 | 214.65 | 0.002 | 0.0006096 | 17.0813 |

## Density equations

The expressions for calculating density are nearly identical to calculating pressure. The only difference is the exponent in Equation 1.
There are two equations for computing density as a function of height. The first equation is applicable to the standard model of the troposphere in which the temperature is assumed to vary with altitude at a lapse rate of $L_{b}$; the second equation is applicable to the standard model of the stratosphere in which the temperature is assumed not to vary with altitude.
Equation 1: $\rho =\rho _{b}\left[{\frac {T_{b}-(h-h_{b})L_{b}}{T_{b}}}\right]^{\left({\frac {g_{0}M}{R^{*}L_{b}}}-1\right)}$
which is equivalent to the ratio of the relative pressure and temperature changes
$\rho =\rho _{b}{\frac {P}{T}}{\frac {T_{b}}{P_{b}}}$
Equation 2: $\rho =\rho _{b}\exp \left[{\frac {-g_{0}M\left(h-h_{b}\right)}{R^{*}T_{b}}}\right]$
where
* ${\rho }$ = mass density (kg/m$^3$)
* $T_{b}$ = standard temperature (K)
* $L$ = standard temperature lapse rate (see table below) (K/m) in ISA
* $h$ = height above sea level (geopotential meters)
* $R^{*}$ = universal gas constant 8.3144598 N·m/(mol·K)
* $g_{0}$ = gravitational acceleration: 9.80665 m/s$^2$
* $M$ = molar mass of Earth's air: 0.0289644 kg/mol
or, converted to U.S. gravitational foot-pound-second units (no longer used in U.K.):
* ${\rho }$ = mass density (slug/ft$^3$)
* ${T_{b}}$ = standard temperature (K)
* ${L}$ = standard temperature lapse rate (K/ft)
* ${h}$ = height above sea level (geopotential feet)
* ${R^{*}}$ = universal gas constant: 8.9494596×10$^4$ ft$^2$/(s·K)
* ${g_{0}}$ = gravitational acceleration: 32.17405 ft/s$^2$
* ${M}$ = molar mass of Earth's air: 28.9644 lb/lb-mol
The value of subscript b ranges from 0 to 6 in accordance with each of seven successive layers of the atmosphere shown in the table below. The reference value for ρ$_b$ for b = 0 is the defined sea level value, ρ$_0$ = 1.2250 kg/m$^3$ or 0.0023768908 slug/ft$^3$. Values of ρ$_b$ of b = 1 through b = 6 are obtained from the application of the appropriate member of the pair equations 1 and 2 for the case when h = h$_{b+1}$.
In these equations, g$_0$, M and R$^*$ are each single-valued constants, while ρ, L, T and h are multi-valued constants in accordance with the table below. The values used for M, g$_0$ and R$^*$ are in accordance with the U.S. Standard Atmosphere, 1976, and that the value for R$^*$ in particular does not agree with standard values for this constant.
| Subscript b | Geopotential height above MSL (h) | Geopotential height above MSL (h) | Mass Density ($\rho$) | Mass Density ($\rho$) | Standard Temperature (T') (K) | Temperature Lapse Rate (L) | Temperature Lapse Rate (L) |
| Subscript b | (m) | (ft) | (kg/m$^3$) | (slug/ft$^3$) | Standard Temperature (T') (K) | (K/m) | (K/ft) |
| 0 | 0 | 0 | 1.2250 | 2.3768908×10$^{−3}$ | 288.15 | 0.0065 | 0.0019812 |
| 1 | 11 000 | 36,089.24 | 0.36391 | 7.0611703×10$^{−4}$ | 216.65 | 0.0 | 0.0 |
| 2 | 20 000 | 65,616.79 | 0.08803 | 1.7081572×10$^{−4}$ | 216.65 | -0.001 | -0.0003048 |
| 3 | 32 000 | 104,986.87 | 0.01322 | 2.5660735×10$^{−5}$ | 228.65 | -0.0028 | -0.00085344 |
| 4 | 47 000 | 154,199.48 | 0.00143 | 2.7698702×10$^{−6}$ | 270.65 | 0.0 | 0.0 |
| 5 | 51 000 | 167,322.83 | 0.00086 | 1.6717895×10$^{−6}$ | 270.65 | 0.0028 | 0.00085344 |
| 6 | 71 000 | 232,939.63 | 0.000064 | 1.2458989×10$^{−7}$ | 214.65 | 0.002 | 0.0006096 |

## Derivation

The barometric formula can be derived using the ideal gas law: $P={\frac {\rho }{M}}{R^{*}}T$
Assuming that all pressure is hydrostatic: $dP=-\rho g\,dz$ and dividing this equation by $P$ we get: ${\frac {dP}{P}}=-{\frac {Mg\,dz}{R^{*}T}}$
Integrating this expression from the surface to the altitude z we get: $P=P_{0}e^{-\int _{0}^{z}{Mgdz/R^{*}T}}$
Assuming linear temperature change $T=T_{0}-Lz$ and constant molar mass and gravitational acceleration, we get the first barometric formula: $P=P_{0}\cdot \left[{\frac {T}{T_{0}}}\right]^{\textstyle {\frac {Mg}{R^{*}L}}}$
Instead, assuming constant temperature, integrating gives the second barometric formula: $P=P_{0}e^{-Mgz/R^{*}T}$
In this formulation, R$^*$ is the gas constant, and the term R$^*$T/Mg gives the scale height (approximately equal to 8.4 km for the troposphere).
(For exact results, it should be remembered that atmospheres containing water do not behave as an ideal gas. See real gas or perfect gas or gas for further understanding.)