Why WondersBig questions, clear answers.

Why Do Rainbows Form?

Physics Level 2 · Investigator Ages 9–12 Try it at home

Short answer

When sunlight shines into raindrops, it bends as it enters the water. Each color bends by a slightly different amount, so the white light spreads out into a band of colors with red on top and violet underneath.

Diagram: white sunlight enters a large raindrop, bends, bounces inside and leaves split into colors from red to violet
Original diagram by Why Wonders.

A rainbow is sunlight that has been sorted into its colors by millions of raindrops. To see one, you need two things at once: sunshine and drops of water floating in the air. That is why rainbows often show up just after a rain shower, when the Sun breaks through.

White light is secretly many colors

Sunlight looks white, but it is a blend of every color we can see. Each color is light with a different wavelength, meaning a different size of wave. Red has the longest waves we can see, about 700 nanometers from peak to peak. Violet has the shortest, about 380 nanometers. Orange, yellow, green and blue fall in between.

Normally all those colors travel together, so we see plain white. A rainbow happens when something pulls them apart. In a rainbow, the separated colors line up in order of their wavelengths, so the band always runs from red through orange, yellow, green and blue to violet.

Light bends when it changes speed

Light moves at different speeds in different materials. It travels slower in air than in empty space, and even slower in water. When a beam of light crosses from one material into another, the change in speed makes it turn a little. This bending is called refraction.

Each color bends a different amount

Here is the key. Refraction does not bend all colors equally. Shorter wavelengths bend more than longer ones. So when white light enters water or glass, violet and blue turn the most and red turns the least. The colors fan out, each heading in a slightly different direction.

Isaac Newton showed this in 1665 using a prism, a wedge-shaped piece of glass. Sunlight went in white and came out spread into a strip of colors. Each color left at its own angle.

A raindrop is a tiny prism

A raindrop does the same job as Newton’s prism. Sunlight enters the drop and bends. Inside, the light bounces around and then exits, bending again. Because the colors bend by different amounts, they leave the drop spread apart.

One drop sends only a little bit of color toward your eyes. But the sky is full of drops. Drops at slightly different heights send different colors your way. Together, millions of drops build up the full curved band. In the rainbow you see, the longest wavelength, red, sits on the top edge and the shortest, violet, sits on the bottom.

Try it at home

A glass of water can bend sunlight in a similar way, so you can make a small band of colors at home with the experiment below.

The next time rain and sunshine happen together, look around the sky. Somewhere, millions of raindrops may be bending and sorting sunlight into colors just for you.

Try it at home: Make a rainbow with a glass of water

You need:

  • A clear glass full of water
  • A sunny window
  • A sheet of white paper
  1. Set the glass on a windowsill or table where direct sunlight shines through it.
  2. Put the white paper on the floor or table on the shady side of the glass.
  3. Move the paper and tilt the glass slightly until a small band of colors appears.
  4. Notice the order of the colors. Is red on one side and violet on the other?

Grown-up check: Never look straight at the Sun. Wipe up spills so nobody slips.

Fun facts

  • Isaac Newton used a glass prism in 1665 to show that white light splits into colors that each bend by a different amount.
  • Violet light has waves about 380 nanometers long and red light about 700. A nanometer is a billionth of a meter.

Key words

refraction
The bending of light when it passes from one material, like air, into another, like water.
spectrum
The full band of colors that white light can be split into.
prism
A clear block of glass with flat, angled sides that splits light into colors.

See the full glossary

Quick quiz

1. What does light do when it moves from air into water?
Show the answer

Slows down and bends. Light travels slower in water, and the change in speed bends it.

2. Which color is at the top of a rainbow?
Show the answer

Red. Red, the longest wavelength, appears at the top; violet is at the bottom.

3. Which colors bend the most inside a raindrop?
Show the answer

Shorter wavelengths like violet and blue. Shorter wavelengths bend more, which separates the colors.

What did you think?

Tap one. We only count the button, never who pressed it: no names, no accounts, no cookies.

Still have a question? Kids: ask a grown-up to email our editors for you. Found a mistake? Send a correction.

Sources

Pages our editors opened and checked for this answer.

  1. The Appearance of the Sky | Center for Science Education — retrieved November 23, 2026
  2. Wave Behaviors - NASA Science — retrieved November 23, 2026
  3. Visible Light - NASA Science — retrieved November 23, 2026

Related questions

  • Diagram: white sunlight hits an air molecule, blue light bounces off in all directions while red and yellow mostly go straight
    Why Is the Sky Blue?

    Sunlight looks white, so why is the daytime sky blue? Learn how air molecules scatter blue light in every direction, with an easy kitchen test.

    Physics Explorer Ages 6–8 Video Try it

  • Diagram: sunlight at noon takes a short path down through the air, while sunset light crosses a long slanted path to reach a person
    Why Is the Sunset Red?

    Sunsets glow red and orange while the noon sky is blue. Learn how the long path of evening sunlight, dust and smoke create sunset colors.

    Physics Investigator Ages 9–12

  • Diagram: a lightning flash reaches a person almost at once while thunder follows more slowly, about 5 seconds per mile
    Why Do We See Lightning Before We Hear Thunder?

    Lightning flashes first and thunder rumbles later. See why light beats sound, how to count the seconds, and how thunder is made.

    Physics Explorer Ages 6–8 Try it

  • Diagram: in plain iron, arrows for magnetic domains point in random directions; in a magnet, all the arrows line up from S to N
    Why Do Magnets Stick to Some Metals?

    Why does a magnet grab a fridge door but not a soda can? How electrons, magnetic domains and poles make magnets stick, for curious teens.

    Physics Expert Ages 13+ Try it