From the user, an air temperature , a station pressure , and a dewpoint temperature The density altitude calculation is quite complex. Before calculating the density altitude, the virtual temperature must be calculated first. To perform all the calculations for the density altitude calculation, the air temperature must be in units of Kelvin , the station pressure must be in units of inches of mercury and millibars , and the dewpoint temperature must be in units of degrees Celsius To see how to convert the temperatures and pressure, see the links below:

To calculate the virtual temperature , a vapor pressure must be calculated first using the equation below.

Then using station pressure in units of millibars , the virtual temperature can be calculated.

The virtual temperature answer will be in units of Kevin and needs to be converted to Rankine to calculate the density altitude. To see how to convert Kelvin to Rankine, see the link above. Finally, the density altitude can be calculated. Using the virtual temperature in units of Rankine and station pressure in inches of mercury

The density altitude will be units of feet. To convert, the answer to meters, see the equation below: