Rainbows form when sunlight enters a raindrop, bends (refracts), bounces off the back of the drop, and bends again on the way out, splitting white light into its separate colors. Every rainbow you see sits at a fixed angle of about 42 degrees from the antisolar point, which is just the shadow of your own head. That fixed geometry is the reason a rainbow always looks the same arc shape no matter where you stand.
What happens inside a single raindrop
Sunlight is a blend of every color, all traveling together as plain white light. When a ray strikes a raindrop, it slows down and bends as it crosses from air into water.
Inside the drop, the light reflects off the curved back surface, then refracts a second time as it exits. That double bending is doing the real work of the rainbow.
Because each color bends by a slightly different amount, they fan out into the familiar band that runs from red on the outside to violet on the inside. A rainbow is just that fan, repeated across millions of drops at once.
The 42-degree rule
Red light leaves the drop at roughly 42 degrees measured from the antisolar point, with violet bending a little tighter at around 40 degrees. Stack that angle across countless raindrops and the result is a full curved arc.
This geometry is also why you can never reach the end of a rainbow. It is not an object sitting in a field somewhere; it is an angle measured from your own eyes.
So as you walk toward it, the rainbow simply shifts to keep that same 42-degree gap. Two people standing side by side are technically looking at two slightly different rainbows, each centered on their own shadow.
It also explains why a rainbow has no real width or location. There is no pot of gold at the end because there is no end; the arc is a direction, not a destination.
Double rainbows and reversed colors
Sometimes light reflects twice inside a drop instead of just once. That extra bounce produces a second, fainter arc sitting higher in the sky at about 51 degrees.
The double reflection also flips the color order, so the outer bow runs violet to red rather than red to violet. If you ever spot both arcs, look between them: that darker strip of sky has a name, Alexander's band.
You can chase a rainbow forever and never gain an inch, because it lives in your line of sight, not in the sky.
How to actually see one
You need two things lined up at the same time: the sun behind you and rain falling in front of you. Late afternoon showers right after a storm are prime rainbow weather.
Because the whole arc centers on your shadow, the height of the sun controls the height of the bow. A low sun lifts the rainbow high; a high sun pushes it down.
In fact, once the sun climbs above 42 degrees, the entire rainbow drops below the horizon and vanishes. That is why midday rainbows are rare and the best ones show up near sunrise or sunset.
Cousins of the rainbow
Rain is not the only thing that splits sunlight. The same bending of light through water droplets shows up in mist, waterfalls, and even the spray from a garden hose, which is the easiest rainbow to make on demand.
Fog produces a pale, almost colorless arc called a fogbow, because its tiny droplets blur the colors together. Sea spray and dew on grass can each throw their own faint versions.
Moonlight can even do it. A moonbow is a real, very dim rainbow produced by a bright full moon, and it follows the exact same 42-degree geometry as the daytime kind.
Try It Yourself
Want to mess around with the ideas above? On whatifs.fun, Weather Maker, Optical Illusion Test and Color Perception all let you do exactly that — free, in your browser, no download.
Keep reading: why the sky is blue and how many colors humans can actually see. Both go deeper on the same rabbit hole.
🎮 Try it yourself: Weather Maker
Make rain, sun, and storms and watch the conditions change.
Play free at whatifs.fun