Optics · 13 July 2026
Snell's Law Calculator: Refraction and Total Internal Reflection
Drop a straw into a glass of water and it appears to snap at the surface — the submerged half looks bent at an impossible angle. The straw is fine; it is the light that bends. Every ray crossing the boundary between water and air changes direction, and it does so by an amount you can predict with one short equation written down by Willebrord Snellius in 1621.
This page is a Snell's law calculator and interactive refraction simulator. Drag the angle of incidence, pick real materials from air to diamond, and watch the refracted ray respond in real time. Push the angle far enough going from glass to air and you will trigger total internal reflection — the effect that makes optical fibres and sparkling diamonds possible, and a close cousin of the physics behind how a mirage forms.
What Is Snell's Law? (n₁ sin θ₁ = n₂ sin θ₂)
Snell's law relates the angles a light ray makes on either side of a boundary between two transparent materials:
- is the angle of incidence — measured from the normal (the line perpendicular to the surface), never from the surface itself. This is the most common exam mistake.
- is the angle of refraction, also measured from the normal.
- and are the refractive indices of the two materials — a measure of how much each material slows light down: , where is the speed of light in vacuum and its speed in the material.
The rule of thumb follows directly from the equation: entering a denser medium (higher ), light bends toward the normal; entering a rarer medium (lower ), it bends away from the normal.
Why Does Light Bend When It Enters Water or Glass?
Picture a marching band walking off smooth pavement into deep mud at an angle. The marchers who hit the mud first slow down while their row-mates on pavement keep full speed — so the whole line pivots. Nobody decides to turn; the turn is forced by the speed change hitting one side of the line before the other.
Light does the same. A wavefront crossing into glass at an angle slows on the side that enters first, and the front pivots toward the normal. The refractive index simply encodes how big the speed change is: light travels at km/s in water and at km/s in diamond. The bigger the mismatch between the two media, the sharper the bend — exactly what the simulator below lets you test.
Interactive Snell's Law Simulator
Pick a material for each side of the boundary (or dial in any refractive index with the sliders), then drag the angle of incidence. The top panel draws the incident, reflected, and refracted rays live; the bottom panel plots the refraction angle against the incidence angle, with the critical angle marked in red when one exists. Press ⇄ Swap media to send light from glass into air — then push θ₁ past the red line and watch the refracted ray vanish.
What Is Total Internal Reflection?
When light travels from a denser medium into a rarer one (glass → air, water → air), it bends away from the normal — so the refracted ray always makes a bigger angle than the incident ray. Keep increasing the angle of incidence and at some point the refracted ray would need to exceed 90°, which is impossible. Beyond that point the boundary behaves like a perfect mirror: 100% of the light reflects back. This is total internal reflection (TIR).
TIR is not a curiosity — it is load-bearing technology:
- Optical fibres trap light by TIR, bouncing it millions of times down a hair-thin glass core with almost no loss. Every video you stream crosses oceans this way.
- Diamonds sparkle because their huge refractive index (2.417) gives a tiny critical angle of 24.4° — almost any ray entering the stone gets trapped and bounced repeatedly before blazing back out of the crown.
- Binocular prisms fold the optical path with TIR instead of mirrors, losing no brightness.
- Looking up from underwater, the sky is visible only inside Snell's window, a cone extending 48.6° from directly overhead in all directions (full angular width ~97°), with the water surface beyond it a perfect mirror.
How Do You Calculate the Critical Angle?
The critical angle is the incidence angle at which the refracted ray grazes along the surface (). Setting in Snell's law:
It only exists when — you cannot get TIR going from air into glass, only from glass into air.
| Boundary | Critical angle |
|---|---|
| Water → air | 48.6° |
| Crown glass → air | 41.1° |
| Sapphire → air | 34.4° |
| Diamond → air | 24.4° |
The Math Behind Snell's Law: Fermat's Principle
Snell's law is not an arbitrary rule — it follows from a beautiful idea. Fermat's principle says light travels between two points along the path that takes the least time. Crossing a boundary where speed changes, the fastest route is not a straight line: light should spend more of its journey in the fast medium and less in the slow one, exactly like a lifeguard who runs along the beach before diving in to reach a swimmer.
Minimising the total travel time between a point in medium 1 and a point in medium 2 (take the derivative of the travel time with respect to the crossing point and set it to zero) yields:
Multiplying both sides by and using gives Snell's law. The same wavefront geometry underlies lenses — Snell's law applied at two curved surfaces is precisely what our lens formula visualiser builds on, and wave behaviour at boundaries connects directly to interference and diffraction.
Refractive Index of Common Materials
| Material | Refractive index | Speed of light |
|---|---|---|
| Vacuum | 1 (exactly) | 299,792 km/s |
| Air | 1.0003 | 299,700 km/s |
| Ice | 1.31 | 228,800 km/s |
| Water | 1.333 | 224,900 km/s |
| Fused quartz | 1.46 | 205,300 km/s |
| Crown glass | 1.52 | 197,200 km/s |
| Sapphire | 1.77 | 169,400 km/s |
| Diamond | 2.417 | 124,000 km/s |
Worked Examples for Physics Exams
Example 1: Air into glass
A ray hits a crown glass block () at 45° from the normal. Find the refraction angle.
, so . The ray bends toward the normal, as expected entering a denser medium. Check it in the simulator: air → crown glass, θ₁ = 45°.
Example 2: Critical angle of water
Find the critical angle for light travelling from water () into air.
. Any ray from below hitting the surface at more than 48.6° never leaves the water — this is why the world above appears squeezed into "Snell's window" for a diver looking up.
Example 3: Why diamond outsparkles glass
Compare the critical angles of diamond () and crown glass ().
Diamond: . Glass: . A ray inside a diamond escapes only if it hits a facet within 24.4° of the normal — a far smaller escape cone than glass. Gem cutters angle the facets so light entering the crown undergoes TIR repeatedly before exiting upward in a concentrated flash. A glass replica cut identically leaks light out of the back and looks dull.
Frequently Asked Questions
Explore more simulations
Every concept on PhysicStuff has an interactive simulation. No login, no setup required.