In atmospheric thermodynamics, the **virtual temperature** () of a moist air parcel is the temperature at which a theoretical dry air parcel would have a total pressure and density equal to the moist parcel of air.^{[1]}
The virtual temperature of unsaturated moist air is always greater than the absolute air temperature, however, as the existence of suspended cloud droplets reduces the virtual temperature.

The virtual temperature effect is also known as the vapor buoyancy effect.^{[2]} It has been described to increase Earth's thermal emission by warming the tropical atmosphere.^{[3]}^{[4]}

In atmospheric thermodynamic processes, it is often useful to assume air parcels behave approximately adiabatically, and approximately ideally. The specific gas constant for the standardized mass of one kilogram of a particular gas is variable, and described mathematically as

where is the molar gas constant, and is the apparent molar mass of gas in kilograms per mole. The apparent molar mass of a theoretical moist parcel in Earth's atmosphere can be defined in components of water vapor and dry air as

with being partial pressure of water, dry air pressure, and and representing the molar masses of water vapor and dry air respectively. The total pressure is described by Dalton's law of partial pressures:

Rather than carry out these calculations, it is convenient to scale another quantity within the ideal gas law to equate the pressure and density of a dry parcel to a moist parcel. The only variable quantity of the ideal gas law independent of density and pressure is temperature. This scaled quantity is known as virtual temperature, and it allows for the use of the dry-air equation of state for moist air.^{[5]} Temperature has an inverse proportionality to density. Thus, analytically, a higher vapor pressure would yield a lower density, which should yield a higher virtual temperature in turn.

Consider a moist air parcel containing masses and of dry air and water vapor in a given volume . The density is given by

where and are the densities the dry air and water vapor would respectively have when occupying the volume of the air parcel. Rearranging the standard ideal gas equation with these variables gives

- and

Solving for the densities in each equation and combining with the law of partial pressures yields

Then, solving for and using is approximately 0.622 in Earth's atmosphere:

where the virtual temperature is

We now have a non-linear scalar for temperature dependent purely on the unitless value , allowing for varying amounts of water vapor in an air parcel. This virtual temperature in units of kelvin can be used seamlessly in any thermodynamic equation necessitating it.

Often the more easily accessible atmospheric parameter is the mixing ratio . Through expansion upon the definition of vapor pressure in the law of partial pressures as presented above and the definition of mixing ratio:

which allows

Algebraic expansion of that equation, ignoring higher orders of due to its typical order in Earth's atmosphere of , and substituting with its constant value yields the linear approximation

With the mixing ratio expressed in g/g.^{[6]}

An approximate conversion using in degrees Celsius and mixing ratio in g/kg is^{[7]}

Virtual potential temperature is similar to potential temperature in that it removes the temperature variation caused by changes in pressure. Virtual potential temperature is useful as a surrogate for density in buoyancy calculations and in turbulence transport which includes vertical air movement.

A moist air parcel may also contain liquid droplets and ice crystals in addition to water vapor. A net mixing ratio can be defined as the sum of the mixing ratios of water vapor , liquid , and ice present in the parcel. Assuming that and are typically much smaller than , a *density temperature* of a parcel can be defined, representing the temperature at which a theoretical dry air parcel would have the a pressure and density equal to a moist parcel of air while accounting for condensates:^{[8]}^{: 113 }

Virtual temperature is used in adjusting CAPE soundings for assessing available convective potential energy from skew-T log-P diagrams. The errors associated with ignoring virtual temperature correction for smaller CAPE values can be quite significant.^{[9]} Thus, in the early stages of convective storm formation, a virtual temperature correction is significant in identifying the potential intensity in tropical cyclogenesis.^{[10]}