The sky is blue because sunlight bounces off the tiny gas molecules in Earth’s atmosphere, and blue light bounces around far more than other colors. This process, called Rayleigh scattering, favors shorter wavelengths of light so strongly that blue light scatters roughly six times more efficiently than red light. The result: blue light reaches your eyes from every direction overhead, painting the entire sky in that familiar color.
How Sunlight Scatters in the Atmosphere
Sunlight looks white, but it contains every color of the visible spectrum, from violet (around 380 nm wavelength) through blue, green, yellow, orange, and red (up to about 700 nm). When this light enters the atmosphere, it collides with nitrogen and oxygen molecules, which together make up about 99% of the air. These molecules are extraordinarily small, roughly 0.3 nanometers across, which is more than a thousand times smaller than the wavelengths of visible light.
That size mismatch is what makes Rayleigh scattering work. When an electromagnetic wave hits a molecule much smaller than its wavelength, the wave’s electric field pushes the molecule’s electrons back and forth, creating a tiny oscillating charge. That charge then re-emits light in all directions at the same frequency. The key detail: the intensity of this scattered light follows an inverse fourth-power relationship with wavelength. In plain terms, halve the wavelength and you get 16 times more scattering. Blue light, at around 430 nm, scatters about six times more than red light at 680 nm.
Why Blue and Not Violet
Violet light has an even shorter wavelength than blue, so it actually scatters more strongly. By the math alone, the sky should look violet. Three things push the color toward blue instead.
First, the sun emits less violet light than blue light, so there’s simply less of it to scatter. Second, some violet light gets absorbed by ozone high in the atmosphere before it ever reaches the lower sky. Third, and most importantly, your eyes aren’t built to see violet very well. Human color vision relies on three types of cone cells sensitive to red, green, and blue wavelengths. Perceiving violet requires the red-sensitive cones to fire alongside the blue-sensitive ones, and the combined signal the brain receives skews toward blue. People who lack red-sensitive cones (a type of color blindness called protanopia) actually have even more difficulty distinguishing violet from blue, which confirms the red cones play a role in how we perceive shorter wavelengths. The net effect for most people: the sky registers as a rich blue.
Why Sunsets Turn Red and Orange
At sunrise and sunset, the sun sits low on the horizon, and its light passes through a much thicker slice of atmosphere to reach you. Over that longer path, blue light gets scattered away in so many directions that very little of it survives the journey to your eyes. What’s left are the longer wavelengths: reds, oranges, and yellows. Those colors dominate the sky near the horizon while the overhead sky may still appear blue or transition into deeper shades.
Dust, wildfire smoke, and pollution can amplify the effect. Larger particles in the air scatter additional wavelengths and can produce especially vivid reds and purples during sunset. This is a different scattering process (Mie scattering), which kicks in when airborne particles grow closer in size to the wavelengths of visible light. Unlike Rayleigh scattering, Mie scattering doesn’t strongly favor any one color, which is also why clouds, made of water droplets much larger than light wavelengths, appear white. They scatter all colors roughly equally.
How the Sky Changes With Altitude
The higher you go, the fewer air molecules sit above you to scatter sunlight. At ground level, thick atmosphere scatters blue light abundantly, giving the sky its brightest blue. Climb to cruising altitude on a commercial flight and the sky already looks a deeper, darker blue. Experimental measurements from aircraft and balloon flights up to 30 km confirm that sky brightness decreases with altitude exactly as Rayleigh scattering theory predicts, and more recent data extends that confirmation up to about 110 km.
At the edge of space, around 100 km up, the atmosphere is so thin that almost no scattering occurs. Astronauts on the International Space Station see a black sky with an unfiltered white sun. The blue layer of atmosphere is visible as a thin, glowing band hugging Earth’s curved horizon.
Why Mars Has a Different Sky
Mars provides a useful contrast. Its atmosphere is about 100 times thinner than Earth’s and composed mostly of carbon dioxide rather than nitrogen and oxygen. With so few gas molecules, Rayleigh scattering is minimal. Instead, fine iron-rich dust suspended throughout the Martian atmosphere dominates the scattering. These dust particles are large enough to scatter longer wavelengths efficiently, giving the Martian sky a hazy, butterscotch or pinkish-red tone during the day. Ironically, Martian sunsets can appear bluish, because the dust particles preferentially scatter blue light forward along the line of sight toward the setting sun.
Earth’s blue sky, then, isn’t inevitable. It’s the specific result of having a thick atmosphere made of very small gas molecules, a sun that emits plenty of blue light, and eyes tuned to notice it.

