Physics: Mechanics, Waves & Thermodynamics Waves, Sound & Optics Snell's law of refraction (Snell–Descartes)

Snell's Law Refraction Calculator

Enter the refractive indices either side of an interface and the angle a ray strikes it, and this calculator returns the refracted angle from n₁ sin θ₁ = n₂ sin θ₂. It also reports the critical angle for total internal reflection, the Brewster angle at which reflected light is fully polarised, the speed of light in each medium, and how far the ray bends. Angles are measured from the normal — the line perpendicular to the surface — not from the surface itself.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Refractive index of the incident medium n₁The medium the ray starts in — 1.000293 for air, 1.333 for water, 1.5168 for BK7 crown glass.1.000293
Refractive index of the second medium n₂The medium the ray enters; look it up at the wavelength you care about, as index varies with colour.1.333
Angle of incidence θ₁Measured from the normal to the surface, so 0° means the ray hits the surface square on.30 °

It returns

  • Angle of refraction θ₂ — Measured from the normal in the second medium.
  • Ray deviation at the interface
  • Critical angle (dense side → rare side)
  • Brewster angle (incidence in medium 1)
  • Speed of light in medium 1
  • Speed of light in medium 2

The formula

n1sinθ1=n2sinθ2
θc=arcsin(n2n1)
θB=arctan(n2n1)

In plain text: n₁ · sin θ₁ = n₂ · sin θ₂

  • n₁Refractive index of the medium the ray starts in (dimensionless)
  • n₂Refractive index of the medium the ray enters (dimensionless)
  • θ₁Angle of incidence, measured from the normal (°)
  • θ₂Angle of refraction, measured from the normal (°)
  • cSpeed of light in vacuum, exactly 299,792,458 m/s (m/s)

Angles are taken from the normal to the surface. The refractive index is defined as n = c/v, the ratio of the vacuum speed of light to its phase speed in the medium.

Updated Category Waves, Sound & Optics Verified against published test cases Reading time 11 min

Why light bends at a boundary

Light changes direction at an interface because it changes speed. The refractive index n of a material is defined as n = c/v, the vacuum speed of light divided by its phase speed in that material, so water at n = 1.333 slows light to 2.249 × 108 m/s and diamond at n = 2.417 slows it to 1.240 × 108 m/s. Nothing exceeds c; the wave simply propagates more slowly through matter because the oscillating charges in the medium re-radiate with a phase lag.

The direction change follows from the wavefront staying continuous across the boundary. If one edge of a wavefront enters the slow medium before the other, that edge advances less in the same time, and the whole front pivots — the same reason a marching band wheels when the left file enters mud first. Working the geometry through gives n₁ sinθ₁ = n₂ sinθ₂.

Fermat's principle gives the same result from a completely different direction: of all possible paths between two points, light takes the one with stationary optical path length. Minimise the travel time across the boundary and Snell's law falls out as the condition. That equivalence — a local wave condition and a global extremum condition producing the same law — is one of the more elegant results in classical optics, and it is why Snell's law also describes seismic waves and sonar refracting through layered media.

The law is named for Willebrord Snellius, who found it in 1621, though Ibn Sahl described the same relationship in Baghdad in 984 and Descartes published it independently in 1637. In French-language work it is still la loi de Descartes.

The three consequences you can read straight off the formula

Direction of bend. Rearranged, sinθ₂ = (n₁/n₂) sinθ₁. When n2 > n1 — going into the denser medium — the ratio is less than one, so θ2 < θ1 and the ray bends towards the normal. Going the other way it bends away. This is why a straw in a glass looks broken at the surface and why a pool always looks shallower than it is.

Total internal reflection. Going from dense to rare, sinθ₂ can exceed 1, which no real angle satisfies. The largest incidence angle that still produces a refracted ray is the critical angle θ_c = arcsin(n₂/n₁). Above it, every photon reflects back, with no transmission loss at all — the only perfectly efficient mirror in optics. Optical fibres, prismatic binoculars and the sparkle of a brilliant-cut diamond all depend on it, and diamond's very small critical angle of 24.4° is precisely why so much light entering a diamond bounces around inside before leaving through the crown.

Brewster's angle. At θ_B = arctan(n₂/n₁) the reflected and refracted rays are exactly 90° apart, and the reflected light is completely polarised perpendicular to the plane of incidence. That is roughly 53° for air-to-water and 56° for air-to-glass, which is why polarised sunglasses cut glare off a lake or a windscreen so effectively. Brewster's angle always exists in both directions, unlike the critical angle.

One thing Snell's law does not tell you is how much light is transmitted versus reflected. That requires the Fresnel equations, which take the same angles as input and return reflectance for each polarisation. At normal incidence into glass roughly 4% reflects at each surface, which is why lens coatings exist.

Worked example: a ray entering a swimming pool

Sunlight strikes the flat surface of a pool at 55° from the normal. Take air as n1 = 1.000 and water as n2 = 1.333.

  1. Take the sine of the incidence angle. sin 55° = 0.819152.
  2. Apply Snell's law. sinθ2 = (1.000 ÷ 1.333) × 0.819152 = 0.750188 × 0.819152 = 0.614518.
  3. Take the inverse sine. θ2 = arcsin(0.614518) = 37.92°.
  4. Find the bend. The ray turns by 55.00 − 37.92 = 17.08° towards the normal.
  5. Check the speed. Inside the water the light travels at c/1.333 = 2.249 × 108 m/s, and its wavelength shortens by the same factor — 589 nm sodium light becomes 442 nm in water. Its frequency does not change, because the boundary oscillates at the driving frequency.

Now reverse the ray. A fish looking up sees the entire 180° hemisphere above the water compressed into a cone of half-angle equal to the critical angle, arcsin(1/1.333) = 48.61°. Outside that cone — Snell's window — the surface acts as a mirror showing the pool floor. Divers see exactly this, and its angular radius is a direct measurement of the refractive index of the water they are in.

Judging your answer and choosing the right index

Three quick checks catch nearly every error. First, if n2 > n1, the refracted angle must be smaller than the incident angle; if it is larger, you have the media the wrong way round. Second, the refracted angle can never exceed the critical angle in the dense-to-rare direction and never exceeds arcsin(n₁/n₂) in the rare-to-dense direction — at grazing incidence into water the refracted ray still only reaches 48.6°. Third, at 0° the answer must be 0°, whatever the indices.

Choosing the index deserves more care than most people give it. Refractive index depends on wavelength, a phenomenon called dispersion, and published values are usually quoted at the sodium D line, 589.3 nm. For BK7 crown glass the index runs from 1.5224 at 486.1 nm (blue) to 1.5143 at 656.3 nm (red) — a spread of 0.0081 that seems small but is exactly what splits white light into a spectrum through a prism and what causes chromatic aberration in a lens. If your application is broadband, one index is not enough; you need the Abbe number or a full Sellmeier fit.

Index also depends on temperature, pressure and, for solutions, concentration. That last dependence is the basis of the refractometer: measuring the critical angle of a sugar solution gives its Brix value directly, and the same instrument reads salinity, urine specific gravity and engine coolant strength. If you are reading an index off an instrument, check what wavelength and temperature it is calibrated for.

Refractive index, light speed and critical angle to air

Indices at the sodium D line (589 nm) near room temperature. Critical angle is for a ray leaving that material into air; speed is c ÷ n.
MaterialnSpeed of light (m/s)Critical angle to air
Vacuum1.00002.998 × 10⁸
Air (0 °C, 101.325 kPa)1.0002932.998 × 10⁸88.6°
Water (20 °C)1.3332.249 × 10⁸48.61°
Ethanol1.3612.203 × 10⁸47.29°
Fused silica1.4582.056 × 10⁸43.31°
BK7 crown glass1.51681.976 × 10⁸41.25°
Polycarbonate1.5851.891 × 10⁸39.12°
Dense flint glass (SF10)1.7281.735 × 10⁸35.36°
Sapphire1.7701.694 × 10⁸34.40°
Cubic zirconia2.1601.388 × 10⁸27.58°
Diamond2.4171.240 × 10⁸24.44°

Critical angles are arcsin(1/n) evaluated for each row; speeds are 299,792,458 ÷ n. Index values vary slightly between sources and with wavelength, temperature and glass melt.

Mistakes that produce a wrong refraction angle

  • Measuring the angle from the surface instead of the normal. The two differ by 90°, and using the wrong one turns sines into cosines. A ray at 20° from the surface is at 70° from the normal.
  • Swapping n₁ and n₂. The formula is not symmetric in its effect. Take the same glass at n = 1.500 both times: air-to-glass at 30° gives sinθ2 = 0.5/1.5 = 0.3333 and so 19.47°, while glass-to-air at 30° gives sinθ2 = 1.5 × 0.5 = 0.75 and so 48.59°. Always identify which medium the ray starts in.
  • Expecting a refracted ray past the critical angle. Above θc there is no solution because the sine would exceed 1. That is a physical result, not a calculation failure.
  • Using one index for white light. Dispersion means blue and red bend differently. For prism, rainbow or lens-design work you need the index at each wavelength.
  • Assuming the frequency changes. Wavelength and speed both drop by a factor of n; frequency is fixed by the source and is continuous across the boundary.
  • Forgetting the second surface. Light through a parallel-sided window refracts twice and emerges parallel to its original direction, merely displaced sideways. Only the net effect matters for a windowpane.
  • Treating total internal reflection as lossless in a real fibre. The reflection itself is perfect, but the evanescent field extends into the cladding, so bends, contamination and absorption all cost signal.

Where Snell's law shows up beyond a glass block

Optical fibre is the largest commercial application. A step-index fibre has a core index a fraction of a percent above the cladding, so rays inside a narrow cone stay trapped by total internal reflection over kilometres. The acceptance cone is described by the numerical aperture, NA = √(n_core² − n_clad²), which is Snell's law applied at the input face.

Atmospheric refraction is the same law applied to a continuously varying index. Air density falls with altitude, so index falls too, and light from a low sun curves gently — enough that the Sun is visibly above the horizon when it is geometrically already below it, by roughly its own diameter at sunset. Mirages, the flattened setting Sun and the green flash are all refraction in an index gradient.

Seismology uses the identical relation with sound speeds in place of light speeds: sinθ₁/v₁ = sinθ₂/v₂. Refraction of P-waves at the core–mantle boundary produced the shadow zone that revealed the Earth has a liquid outer core, and marine sonar refracts through thermoclines by exactly the same arithmetic — a problem closely tied to the relationship between wave speed, frequency and wavelength and to the Doppler shift that gives a moving target away.

Once a ray has been refracted into a lens, the next question is where it forms an image, which is the job of the thin lens equation; the lensmaker's equation connects the two by deriving focal length from the same refractive index and the surface curvatures. Underwater, the index of the water is what makes a diving mask necessary, and the pressure a diver reads at depth follows from a separate hydrostatic calculation that shares nothing with optics except the medium.

The critical angle shown always describes the dense-to-rare direction

Total internal reflection only happens when light tries to leave the denser medium. This calculator therefore reports arcsin(n_low / n_high) whichever way round you enter the indices, and the warning beneath the results tells you which direction it applies to. If you entered air first and glass second, the critical angle shown is for a ray going the other way, from the glass back into air.

Frequently asked questions

What is the critical angle for water?

48.61° for water to air, from arcsin(1/1.333). A ray inside water striking the surface at more than that angle from the normal is entirely reflected back down. This is what creates Snell's window: looking up from underwater, the whole sky is squeezed into a bright circle of that half-angle, and everything outside it is a reflection of the bottom.

Why does light slow down in glass if nothing beats the speed of light?

The individual photons still travel at c between atoms; what slows is the wave as a whole. Oscillating charges in the medium re-radiate the incoming field with a phase lag, and the superposition of original and re-radiated waves propagates more slowly. The refractive index measures that phase delay. Nothing carries information faster than c at any point.

Does the frequency of light change when it refracts?

No. Frequency is set by the source and is continuous across the boundary, because the electrons at the interface are driven at the incoming frequency. What changes is the speed, and therefore the wavelength: 589 nm sodium light becomes 442 nm inside water. The colour you perceive does not change, because perception tracks frequency.

What is Brewster's angle used for?

Producing or removing polarised light. At arctan(n₂/n₁) the reflected beam is fully polarised parallel to the surface, which is why polarising sunglasses with a vertical transmission axis kill glare from horizontal water and roads. Laser cavities use Brewster-angle windows for the reverse reason: light of the right polarisation passes through with essentially zero reflection loss.

Can the refractive index be less than 1?

The phase index can be, for X-rays in matter and for waves near an absorption resonance, which is why X-ray mirrors work at grazing incidence. That does not permit faster-than-light signalling: information travels at the group velocity, which stays below c. For visible light in ordinary transparent materials the index is always above 1.

Why does a prism split white light?

Because the index depends on wavelength. In BK7 crown glass blue light sees about 1.522 and red about 1.514, so blue refracts more at each surface and the two emerge on slightly different paths. A prism has two non-parallel faces so the difference accumulates instead of cancelling; a flat window has parallel faces, so the colours recombine and you see no spectrum.

How do I use this for sound or seismic waves?

Replace each index with the reciprocal of the wave speed in that medium: sinθ₁/v₁ = sinθ₂/v₂. So a medium with a high sound speed behaves like a low refractive index. Enter n = vref/v using any convenient reference speed for both media and the angles come out correctly, since only the ratio matters.

Why does a pool look shallower than it is?

Light from the bottom bends away from the normal as it leaves the water, so it reaches your eye at a steeper angle than it would have travelled in a straight line, and your brain traces it back to a point higher up. Looking straight down, the apparent depth is the real depth divided by the refractive index, so a 2.0 m pool appears about 1.5 m deep.

References