The blue of the sky and the red of the sunset come from the same effect: air molecules scatter short wavelengths far more than long ones. The Rayleigh scattering calculator takes two wavelengths and the elevation of the Sun, and gives the scattering ratio, the Rayleigh optical depths of the atmosphere, the air mass and the share of direct sunlight left for each colour.
How the calculation works
- Enter two wavelengths of light, such as 450 nm for blue and 650 nm for red, and the elevation of the Sun above the horizon.
- The calculator applies Rayleigh scattering, in which the amount of light scattered by air molecules is proportional to 1 / λ⁴, and gives how many times more the shorter wavelength is scattered.
- It computes the Rayleigh optical depth of the whole atmosphere at sea level for each wavelength, τ = 0.008569 λ⁻⁴ (1 + 0.0113 λ⁻² + 0.00013 λ⁻⁴), with λ in micrometres.
- With the air mass along the path of sunlight (the Kasten–Young formula), it finds the share of direct sunlight left for each wavelength, e^(−τ × air mass).
Example
Blue light of 450 nm is scattered (650 / 450)^4 = 4.35 times more than red light of 650 nm. Looking straight up, the optical depths are 0.2213 for blue and 0.0493 for red. With the Sun only 10° above the horizon, the air mass is 5.59, so only 29.1 % of the direct blue light is left, against 75.9 % of the red light. This is why a low Sun looks orange or red.
Why it matters
Rayleigh scattering is the base of atmospheric optics. It explains the colour of the sky, the red of the twilight and the haze of distant mountains. It is used in remote sensing, in the design of lighting and cameras, in astronomy to correct for the loss of light in the air, and in teaching optics and physics.
Good to know
The optical depth formula is for dry air at sea level and standard pressure and it varies with the pressure, so it is lower at altitude. The calculator ignores the absorption by ozone and gases, the scattering by aerosols and clouds, and the refraction of light near the horizon. The real colours of the sky also depend on the spectrum of the Sun and on the response of the eye. Use the results for understanding and for estimates.
Related tools
The Beer–Lambert calculator covers the decay of light in a medium, the sky quality calculator covers the darkness of the night sky, the photon energy calculator links the wavelength to the energy of light, and the refraction calculator covers the bending of light.