Snell's law describes how light bends when it crosses the boundary between two transparent media — why a pencil looks broken in a glass of water, why a swimming pool looks shallower than it is, and why fiber-optic cables can carry light for miles without it escaping. This calculator applies n1sinθ1 = n2sinθ2 to solve for the refraction angle, the critical angle, or an unknown index of refraction.

Why light bends at a boundary

Light travels at different speeds in different media — fastest in a vacuum, slower in anything with mass to interact with, like glass or water. The index of refraction n = c/v captures how much slower light travels in a given medium compared to a vacuum (c). When a ray crosses at an angle into a medium with a different index, one edge of the wavefront slows down (or speeds up) before the other, which bends the direction of travel. Snell's law, n1sinθ1 = n2sinθ2, is the geometric consequence of that speed change and holds for any pair of transparent media.

The critical angle and total internal reflection

Total internal reflection only happens going from a denser medium into a less-dense one (n1 > n2), because the refraction angle grows faster than the incidence angle in that direction. At the critical angle θc = asin(n2/n1), the refracted ray would graze the surface at exactly 90°. Push the incidence angle past that, and Snell's law has no valid solution — sin(θ2) would need to exceed 1 — so all the light reflects back into the denser medium instead. This is the physical principle behind fiber-optic cables (light bounces down a glass core via repeated TIR) and why a diamond's high index of refraction (2.42) gives it such a small critical angle and dramatic sparkle.

Limits and edge cases

This calculator assumes an ideal, non-absorbing, non-dispersive medium — it does not account for chromatic dispersion (different wavelengths of light bending by slightly different amounts, which is why a prism splits white light into a rainbow), nor for the Fresnel equations that determine how much light reflects versus refracts at the boundary. Indices of refraction also vary slightly with wavelength and temperature; the presets use standard visible-light approximations. Always measure angles from the normal, not from the surface — a common source of off-by-90° errors.