What this calculator does
Snell's law describes how light bends when it crosses the boundary between two materials with different refractive indices: n₁sinθ₁ = n₂sinθ₂. Light entering a denser medium, such as passing from air into water, bends toward the normal (the line perpendicular to the surface); light leaving a denser medium bends away from it.
This calculator solves Snell's law for the angle of refraction, given the refractive indices of both media and the angle of incidence. It also checks for total internal reflection, which happens when light tries to leave a denser medium at too shallow an angle and cannot cross the boundary at all, reflecting entirely back into the medium it came from instead.
The formula
Rearranging n₁sinθ₁ = n₂sinθ₂ for the refraction angle gives θ₂ = arcsin[(n₁/n₂)sinθ₁]. If light is travelling from a denser medium into a less dense one (n₁ > n₂), there is a critical angle beyond which that arcsin has no real solution, meaning the light cannot refract out and undergoes total internal reflection instead.
| Term | Meaning |
|---|---|
| Refractive index (n) | How much a medium slows light compared to a vacuum; higher means denser optically, such as 1.00 for air versus 1.33 for water. |
| Angle of incidence (θ₁) | The angle between the incoming ray and the normal, measured in the first medium. |
| Angle of refraction (θ₂) | The angle between the bent ray and the normal, measured in the second medium. |
| Critical angle | The angle of incidence, when leaving a denser medium, beyond which total internal reflection occurs instead of refraction. |
The inputs explained
| Field | What to enter |
|---|---|
| Refractive index of medium 1 | The refractive index of the medium the light is travelling through before the boundary, such as 1.00 for air or 1.33 for water. |
| Refractive index of medium 2 | The refractive index of the medium the light is entering after the boundary. |
| Angle of incidence (°) | The angle of incidence, measured from the normal (the perpendicular to the surface), not from the surface itself. |
When to use it
Light entering water from air
Light travelling from air (n = 1.00) into water (n = 1.33) always has a refraction angle smaller than its incidence angle, bending toward the normal, which is why a straight stick looks bent at the point it enters water.
Checking for total internal reflection in an optical fibre
Optical fibres rely on total internal reflection to keep light travelling down the core rather than leaking out the sides; this calculator flags exactly when that condition is met for a given pair of refractive indices and angle.
Working out a lens or prism design angle
Predicting how a ray bends at each glass surface, given the glass's refractive index, is the starting point for tracing a ray through a lens or prism by hand.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How does the angle of refraction change entering water from air, at different angles of incidence?
A range of incidence angles for light entering water from air.
How does the refraction angle behave approaching the critical angle, from water into air?
The same kind of range, but for light travelling the other way, from water into air, up to just below the critical angle.
Questions
What does it mean for light to "bend toward the normal"?
It means the refracted ray makes a smaller angle with the normal (the perpendicular to the surface) than the incident ray did. This always happens when light enters a denser medium, such as passing from air into glass or water.
What is total internal reflection?
When light travels from a denser medium into a less dense one at an angle steeper than the critical angle, it cannot refract out at all and instead reflects entirely back into the denser medium, as if the boundary were a mirror. This only happens going from higher refractive index to lower.
How is the critical angle calculated?
The critical angle is arcsin(n₂/n₁), and only exists when n₁ is greater than n₂, meaning light is trying to leave the denser of the two media.
Does Snell's law apply to all types of light?
Yes, Snell's law describes the refraction of any electromagnetic wave, including visible light, at a boundary between two media, as long as each medium's refractive index at the relevant wavelength is known; refractive index does vary slightly with wavelength, which is what causes a prism to split white light into colours.
For the related law of reflection and total ray deflection, see the angle of incidence calculator. For how a lens forms an image once light has refracted through its surfaces, see the thin lens calculator.