Snell's Law Calculator: Refraction, Critical Angle and Index
By FindMySum · Last reviewed
Light changes direction when it passes from one transparent material into another. This Snell's law calculator works out by how much: the angle of the refracted ray, the incident angle that produces a given refraction, or the refractive index of an unknown material from two measured angles. It also gives the critical angle for total internal reflection, the speed of light in each material and the wavelength there, and draws the rays.
The law of refraction
n₁ sin θ₁ = n₂ sin θ₂
- n₁ and n₂ are the refractive indices of the two materials.
- θ₁ is the angle of incidence and θ₂ the angle of refraction, both measured from the normal, an imaginary line perpendicular to the surface, not from the surface itself.
The product n sin θ is the same on both sides of the boundary. Going into a higher index, sin θ must fall, so light bends toward the normal. Going into a lower index it bends away.
Refractive index
The index of a material is the ratio of the speed of light in a vacuum to its speed in the material:
n = c ÷ v
c is exactly 299,792,458 m/s. The frequency of light doesn't change at the boundary, so its wavelength shrinks by the same factor: λ = λ₀ ÷ n. Typical values for yellow light at 589 nm, from the OpenStax table:
| Material | n |
|---|---|
| Air | 1.000293 |
| Ice | 1.309 |
| Water | 1.333 |
| Plexiglas (acrylic) | 1.51 |
| Crown glass | 1.52 |
| Flint glass | 1.66 |
| Diamond | 2.419 |
Worked example: the default
Light travelling in air hits a water surface at 30° from the normal:
sin θ₂ = 1.000293 × sin 30° ÷ 1.333 = 0.3752
θ₂ = 22.04°, so the ray bends about 8° toward the normal. In the water, light slows to about 224,900 km/s and the 589 nm yellow light has a wavelength of about 442 nm.
Finding an index
Measure the angles on both sides of a boundary and rearrange: n₂ = n₁ sin θ₁ ÷ sin θ₂. OpenStax's example sends light from air at 30.0° and measures 22.0° inside an unknown liquid: n₂ = sin 30° ÷ sin 22° = 1.33, which identifies it as water. Choose "Second index n₂" to do this calculation.
Critical angle and total internal reflection
When light goes from a higher index into a lower one, the refracted ray bends away from the normal and gets closer to the surface as the incident angle grows. At the critical angle it runs along the surface:
θ_c = arcsin(n₂ ÷ n₁)
Beyond that angle, sin θ₂ would need to be more than 1, which is impossible, so no light gets through: all of it is reflected. For water to air the critical angle is about 48.6°, which is why, looking up from underwater, you see the sky through a bright circle overhead and a silvery mirror beyond it. Crown glass has a critical angle of about 41°, and diamond about 24°.
Total internal reflection is what makes optical fibres work. Light travels down a glass core surrounded by cladding of slightly lower index, striking the boundary at angles beyond the critical angle, so it bounces along for kilometres with very little loss.
The ray diagram
The diagram draws the boundary, the normal (dashed), the incoming ray, the weaker reflected ray and the refracted ray. In total internal reflection the reflected ray is drawn solid and there is no refracted ray. The table beside it gives the refraction angle at every 10° of incidence, which shows how the bending grows non-linearly as the incident angle rises.
Limits
Indices depend on colour: almost every transparent material bends blue light more than red, which is how prisms make spectra. They also change a little with temperature and, for glass and plastics, from one product to another, so for precise optics enter the manufacturer's index at your wavelength. The calculator assumes a flat, smooth surface. It shows that some light reflects, but not how much; that fraction comes from the Fresnel equations and rises steeply at grazing angles.
To convert between a light's wavelength, frequency and photon energy, use the wavelength calculator.
More questions
Why do rainbows form?
Water's index is slightly higher for violet light than for red, so sunlight entering a raindrop bends by a different amount for each colour, reflects off the back of the drop and bends again on the way out. The colours leave at slightly different angles, about 40° to 42° from the direction opposite the sun, which spreads them into an arc.
How do glasses and contact lenses work?
A lens is a piece of material with curved surfaces, so light hits it at different angles across its face and bends by different amounts. That focuses or spreads the light. Higher-index lens materials bend light more strongly, which is why high-index glasses can be thinner for the same prescription.
Why do roads look wet on hot days?
Air just above hot pavement is warmer and has a slightly lower index than the cooler air above. Light from the sky coming in at a shallow angle bends gradually upward through these layers until it reaches your eye from the road surface, so you see a reflection of the sky that looks like water: a mirage.
Can the index of refraction be less than 1?
For visible light in ordinary transparent materials, no: light always travels slower than in a vacuum, so n is above 1. Some materials have indices below 1 for X-rays, and engineered metamaterials can even have negative indices, but those are special cases outside this calculator.
Why does a diamond sparkle more than glass?
Its index, about 2.42, is much higher than glass's 1.5, so its critical angle is only about 24°. Light that enters the top of a well-cut stone hits the back facets beyond that angle, reflects inside several times and comes back out of the top, split into colours by diamond's strong dispersion.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.