Equation 4: Atmospheric Mass

MaMass of the atmosphere, above the planetary radius (kg)
PAtmospheric Pressure, at the planetary radius (Pa)
rPlanetary Radius (m)
MpMass of the planet (including atmosphere) (kg)

Note: This equation is acceptable for terrestrial planets, but not for gas giants.
The radius of a gas giant is not the boundary between the planetary body and its atmosphere. For a gas giant, it's the radius where the atmospheric pressure equals one standard Earth atmosphere. As such, there is a lot of atmosphere below the radius of a gas giant.

Note: This equation determines the mass of the atmosphere above the radius. It can only be used as an estimate of total atmospheric mass.
Any atmosphere below the radius (in canyons etc) is not included. As can be seen by Equation 3, atmosphere below the radius is more dense. So the estimate of total atmospheric mass becomes more inaccurate with deeper canyons.

Note: This is a first order equation. This equation breaks down at high temperatures, high pressures and high CO2 concentration. As such, the estimate for Venus is very inaccurate. Van Der Waal's equation is a second order equation. It's more accurate but very complex.

These calculations are available in a MS Excel format from here

PlanetsMass of Atmosphere (kg)
Mercury2.017 x 103
Venus4.73 x 1020
Earth5.2867 x 1018
Mars2.7346 x 1016

The mass of each atmospheric constituent can be determined by its proportional presence (by mass).
For example: The Venusian atmosphere is 96.5% CO2: 0.965 x (4.73 x 1020) = 4.56445 x 1020.
Therefore there is 4.56445 x 1020 Kg of CO2 in the Venusian atmosphere.