Convert the given altitude to kilometers (km) by dividing it by 3280.8 feet/km. Calculate the standard air temperature at the given altitude by multiplying the altitude in km by 6.5 degrees Kelvin/km and subtracting the result from 288.15 degrees K which is the standard sea-level temperature. For example, for 10,000 feet altitude divide the altitude by 3280.8 and multiply the result 6.5. This gives you 19.8 degrees K which subtracted from 288.15 gives you 268.34 degrees K.
Calculate the standard air pressure for the given altitude. Multiply the altitude in kilometers by the lapse rate of 6.5 degrees K/km and divide the result by 288.15 degrees K. Subtract this result from 1 and raise the result to the 5.256 power. Multiply the sea-level standard pressure of 101325 Pascals by the number calculated to obtain the standard pressure at the given altitude. Example: For 10,000 feet altitude, divide 19.8 degrees K from Step 1 by 288.15 which equals 0.069. One minus 0.069 is 0.931 which when raised to 5.256 power is 0.688. Multiplying this result by 101325 Pa of sea-level pressure produces a pressure of 69697 Pa.
Calculate the standard air density at a given altitude by multiplying the pressure at that altitude by 28.9644 grams/mole which is the molecular weight of dry air. Then divide this result by 1000 times the temperature at that altitude times 8.31432 Joules/mole x degrees K which is the gas constant for dry air. At 10,000 feet, 69697 times 28.9644 equals 2018744. Divide that by 268340 (from Step 1) times 8.31432 which is 2231065. This equals 0.905 kilograms/meter cubed.