Snell’s law calculator
Pick the two materials and the angle, get the refracted angle.
What is Snell’s law?
n₁ sin θ₁ = n₂ sin θ₂: light crossing from a medium with index n₁ into one with index n₂ bends so that this product stays the same. Angles are measured from the normal, the line perpendicular to the surface.
Example: air to diamond
Light hits diamond (n = 2.419) from air at 30°: sin θ₂ = 1.00 × sin 30° ÷ 2.419, so θ₂ = 11.9° — bent sharply toward the normal.
What is the critical angle?
Going from a denser to a less dense medium (n₁ > n₂), the critical angle is sin⁻¹(n₂ ÷ n₁). Beyond it the light cannot leave and is totally reflected. Diamond to air: 24.4°; polystyrene to air: 42.2°.
Where do the refractive indices come from?
OpenStax University Physics, for yellow light of 589 nm: water 1.333, crown glass 1.52, flint glass 1.66, diamond 2.419 and others. The index changes slightly with the color of light.
Does light always bend toward the normal?
Only when it enters a medium with a higher index. Going into a lower index it bends away from the normal.
How fast does light travel in a material?
The refractive index is n = c ÷ v, so v = c ÷ n, where c = 299,792,458 m/s is the speed of light in vacuum. In water (n = 1.333) light travels at 2.249 × 10⁸ m/s, and in diamond (n = 2.419) at 1.239 × 10⁸ m/s.
Is the angle measured from the surface or from the normal?
From the normal, the imaginary line at 90° to the surface. A ray that travels along the surface is at 90°, not 0°. If you measured the angle from the surface, subtract it from 90° before entering it.
The law and its assumptions
Snell's law, n₁ sin θ₁ = n₂ sin θ₂, follows from the change in the speed of light at a boundary between two uniform, transparent materials with a smooth, flat interface. The angles lie in the plane containing the incoming ray and the normal. The law gives the direction of the refracted ray only; how much light is reflected rather than transmitted depends on polarization and angle and needs the Fresnel equations, which this page does not compute. Because the index depends on wavelength, the same glass bends blue light slightly more than red, which is how a prism spreads white light. The indices on this page are for yellow sodium light of 589 nm.
Worked example: air into water, and back
A ray hits still water from air at 45°. With n₁ = 1.000293 and n₂ = 1.333, sin θ₂ = 1.000293 × sin 45° ÷ 1.333, which gives θ₂ = 32.05°. The ray bends toward the normal because it enters a higher index. Now start under water: a ray in water meeting the surface at 45° leaves into air at 70.44°, away from the normal. Light paths are reversible, so a ray travelling in water at 32.05° reaches the air at 45°.
Total internal reflection
When light goes from a higher to a lower index, the refracted angle grows faster than the incoming angle. At the critical angle, arcsin(n₂ ÷ n₁), the refracted ray skims along the surface; beyond it there is no refracted ray and all the light is reflected. For crown glass (1.52) into air the critical angle is 41.15°, so a ray hitting the inside surface at 45° is totally reflected. This is the working principle of optical fibers and of the prisms in binoculars.
Common mistakes
Entering an angle measured from the surface instead of the normal gives a completely different answer. Swapping n₁ and n₂ reverses the direction of the bend. An incoming angle of 90° is not accepted, since it describes a ray that only grazes the surface. "Total reflection" is not an error: it is the physical result when sin θ₂ would exceed 1. Finally, do not use one table value for every liquid: salt water and warm water differ slightly, and the index changes with the color of light.
Sources: OpenStax University Physics, Volume 3, chapter 1 (the law of refraction, total internal reflection and the table of indices of refraction at 589 nm); the exact value of the speed of light is from the SI definition (NIST). Related: thin lens calculator, wavelength calculator and speed calculator.