The Bouguer-Lambert law may be applied to describe the attenuation of solar or stellar radiation as it travels through the atmosphere. In this case, there is scattering of radiation as well as absorption. The optical depth for a slant path is , where  refers to a vertical path,  is called the relative airmass, and for a plane-parallel atmosphere it is determined as  where  is the zenith angle corresponding to the given path. The Bouguer-Lambert law for the atmosphere is usually written
where each  is the optical depth whose subscript identifies the source of the absorption or scattering it describes:
*  refers to aerosols (that absorb and scatter);
*  are uniformly mixed gases (mainly carbon dioxide (CO)  and molecular oxygen (O) which only absorb);
*  is nitrogen dioxide, mainly due to urban pollution (absorption only);
*  are effects due to Raman scattering in the atmosphere;
*  is water vapour absorption;
*  is ozone (absorption only);
*  is Rayleigh scattering from molecular oxygen () and nitrogen () (responsible for the blue color of the sky);
* the selection of the attenuators which have to be considered depends on the wavelength range and can include various other compounds. This can include tetraoxygen, HONO, formaldehyde, glyoxal, a series of halogen radicals and others.
 is the optical mass or airmass factor, a term approximately equal (for small and moderate values of ) to  where  is the observed objects zenith angle (the angle measured from the direction perpendicular to the Earths surface at the observation site). This equation can be used to retrieve , the aerosol optical thickness, which is necessary for the correction of satellite images and also important in accounting for the role of aerosols in climate.