EN

Snell's Law Calculator (Refraction)

At the boundary between two transparent media, light changes direction: that is refraction. Snell's law quantifies it from the refractive indices: n₁·sin θ₁ = n₂·sin θ₂. Pick the two media and the angle of incidence to get the refracted angle — or compute the critical angle beyond which total internal reflection sets in.

Angles are measured from the normal (the perpendicular to the surface), not from the surface. The index n = c/v compares the speed of light in vacuum to its speed in the medium; it equals 1 in vacuum, ≈ 1.33 in water, ≈ 1.5 in glass.

Media and angle

Mode and unit

Switch mode, then run the calculation again to update the fields.

Refractive indices

Measured from the normal, between 0 and 90°.

Result

  • Angle of refraction θ₂ 22.04 °
Medium 1 (index n₁) 1.0003
Medium 2 (index n₂) 1.3330
Angle of incidence θ₁ 30.00 °
Angle of refraction θ₂ 22.04 °
The ray… bends toward the normal (denser medium)
Deviation |θ₁ − θ₂| 7.96 °

n₁·sin θ₁ = n₂·sin θ₂

Snell's law: why a ray bends

Look down from a jetty at a fish. It is not where it appears. Aim at the image and the spear goes over the real fish: the rays that reached your eye already bent at the waterline. That kink is refraction.

Snell's law (Willebrord Snellius, 1621 — Descartes published it later, Huygens derived it from wavefronts) is the bookkeeping. Two indices, two angles from the normal:

n₁ · sin θ₁ = n₂ · sin θ₂

θ₁ lives in the first medium, θ₂ in the second. Into a denser medium (n₂ > n₁ — air into water) the ray bends toward the normal. Into a rarer one it bends away. Equal indices? No kink at all. In fact the ray always leans toward the side where it travels more slowly. Slow down one edge of a wavefront and the whole path turns.

A straw in a pint glass looks broken for the same reason. Your eye traces the last stretch as a straight line, and that line does not point at the real straw.

Critical angle and total internal reflection

Go dense into rare and θ₂ grows faster than θ₁. Push the incidence far enough and the refracted ray skims the interface (θ₂ = 90°). That shot is the critical angle θc. Past it, Snell's law would ask for sin θ₂ > 1, which no real angle can do. There is no transmitted ray. The light totally internally reflects.

θc = arcsin(n₂ / n₁) (n₁ > n₂)

The formula is empty unless n₁ > n₂. Air into water never total-reflects, however flat the shot: a transmitted ray always exists. Water into air does, once θ₁ exceeds about 48.6°. Anyway, this page stops at the threshold. Fibre launch cones, numerical aperture, the rest of the trap — that is the dedicated critical angle and total internal reflection page.

  • Optical fibre — high-index core, slightly lower-index cladding. Rays that stay above θc bounce down the core for kilometres. Broadband is this, repeated.
  • Diamond fire — n ≈ 2.42, so θc is only about 24°. Most rays that get in rattle around the pavilion before they find a face steep enough to escape.
  • Mirages — hot tarmac makes a layer of rarer air near the ground. Sky rays graze it, internally reflect, and you “see” a puddle. Same law, no water required.

What the refractive index actually is

The index is a speed ratio: n = c / v, vacuum speed over speed in the medium. No unit. Vacuum is exactly 1. Air is 1.0003. Water 1.333, crown glass 1.520, sapphire 1.77, diamond 2.42. Bigger n, slower light, sharper kink on the way in.

n = c / v · nvacuum = 1 · nwater ≈ 1.333 · nglass ≈ 1.52

Well, n is not a constant of nature. It drifts a little with wavelength and with temperature. The presets here are for the sodium D-line, about 589 nm, at room temperature — the number in most tables. For a yellow lab ray, that is the right tool. For a white beam through a thick prism, it is only the middle of the story.

Angles are taken from the normal

The normal is the perpendicular to the surface, not the surface itself. θ₁ = 0° means the ray hits head-on: it does not deviate, even if the indices jump. θ₁ = 90° grazes the interface. The calculator only accepts 0 to 90°, because beyond that you are no longer incident on this face — you are already on the other side of the geometry.

The classic lab slip is to count from the surface. You type “30°” when you meant 60° from the normal, and Snell's law looks as if it has gone mad. It has not. Check the protractor before you blame the sine.

Deviation, prisms and a split spectrum

What you notice by eye is not θ₂ on its own. It is how far the ray has been knocked off its original line. That deviation is |θ₁ − θ₂|.

Air into water at 30° incidence gives θ₂ around 22°, so roughly 8° of bend. A bigger index step means a bigger kick — diamond against air is a chicane, not a nudge. A prism is two of those refractions in a row, one in, one out. The net turn of a single-colour beam is fixed by the prism angle and the two n values. In fact white light is not one colour, so each wavelength takes a slightly different n and a slightly different path. That is a spectrum on the bench, and a rainbow after rain. Same law, twice, with a spread in n.

Which medium is 1, which is 2

Medium 1 is where the light comes from. Medium 2 is where it goes. Swap them and you reverse the kink. You also wipe out the critical angle if n₁ drops below n₂. The calculator does not guess the path. You tell it.

For a fibre, the core is 1 (high n) and the cladding is 2. That is the only direction in which TIR can trap the ray. For the straw in the glass you are looking from air, so n₁ ≈ 1 and n₂ ≈ 1.33. A thin lens is the same jump, twice, on two curved faces; the power in dioptres is how hard those two surfaces, taken together, bend the bundle.

Grazing incidence

Set θ₁ = 90° and the ray is sliding along the surface. sin θ₁ = 1, so Snell's law collapses to sin θ₂ = n₁ / n₂ — provided that ratio is less than 1. Otherwise there is nothing to compute: no transmitted ray.

Air into water still transmits at grazing incidence. θ₂ lands near 49° from the normal. Air into crown glass, about 41°. That is why a pond still lights up from a sun sitting on the horizon, and why a shop window is not a black wall when you look along the pavement. Well, water into air at 90° is already far past critical (~48.6°). From underwater, the surface at those angles is a mirror, not a window.

Between head-on and grazing, θ₂ just grows with θ₁ until it hits that ceiling. The calculator reports it without fuss.

Why we still write n_air ≈ 1

Textbooks print nair = 1. The preset here is 1.0003. Three parts in ten thousand. Air into water at 30°, the two choices of n₁ shift θ₂ by about a hundredth of a degree. Your protractor will not see it. So for school work against water, glass or diamond, writing 1 is not sloppy. It is the right number of significant figures.

The approximation dies when air is the “dense” side of the problem. Astronomical refraction: the Sun is still on the horizon after it has geometrically set, by roughly half a degree. A survey line a kilometre long. Interferometry. Then 1.0003 is the start of the story, and it still moves with pressure, temperature and humidity (the Edlén formula, not this page).

Use 1.0003 to match the preset. Use 1 to match a textbook exercise. Both are honest, if you know which one you typed.

n depends slightly on wavelength (dispersion). That is why a prism or a raindrop fans white light into colours. The preset indices here are for yellow light (≈ 589 nm) at ordinary temperature. Near an absorption band, or in a hot glass melt, they will not hold.

Related calculators