Physics & Everyday Science

How Do Rainbows Form?

A rainbow is sunlight split into colours inside falling raindrops. Here is how each drop bends and reflects light, and why the bow always sits opposite the sun.

By William, real-life teacher 8 min read

Illustration of a bright rainbow arching across a sky after rain, above green fields in soft low sunlight.
A rainbow appears opposite the sun, in the rain falling in front of you. Conceptual illustration.

After a shower, the clouds start to break and the sun comes out behind you. Then, if you look the right way, a curved band of colour hangs in the sky opposite the sun. Where does all that colour come from? The rain is not painting the sky. Each raindrop is quietly splitting sunlight into its colours.

The short answer: Sunlight enters a raindrop and bends. It reflects off the back of the drop, then bends again as it leaves. The light that leaves at about 42 degrees from the direction back toward the sun reaches your eyes, and the colours are spread out along that angle. Red is on the outside of the bow and violet is on the inside.[1][2]

Light bends when it changes speed

Light travels at different speeds in different materials. Scientists call the bending that happens at the boundary between two materials refraction. HyperPhysics describes it as “the bending of a wave when it enters a medium where its speed is different.”[3] A medium is simply the material light is travelling through, such as air, water or glass.

Water slows light down compared with air. The index of refraction is a number that compares how fast light travels in a material with its speed in a vacuum. The listed value for water is 1.33.[4]

The direction of the bend follows a simple pattern. When light slows down, its path moves closer to the perpendicular, which is the imaginary line standing straight out from the surface.[5] Keep that rule in mind, because it decides where the light ends up.

Inside the raindrop

A raindrop is a tiny sphere of water. When sunlight hits it, the light is refracted at the surface, travels across the inside of the drop, and is refracted again on the way out. The light that bounces off the back of the drop is called internally reflected, because it reflects from the inside surface.[2]

Diagram: a sunbeam enters a round raindrop, reflects once off the inside back, and leaves bent, with the 42 degree angle marked.
Diagram, not to scale: light bends on entry, reflects once inside and bends again on exit. Angle calculated with Snell’s law (n = 1.333).

The diagram shows one ray of sunlight. It bends when it enters, reflects off the inside back surface, and bends again when it leaves. The drop does not make new colour. It separates the colours that were already in the sunlight.[1]

The 42-degree edge

The University of Texas at Austin describes a rainbow as “an arc of light, with an angular radius of 42°, centred opposite the Sun.”[2] Stand with the sun behind you and the centre of the bow is the point directly opposite the sun, which is why rainbows never appear in the part of the sky where the sun is.

The 42° figure is a limit, not a sharp line for every drop. The same source notes that reflected light “cannot deviate by more than” 42° from the reverse direction.[2] Many rays leave at smaller angles, so the outer edge of the bow looks bright and sharp, while the inner side fades into the sky.

Why the colours sit in bands

Sunlight contains many colours mixed together. The University of Texas notes that “violet is concentrated on the inside of the rainbow, and red is concentrated on the outside.”[2] So if you could see the bow close up, the red would be on the top edge of the arc and the violet closer to the centre.

Each colour has its own wavelength, and water slows each colour by a slightly different amount, so each colour bends by a slightly different amount. MetLink explains that “The blue light is a shorter wavelength and so is refracted at a bigger angle than the longer wavelength red light”.[1] HyperPhysics calls this spreading out dispersion. It notes that “Generally the index decreases as wavelength increases”, so “Blue light travels more slowly than red light in transparent media.”[6]

Diagram: a rainbow arc of coloured bands, red on the outer edge and violet on the inner edge, centred on the point opposite the sun.
Diagram, not to scale across colours: red is on the outside of the primary bow and violet on the inside (UT Austin).

Why you see a rainbow and not the drops

A rainbow is not a solid object that you can walk to. Many drops are falling in front of you, and each one sends light in every direction. Your eyes only receive the light from drops lying along the 42° line from the point opposite the sun, so the bow you see belongs to your own position.

So the rainbow moves when you move. If you walk towards it, the bow moves with you, because the angle to the opposite-sun point stays the same.

Did you know? Light from a rainbow is not produced by reflecting off the surface of the rain. Refraction and internal reflection inside each drop create the bands, and the drops only need to be in the right place for their light to reach you.[2]

Try it: a mist rainbow in the garden

This is a proposed at-home activity. It is not something that was done for this article.

You need: a garden hose with a fine spray setting, a sunny day, and an adult to help with the hose.

  1. Stand with the sun behind you and face the shady side of the garden.
  2. Spray a fine mist into the air in front of you, a few metres away from you.
  3. Move the mist slowly until you see a band of colour. Predict where the colour will appear before you look.
  4. Notice that the colour is opposite the sun, not directly in front of the spray.

What to expect: a faint arc of colour in the mist, sitting at the angle described above. The bow is easier to see when the mist is thick and the sun is low in the sky.

Safety first: Never look straight at the sun, even on a cloudy day. Keep the spray pointed away from power points, cables and light fittings, and do not spray near electrical outlets. Check that the ground is not slippery before you move. An adult should handle the hose and tap.

Go deeper: the Snell’s law arithmetic

Working out the bend

The law that controls refraction is Snell’s law: n₁ sin θ₁ = n₂ sin θ₂. Here n is the index of refraction and θ is the angle measured from the perpendicular to the surface.[5] Air is almost exactly 1.00, and water is 1.333 in the value used for this calculation.[4]

Take a ray of sunlight that meets a drop at an angle of about 59.4° from the perpendicular. Entering the water:

  • sin θ₂ = (1.00 × sin 59.4°) ÷ 1.333
  • sin 59.4° = 0.8607, so sin θ₂ = 0.8607 ÷ 1.333 = 0.6457
  • θ₂ = arcsin(0.6457) ≈ 40.2°

The light bends from 59.4° to about 40.2°, which is closer to the perpendicular, as the rule predicts.

Why the angle comes out at 42°

A ray goes in, reflects once, and comes out. The total turn of the ray is 180° + 2i − 4r, where i is the entry angle and r is the angle inside the drop. With i = 59.4° and r = 40.2°, the total turn is 180° + 118.8° − 160.8° = 138.0°. The exit ray therefore lies 180° − 138.0° = 42.0° away from the direction back toward the sun.

Many rays turn by slightly different amounts, so the bow has a bright edge at 42° and gets fainter inside it. The calculation is a check on the 42° figure, not a replacement for the measured bow.

Frequently asked questions

Do rainbows form from reflection off the rain?

No. Each drop bends sunlight when it enters, reflects it from the inside surface, and bends it again on exit. The reflection happens inside the drop.[2]

Why is the rainbow always opposite the sun?

The 42° path goes from each drop to your eyes at a fixed angle from the point opposite the sun. The bow is centred on that point, so it cannot appear in the sun’s direction.[2]

Why is red on the outside?

The University of Texas states that red is concentrated on the outside of the rainbow and violet on the inside.[2]

Can you walk to the end of a rainbow?

No. The bow depends on where you stand, so it moves as you move. There is no fixed object at its end.

How does water bend light?

Water slows light down, so refraction bends it towards the perpendicular when it enters. The index of refraction for water is about 1.33.[5][4]

Is the rainbow in the sky, or in my eyes?

The light is in the sky, coming from the drops. What you see depends on your position, and that is why two people standing side by side can see different bows.

The big idea

Each drop is a tiny prism. Sunlight bends on the way in, reflects off the back of the drop and bends again on the way out. The light leaves at about 42° from the direction back toward the sun, so the colours form a bow opposite the sun.

More from William Wonderlab:

Explore more from scientists:

References

[1] Royal Meteorological Society, MetLink, “Rainbows” (accessed 25 October 2026)

[2] University of Texas at Austin, Physics, “Rainbows” (lecture notes) (accessed 25 October 2026)

[3] HyperPhysics, Georgia State University, “Refraction” (accessed 25 October 2026)

[4] HyperPhysics, Georgia State University, “Indices of Refraction” (accessed 25 October 2026)

[5] OpenStax via Physics LibreTexts, “25.3: The Law of Refraction” (accessed 25 October 2026)

[6] HyperPhysics, Georgia State University, “Dispersion” (accessed 25 October 2026)

Keep exploring

Now try the science yourself

Reading is a great start. Experimenting is even better: these interactive models use the same science as this article.