Physics
Why is the sky blue and the sunset red?
Sunlight is white, and air is transparent. Yet the sky glows blue at noon and the Sun sinks orange and red in the evening. Both come from one fact about how air treats light of different colours.
A common answer is that the sky is blue because it reflects the ocean. It doesn’t: the sky is just as blue over the Sahara, and the sea is blue partly because it reflects the sky. Another is that air is “a blue gas”, the way a glass of cola is brown. That isn’t right either. Air absorbs almost no visible light. What it does is scatter it: knock a little of the light out of its straight path and send it off in a new direction.
Small molecules prefer blue
Light is an electromagnetic wave. When it passes a nitrogen or oxygen molecule, the wave’s electric field shakes the molecule’s electrons back and forth, and the shaking electrons give off light of their own, in all directions. That is scattering. Because a molecule (about 0.3 nanometres across) is more than a thousand times smaller than the wavelength of visible light (400 to 700 nanometres, nm), it is called Rayleigh scattering, after John William Strutt (later Lord Rayleigh), who worked out its law in 1871.
The law is steep. A faster-shaking charge radiates much more strongly, and the strength goes as one over the wavelength to the fourth power:
scattering ∝ 1 / λ4
Here λ (lambda) is the wavelength. Blue light at 450 nm has a wavelength 0.64 times that of red light at 700 nm, and 0.644 is about 1/6. So blue is scattered roughly six times as strongly as red. (The measured ratio, ×6.1 in Figure 1, is a little higher than 5.9 because the air’s refractive index also changes slightly with colour.)
- Scattered, relative to red (700 nm)
- × 6.1
- Scattered out of a vertical beam by the whole atmosphere
- 20%
- Scattered light looks
- blue
- Light that gets through looks
- yellowish
The readout under the figure uses real numbers for the whole atmosphere. Looking straight up, there is enough air above you to scatter about 20% of violet-blue light at 450 nm out of a sunbeam, 9% of green at 550 nm, and under 4% of red at 700 nm. (These come from the measured optical depth of the atmosphere, a number that says how much a beam is dimmed: a beam crossing an optical depth τ keeps a fraction e−τ of its light. At sea level, τ is about 0.22 at 450 nm and 0.097 at 550 nm.)
That is why the sky is blue. Look anywhere away from the Sun and the only light reaching you is light that air has scattered toward you, and that light is rich in short wavelengths. Without air, as on the Moon, the sky is black even at noon.
The long way through the air
When the Sun is overhead, its light crosses the least possible air: one atmosphere’s worth. As the Sun sinks, the slanting path gets longer. Astronomers call the length of the path, in units of the overhead path, the air mass. At 30° above the horizon it is 2. At 10° it is 5.6. At the horizon, where the path skims along the curved Earth, it is about 38.
Every extra length of air removes more blue from the direct beam. A beam crossing 38 atmospheres keeps e−0.22 × 38 ≈ 0.02% of its 450 nm light but e−0.037 × 38 ≈ 25% of its 700 nm light. What reaches you is orange and red.
- Air mass
- 10.3
- Blue (450 nm) left in the beam
- 10%
- Red (700 nm) left in the beam
- 69%
- Sun’s brightness, vs. above the air
- 39%
- Direct Sun
- Sky overhead
Two things in Figure 2 are worth a second look. First, the Sun stays nearly white until it is quite low: at 30° it has lost about a third of its blue, which the eye barely notices. The colours of sunset are crowded into the last 10° or so, because that is where the air mass shoots up. Second, the sky overhead gets paler as the Sun drops, since the light being scattered has itself already lost blue on its way in. (The real twilight sky stays bluer than this, for a reason the model leaves out; see the end of the page.)
The air in Figure 2 starts out perfectly clean, which real air never is. It also carries aerosols: tiny particles of dust, sea salt, smoke and droplets, mostly a few hundred nanometres across. They dim light too, and still somewhat more at short wavelengths, though far less steeply than molecules do (roughly as 1/λ1.3 instead of 1/λ4). Their effect is measured by the aerosol optical depth: about 0.01 in extremely clean air, 0.1 to 0.15 on an average day in the United States, and 0.4 or more in thick haze. Raise the haze slider with the Sun low. The Sun dims dramatically and turns a deeper red, and the sky turns from blue toward white, because the particles scatter all colours more evenly than molecules do.
Why isn’t the sky violet?
If shorter means more scattered, violet light at 400 nm should beat blue. It is scattered 1.6 times more strongly than blue at 450 nm. So why is the sky not violet?
Three reasons, and Figure 3 lets you see each. Sunlight contains less violet than blue to begin with. Your eyes are much less sensitive to violet: the three curves in the figure, called colour-matching functions, are the standard measure of how the eye responds to each wavelength (they are closely tied to the eye’s three kinds of colour receptor, the cones), and they fall off steeply below about 430 nm. And the most important: the sky is not one wavelength but a mix of all of them, with extra weight at the short end. Your eye sees that mix as white light with some blue added. That is pale blue, not violet.
- Share of the light’s power below 450 nm
- Colour seen: dominant wavelength
- 476 nm (blue)
- Purity (0 white, 100% pure colour)
- 41%
The dominant wavelength readout names the single wavelength whose colour, mixed with white, matches what you see; the purity says how much of it is in the mix. For Rayleigh-scattered sunlight the model gives about 476 nm at about 40% purity: a sky blue, clearly paler than a pure spectral colour. Glenn Smith’s 2005 analysis, which treats the eye in more detail, found the same: skylight looks like blue light of 474–476 nm mixed with white.
Why clouds are white
The 1/λ4 law holds only for particles much smaller than the wavelength. A cloud droplet is about 10 micrometres across, some 20 times larger than a wavelength of light. Light bends and reflects through it much as through a tiny raindrop, and every colour is scattered about equally: the exponent n is close to 0. Scatter sunlight equally at every wavelength and you get sunlight back: white. Milk, sea foam and sugar are white for the same reason. Haze and smoke fall in between, with particles comparable to the wavelength, and make a sky that is milky rather than deep blue.
John Tyndall saw the in-between case in his laboratory in 1869: a mist of very fine particles lit by a white beam glowed blue from the side, and the blue light was polarised. Rayleigh explained it two years later with the law in Figure 1, and later showed that the air molecules themselves, not dust, are enough to make the sky blue.
What this model leaves out
- Multiple scattering. The model follows light that is scattered once. Near the horizon, where you look through a lot of air, much of the light has been scattered several times; this washes the colour out and is one reason the horizon sky is whiter than the zenith. In Figure 2 the low sky at sunset comes out pale yellow instead.
- Aerosols and dust. The haze slider in Figure 2 is a rough sketch: real particles scatter mostly forward (which makes the bright glow around the Sun), some absorb light (soot), and they sit mostly in the lowest kilometre or two of air rather than being mixed evenly through it. With the haze at zero, the model’s setting Sun keeps 4% of its full brightness, far more than in real sunsets.
- Ozone. Ozone absorbs orange and red light weakly (the Chappuis bands, around 500–700 nm). At twilight, when sunlight crosses a very long path high in the atmosphere, that absorption supplies about two-thirds of the blue of the sky overhead. Without it the model’s twilight zenith turns pale, as Figure 2 shows.
- The Sun’s spectrum. Sunlight is modelled as a 5,778 K black body. The real spectrum above the atmosphere has many absorption lines and differs noticeably, especially below about 450 nm, where it is dimmer than the black body.
- The eye. Colours are computed for the CIE 1931 standard observer and balanced so that sunlight above the air looks white, which is roughly what the eye’s adaptation does. Real eyes adapt continuously, and screens cannot show the true brightness or saturation of the sky.
- Direction and polarisation. Rayleigh scattering is twice as strong forward and backward as sideways, and light scattered at 90° is strongly polarised (which is why polarising sunglasses darken parts of the sky). The model ignores direction and polarisation, and its view of the sky does not depend on where you look relative to the Sun.
- The “white light” grains in Figure 1 are a cartoon: real light is a wave, and the box is far smaller than the kilometres of air it stands for.
Sources
- J. E. Hansen and L. D. Travis, “Light scattering in planetary atmospheres,” Space Science Reviews 16, 527–610 (1974); formula as quoted by B. A. Bodhaine et al., “On Rayleigh optical depth calculations,” J. Atmos. Oceanic Technol. 16, 1854–1861 (1999), eq. 15. journals.ametsoc.org The Rayleigh optical depth used throughout: τ = 0.008569 λ−4(1 + 0.0113 λ−2 + 0.00013 λ−4), λ in µm, sea level. It gives 0.097 at 550 nm; Bodhaine et al. compare it with other methods; the differences matter mainly in the ultraviolet.
- F. Kasten and A. T. Young, “Revised optical air mass tables and approximation formula,” Applied Optics 28, 4735–4738 (1989). doi.org/10.1364/AO.28.004735 The air mass formula, 1 / (sin h + 0.50572 (h + 6.07995°)−1.6364), giving about 38 at the horizon.
- Lord Rayleigh (J. W. Strutt), “On the light from the sky, its polarization and colour,” Philosophical Magazine 41, 107–120 and 274–279 (1871). doi.org/10.1080/14786447108640452 The 1/λ4 law for particles much smaller than the wavelength, and the history: it follows J. Tyndall, “On the blue colour of the sky, the polarization of skylight, and on the polarization of light by cloudy matter generally” (1869).
- NOAA Global Monitoring Laboratory, “SURFRAD Aerosol Optical Depth.” gml.noaa.gov/grad/surfrad/aod Typical aerosol optical depths: 0.01 extremely clean, 0.1–0.15 a US average, 0.4 very hazy. The 1/λ1.3 wavelength dependence is Ångström’s classic average value for natural haze.
- G. S. Smith, “Human color vision and the unsaturated blue color of the daytime sky,” American Journal of Physics 73, 590–597 (2005). doi.org/10.1119/1.1858479 Why the sky looks pale blue rather than violet: the role of the eye; skylight matches a blue of 474–476 nm mixed with white, which the model reproduces (476 nm).
- A. Lange, A. Rozanov and C. von Savigny, “Revisiting the question ‘Why is the sky blue?’,” Atmospheric Chemistry and Physics 23, 14829–14839 (2023). acp.copernicus.org Ozone’s Chappuis absorption supplies about two-thirds of the zenith’s blue with the Sun on the horizon (as E. O. Hulburt estimated in 1953) but only about 3% in daytime; aerosols reduce that share.
Colophon
- Date
- 1 October 2026
The model (model.js) computes spectra on a 5 nm grid from 380 to 780 nm, integrates them against the CIE 1931 2° colour-matching functions (cmf.js: the CIE table, CIE 015:2018, at 5 nm, taken from the open-source colour-science library, github.com/colour-science/colour), converts to sRGB and normalises the brightness.