Why is the sky blue?
The sky is blue because the tiny bits of gas in the air reflect blue sunlight around much more than red light, so blue reaches our eyes from every part of the sky.

The sky is blue because sunlight is a mix of every color, and the air reflects blue light around far more than red light. That scattered blue comes at us from all over the sky, so the whole sky looks blue. Scientists call this Rayleigh scattering. That is the short answer. The longer answer takes a few more steps, so let's go slowly. Here is how white sunlight hides a rainbow, why the tiny bits of air are so fond of blue, why the sky is not purple instead, why clouds stay white, and why sunsets turn red and pink. We will even take a quick trip to Mars, where the sky plays the whole trick the other way around.
Sunlight hides a rainbow
Sunlight looks plain white, but it is really every color mixed together. NASA's Space Place, a science site for kids, points out that a prism can pull white light apart into all the colors of the rainbow. A prism is just a specially shaped piece of glass or crystal. Rain can do the same thing, which is why you see a rainbow when the sun comes out after a shower. So the colors were in the sunlight all along. They were simply traveling together. When they all reach your eyes at once, your brain reads the mix as white. The sky's blue is what happens when part of that mix gets pulled away from the rest and sent off in a new direction.
Light travels in waves, a bit like ripples on a pond. The distance from the top of one wave to the top of the next is called the wavelength. Each color has its own wavelength. NASA explains that red light moves in long, lazy waves, while blue light moves in short, choppy ones. A physics guide first written by Philip Gibbs for a university physics FAQ gives the numbers. Red light has a wavelength of about 720 nanometers and violet about 380. A nanometer is one billionth of a meter, so these waves are far too small to see. Still, that difference in size between red and blue is the whole secret behind the color of the sky.
Air loves to reflect blue light
The air around you is made of tiny particles called molecules, far too small to see. NASA says Earth's air is about 78 percent nitrogen and 21 percent oxygen, with small amounts of other gases. When sunlight hits these molecules, some of the light gets reflected off in a new direction. That reflecting is called scattering. The Georgia State University physics site HyperPhysics explains that this kind of scattering off air molecules is called Rayleigh scattering, after Lord Rayleigh, a British scientist who studied it in the 1800s. The key point is that it works much better on short waves than on long ones. So the air grabs blue light and sends it flying all over the place, while red light mostly passes straight through.
How much better is blue at getting reflected? Lord Rayleigh worked out a neat rule. Halve the wavelength and the scattering gets sixteen times stronger. That sounds like a lot, and it is. Using this rule, the university physics FAQ works out that blue light is scattered about ten times more than red light. That scattered blue light zigzags across the sky and comes at your eyes from every direction, not just from where the sun is. So when you look up at any patch of clear sky, you are seeing sunlight that has been reflected your way by air. NASA adds that near the horizon the sky fades to a paler blue or white, because that light has been reflected so many times the colors mix again.
The violet puzzle
Here is a clever question. Violet has an even shorter wavelength than blue. So violet should get reflected around even more. Why isn't the sky violet? The university physics FAQ gives a three part answer. First, the sun does not give off the same amount of every color, and it sends us less violet than blue. Second, some of the violet is soaked up high in the atmosphere before it gets down to us. Third, our eyes are simply not very sensitive to violet. The encyclopedia Britannica agrees on that last point, saying our eyes are more sensitive to blue light than to violet light. Put together, there is less violet to start with, and we are not great at noticing it.
There is one more piece, and it is about how our eyes work. The back of your eye has three kinds of color sensors, called cones. People often call them red, green and blue cones, because each one reacts most to light near that color. Your brain works out colors by comparing how strongly each type is buzzing. According to the physics FAQ, sky light sets off the red and green cones by about the same amount, and the blue cones much more strongly. Your brain reads that particular mix as a soft, pale blue. So the sky does have some violet in it. It just blends into the blue we see, like a pinch of salt you cannot taste on its own.
Why clouds stay white
If air turns sunlight blue, why are clouds white? It comes down to size. Clouds are made of tiny drops of water, and HyperPhysics notes that these drops are much bigger than the molecules of the air. That changes the game. Tiny air molecules pick favorites and reflect blue the most. Bigger drops, bigger than the waves of light themselves, reflect all the colors about equally. Scientists call this Mie scattering, after the German physicist Gustav Mie. When every color gets reflected the same amount, the mix that reaches your eyes is still white. So a cloud is basically a floating pile of tiny water drops, all tossing back plain sunlight with no favorites at all.
The same idea explains other white things in the air. HyperPhysics says Mie scattering gives us the white light from mist and fog, and the almost white glare around the sun on a hazy day. The university physics FAQ adds that dust haze looks white for the same reason. HyperPhysics also points out something you can check yourself on a clear day. The blue of the sky is deepest when you look far away from the sun, and it gets paler and whiter as you look closer to it. That is because more of the light near the sun comes from bigger particles, which reflect every color the same. Next time you see a fluffy white cloud against a deep blue sky, you are really looking at two kinds of scattering side by side.
Red and pink skies at sunset
At midday, sunlight comes down from high overhead and takes a fairly short trip through the air. At sunrise and sunset the sun sits low, so its light has to slide sideways through a much thicker slice of air to reach you. NASA's Space Place explains that along that long path, even more of the blue light gets scattered away, which lets the redder light pass straight through to your eyes. Think of it like a long line of people each taking a little blue out of the sunlight as it goes past. By the end of the line, most of the blue is gone. What is left over is the warm, reddish light that paints the clouds at the end of the day.
Some evenings are much redder than others. NASA says small particles of dust, pollution or other bits in the air also scatter blue light, leaving even more red to come through. The physics FAQ agrees that a sunset gets redder when the air holds more small particles. NASA also notes that extra colorful sunrises and sunsets sometimes happen after powerful volcanoes throw tiny dust grains high into the sky. After the sun dips below the horizon, the show often keeps going. In a 2003 study of twilight, scientist Raymond Lee wrote that during many clear twilights much of the sky near the sun turns pastel purple. So if you keep watching after sunset, you may get red, then rose and pink, then a soft purple glow.
The sky on Mars
Other planets have other skies, and Mars is the famous one. According to NASA's Space Place, the air on Mars is thin, mostly carbon dioxide, and full of fine dust. During the day, that dust gives the Martian sky a reddish color. Then comes the twist. At sunset, the sky around the sun turns a cool blue gray, which is the opposite of what happens on Earth. NASA's Curiosity rover photographed one of these blue sunsets in Gale Crater on April 15, 2015. Picture standing on Mars under a dusty red sky all afternoon, then watching the sun slip away inside a soft blue glow. It would feel like the whole sky had been flipped inside out.
Why the swap? It is all about the dust. Mark Lemmon of Texas A&M University, a scientist on the Curiosity team, told NASA that the very fine dust is just the right size to let blue light pass through the air slightly more easily. When blue light reflects off that dust, it tends to stay close to the direction of the sun, so the blue gathers around the setting sun. NASA adds that Martian twilight lasts much longer than ours, with a faint glow for up to two hours before sunrise or after sunset. That is because dust high in the sky scatters sunlight around to the night side of the planet. Same sunlight, different air, completely different sunset.
So the next time someone asks why the sky is blue, you have the answer. Sunlight carries every color. The tiny molecules in the air reflect blue around the most, so blue reaches us from every corner of the sky. Violet gets reflected too, but there is less of it and our eyes barely notice. Clouds stay white because their water drops reflect every color the same, and sunsets go red and pink because the light takes the long way through the air. Here is a little challenge for this week. Pick a clear evening, step outside when the sun starts to set, and watch the colors change from blue to red, then rose, then purple. You will know exactly what the sky is up to.
More articles

The moon is, in fact, an inanimate, dusty old rock
The moon is a layered ball of rock about 4.5 billion years old, wrapped in sharp gray dust and almost no air. Here is what it is made of, where it probably came from and why it barely changes.

How solar storms mess with satellites
The sun has weather, and some of it reaches us. Here is how solar flares and the storms that follow can sink satellites, scramble GPS and even trip power grids, and how people keep watch.

Patterns in sound
Sprinkle salt on a drum, play a steady note, and the grains slide into neat lines and rings. Here is why sound draws pictures, who first noticed, how to try it at home, and what all this has in common with a snowflake.

Most of the sound around you goes unheard
Human ears catch only a middle band of all the sound there is. Here is what we miss, which animals hear it, and why the hums and whines from our own gadgets can still get under our skin.

What is LaserSETI?
LaserSETI is a growing network of rooftop cameras that watch huge patches of the night sky for a single-color flash of light. Here is how it works, where the stations are in 2026, and what it has (and has not) found.

Most of the light around you is invisible
Our eyes catch only a thin band of all the light there is, from violet to red. Here is what we miss, which animals see more of it, and how we use the invisible rest every day.

The science of music
Why a good chorus gives you chills, why the Mozart effect fizzled, and why some songs refuse to leave your head. Here is what the research actually says about music, mood and focus.

Bill Nye is still teaching
A science show from the 1990s is still turning up in classrooms. Here is what Bill Nye the Science Guy was, why so many grownups remember it so fondly, and why teachers keep pressing play.

Why the sun and moon look the same size
The sun is about 400 times wider than the moon and also about 400 times farther away, so the two discs look almost the same size in our sky. That match is a coincidence of timing, and it will not last forever.

Bees fly more like drones than planes
A bumblebee stays in the air the way a drone or helicopter does, by moving its wings fast instead of racing forward over a stiff wing.

The earth is, in fact, actually round
You can check that Earth is round from a beach, a campsite or a phone call to a friend in another time zone. People worked it out more than two thousand years ago, and one of them even measured it with shadows.

What is Hermes?
Hermes is an open source AI agent harness from Nous Research that runs on your own computer, uses tools, remembers past sessions and learns skills. Here is what it does and how to install and set it up.

Meet the Night Sky UI Kit
Three animated React components for dark, night-sky themed sites: a star cursor, a twinkling starfield and a soft aurora glow. Here is what's inside and how to add it.

Behind the Star Cursor
How the Star Cursor draws its comet tail and sparkle dust, and why it quietly steps aside on touch screens and for anyone who prefers reduced motion.

5 trendy UI effects
A star cursor with a comet tail, frosted glass panels, scroll-driven animation, smooth page transitions and gradients that actually move, plus the one tip we would give for each.

How to make cards lift as you scroll on a phone
Phones can't hover, so our blog cards used to sit flat on mobile. Here's the small CSS class and IntersectionObserver we use to lift whichever card is in the middle of the screen as you scroll.

What llms.txt is, and how we added one to our site
A plain-English look at llms.txt, the proposed markdown file that gives AI assistants a short map of your site, what it can and can't promise, and how we wrote and tested our own.

Tell Google who you are with a few lines of code
Small business names collide, and search engines have to guess which one you meant. Organization structured data is one way a site owner can stop them guessing. Here's what it is, what we put in ours, and how to test it.

How to build a thought-bubble tooltip with pure CSS
A step-by-step CSS tutorial for a tooltip that reads its label from a data attribute, pops up in a rounded bubble, trails off in three little circles and stays clickable, with no JavaScript.

Building night sky effects that know when to sit out
How the Night Sky UI Kit's star cursor, starfield and aurora check the visitor's device and settings before they draw a single frame.

How you can set up pull requests to get an automatic first review
Give every pull request an automatic first review the moment it opens, and send each new pull request and its review to a dedicated Slack channel. Here is how the pieces fit.

How visitors book a call on our site
Picking a time with us takes a few clicks and never leaves the page. Here is how the booking calendar on our site works, and the small checks that stop two people grabbing the same hour.

Inside our resumable, review-gated video production pipeline
How we built a local seven-step pipeline that turns a history topic into a captioned video, with resumable state, bounded retries, and a human review gate.