How it works
Pressure altitude comes from the field elevation and how far the altimeter sits from 29.92. Standard temperature falls about 2°C for every 1,000 ft, and the gap between that and the real temperature is converted at 120 ft per degree to give density altitude. The angle of the wind off the runway splits the wind: sine gives the crosswind, cosine the headwind.
Formula
ISA temperature = 15 - 2 x (pressure altitude / 1,000).
Density altitude = pressure altitude + 120 x (temperature - ISA).
Crosswind = wind speed x sin(angle off runway).
Headwind = wind speed x cos(angle).
Sources
Example
Field elevation (ft): 1,000; Altimeter setting (inHg): 29.92; Outside air temperature (°C): 30; Wind speed (kt): 20. Density altitude (ft): 3,040
Frequently asked questions
Why 120 feet per degree?
It is the standard rule of thumb in the FAA Pilot's Handbook: about 120 ft of density altitude for each degree above standard temperature.
Is a tailwind shown?
Yes. A negative headwind is a tailwind, and it lengthens the takeoff roll.