Snell's Law Calculator: How Light Bends at the Boundary Between Two Media
A heron hunting in the shallows never stabs at where the fish appears to be. It aims lower — and it eats. The bird has no clue it's doing optics, but it is: light leaving the fish bends as it exits the water, so the fish looks shallower and shifted from where it actually sits. This Snell's law calculator turns that bending into hard numbers, solving n₁ sin θ₁ = n₂ sin θ₂ for the refraction angle, the incident angle, or an unknown refractive index. Feed it two media — say air and water — and it tells you exactly how far the ray bends, how much the light slows down, and whether it manages to escape the surface at all.

Light Bends Because It Slows Down, Not Because It Wants To
Refraction isn't light choosing to turn — it's a side effect of speed. Light rips through a vacuum at 299,792,458 m/s, but the instant it enters glass or water it slows down, and the refractive index is nothing more than the ratio n = c/v. Water's index of 1.333 means light crawls through it at 2.25 × 10⁸ m/s, about 75% of its vacuum speed. Diamond, at n = 2.417, throttles light all the way down to 1.24 × 10⁸ m/s.
Picture a marching band walking from pavement onto mud at an angle. The first musicians to hit the mud slow down while their neighbors on pavement keep striding, so the whole line pivots. Light does the same thing at a boundary: one edge of the wavefront slows before the other, and the beam swings toward the normal when it enters a slower (denser) medium and away from it when it speeds back up. That single idea — bending follows speed — is the physical engine behind every number this calculator produces.
Putting Real Numbers Into n₁ sin θ₁ = n₂ sin θ₂
Snell's law says the product of index and the sine of the angle is conserved across a boundary: n₁ sin θ₁ = n₂ sin θ₂, with both angles measured from the normal. Take a sunbeam striking a still pond at 45°. Air is n₁ = 1.0003, water is n₂ = 1.333. Rearranging gives sin θ₂ = (n₁/n₂) sin θ₁ = (1.0003/1.333)(0.7071) = 0.5306, so θ₂ = 32.0°. The beam bent 13° toward the normal, which is why the sunlit floor of a pool sits closer to straight-down than you'd expect.
The formula runs backward just as easily, and that's how labs identify materials. Shine a laser onto an unknown slab at θ₁ = 45° and measure a refracted angle of 25°. Then n₂ = n₁ sin θ₁ / sin θ₂ = (1.0003)(0.7071) / (0.4226) = 1.67 — a dense flint glass. Switch this tool to solve for n₂ and it does that division for you. The same bending is what a lens equation calculator relies on: a lens is just two curved refracting surfaces, and Snell's law fires at each one to steer the light toward a focus.
The Apparent-Depth Trick: Why the Pool Is Deeper Than It Looks
Stand at the edge of a 4-meter-deep pool and the bottom looks like it's only about 3 meters down. That shortfall is pure refraction. For an observer looking nearly straight down, the apparent depth equals the real depth times the ratio of indices, n₂/n₁ — for air over water that's 1.0003/1.333 ≈ 0.75. So a 4 m pool reads as 3 m, a 2 m diving well looks like a wadeable 1.5 m, and every year lifeguards watch swimmers misjudge it.
The same math explains the broken-straw illusion and the heron's aim. Light from a submerged object bends away from the normal as it exits the water, and your brain — which assumes light travels in straight lines — traces the rays back to a spot that's too shallow and off to the side. A spearfisher learns to aim below the visible fish for exactly this reason. Unlike a mirror's reflection, which flips an image but keeps it honest about position, refraction genuinely relocates where things appear to be.
Refractive Index of Everyday Materials (and the Speed of Light Inside)
The refractive index is the one number Snell's law hinges on, and it's worth carrying a feel for the common values. These are measured at the yellow sodium line (589 nm), with light's speed inside each medium worked out as c/n:
| Material | Refractive index (n) | Speed of light inside | Critical angle into air |
|---|---|---|---|
| Vacuum | 1.0000 | 2.998 × 10⁸ m/s (c) | — |
| Air | 1.0003 | ≈ c | — |
| Water (20°C) | 1.333 | 2.25 × 10⁸ m/s | 48.6° |
| Ethanol | 1.361 | 2.20 × 10⁸ m/s | 47.3° |
| Crown glass | 1.52 | 1.97 × 10⁸ m/s | 41.1° |
| Flint glass | 1.62 | 1.85 × 10⁸ m/s | 38.1° |
| Sapphire | 1.77 | 1.69 × 10⁸ m/s | 34.4° |
| Diamond | 2.417 | 1.24 × 10⁸ m/s | 24.4° |
Notice the pattern down the right column: the higher the index, the smaller the critical angle. Diamond's tiny 24.4° is the entire reason a cut diamond blazes — light that gets inside bounces around by total internal reflection instead of leaking out, and a good cut is engineered to exploit exactly that.
When Light Gets Trapped: The Critical Angle
Send light from a denser medium toward a rarer one — glass to air, water to air — and it bends away from the normal. Push the incident angle steeper and steeper, and the refracted ray tilts closer to the surface until, at one special angle, it lies flat along the boundary. Beyond that, it can't refract out at all. That threshold is the critical angle, θc = arcsin(n₂/n₁), and past it you get total internal reflection: every bit of the light bounces back inside.
For a glass-to-air surface, θc = arcsin(1/1.52) = 41.1°, which is why a 45° prism in binoculars reflects light perfectly without any silvering. For water it's 48.6°, creating "Snell's window" — a diver looking up sees the entire sky squeezed into a 97° cone overhead, ringed by mirror-like reflection. And it's the physics of fiber optics: a light pulse fired down a glass fiber hits the walls above the critical angle thousands of times and never escapes, carrying data across oceans. When you enter a dense-to-rare setup above θc here, the calculator flips to a "total internal reflection" result instead of an impossible angle.
Why a Prism Fans White Light Into a Rainbow
Here's a wrinkle the single-number index hides: n depends slightly on wavelength. In crown glass, deep red light (656 nm) sees an index of about 1.5146, while violet (434 nm) sees 1.5228. Feed those into Snell's law at the same incident angle and violet bends a hair more than red — a fraction of a degree at each surface. A prism has two surfaces, so the tiny gap compounds and the colors fan out into a spectrum. This is dispersion, and it's the same effect that paints rainbows when sunlight refracts through raindrops.
Because frequency is fixed at the boundary, the color you perceive never changes — only the speed and the wavelength of the light shrink by the factor n. A 550 nm green photon becomes a 413 nm wave inside crown glass yet still reads as green, because your eye responds to frequency. It's also worth remembering the beam is a stream of individual photons carrying energy E = hf, and that energy rides through the glass untouched — refraction redirects light without stealing from it.
Where Snell's Law Quietly Stops Working
Snell's law assumes a clean, flat boundary between two uniform, transparent media. Bend those assumptions and it starts to mislead:
- Gradual index gradients:a desert mirage isn't a sharp boundary at all. Hot air near the road is less dense than the air above, so light curves continuously and you "see" sky on the asphalt. There's no single θ₂ — you'd have to integrate the bending layer by layer.
- Birefringent crystals:calcite and quartz have two indices at once depending on polarization, so a single ray splits into two. Look through a calcite crystal and text doubles — one Snell's law can't describe both rays.
- Rough or wavelength-scale surfaces:frosted glass and any boundary with features near the light's wavelength scatter and diffract instead of cleanly refracting, so the geometric ray picture breaks down.
- Absorbing or metallic media: the index becomes complex, encoding absorption, and the simple real-number version no longer captures what the light does.
For ordinary transparent solids and liquids with smooth surfaces, though, Snell's law is accurate to well under a percent — reach for heavier tools only when the medium is graded, crystalline, rough, or soaking up the light.
The Angle-From-the-Surface Blunder That Wrecks the Answer
The mistake I see most often has nothing to do with the sine algebra — it's measuring the angle from the wrong reference. Both angles in Snell's law are measured from the normal, the perpendicular to the surface, never from the surface itself. A student eyeballs a ray skimming into water at what looks like 60° off the glass and plugs in 60°, when the angle from the normal is actually 30°. That swap turns sin 30° = 0.5 into sin 60° = 0.866 and hands back a refractive index almost 75% too large — enough to mistake tap water for dense glass.
The fix is a one-second habit: before you write a single number, draw the dashed normal line at the point where the ray meets the surface, and measure everything from it. If your incident and refracted angles ever come out on the sameside of the normal, or if light entering a denser medium bends away instead of toward the normal, you've caught a sign or reference error. For a clean derivation and worked ray diagrams, HyperPhysics keeps a solid refraction and Snell's law reference. Get the normal right and the rest is just one sine on each side.
