Answer:
The total mass of the atmosphere can be calculated approximately by first taking the earth's total surface area (A = 4.pi.R2, R=6371000m) and multiply it by the global mean atmospheric pressure of 98550Pa to get the atmosphere's total weight in Newton. Next, divide by the average gravitational acceleration g=9.806m/s2 to get the approximate mass of the atmosphere. This yields an answer of 5.126x1018 kg that is actually about 0.4% too small, since gravity diminishes with height, and the effective total area applicable to each layer of the atmosphere increases with height. When all this is taken into account, a more correct value of 5.148x1018 kg is obtained.