Snell's Law (Refraction) Calculator
Solve n₁ sinθ₁ = n₂ sinθ₂ for any refractive index or angle, and find the critical angle for total internal reflection. A live 3D scene bends a light ray at an interface, and charts show the refraction curve and common refractive indices.
Reviewed by the ToolNestr Editorial Team — July 2026
3D refraction diagrams
Two static, auto-rotating scenes: how the bend angle changes with the angle of incidence, and what happens beyond the critical angle.
1. Bend angle grows with incidence angle
Two incident/refracted ray pairs at air→water (n1=1.00, n2=1.33): a shallow 20° hit (gray) bends only a little, while a steeper 50° hit (indigo) bends much more. Both stay on the same side of the dashed normal.
2. Total internal reflection
Light inside glass (n1=1.50) hitting a glass→air boundary at 60° — beyond the ≈41.8° critical angle. No ray escapes into the air; instead it fully reflects back into the glass (red) at the same angle from the normal.
Refraction graphs
Going the reverse way — water into air — total internal reflection sets in beyond the critical angle θc = arcsin(1.00/1.33) ≈ 48.75°, so no θ2 curve exists past that point.
How it works
The core idea in one line: Snell's law says the product of a medium's refractive index and the sine of the ray's angle from the normal stays the same across a boundary — n₁sinθ₁ = n₂sinθ₂ — so light bends toward the normal entering a denser medium and away from it entering a less dense one.
n₁ sinθ₁ = n₂ sinθ₂
Snell's law — angles from the normal
θc = arcsin(n₂ / n₁)
critical angle, only valid when n₁ > n₂
Rearranged, n1 sinθ1 = n2 sinθ2 solves any variable: sinθ2 = n1sinθ1/n2, sinθ1 = n2sinθ2/n1, n2 = n1sinθ1/sinθ2, and n1 = n2sinθ2/sinθ1. When going from a higher-index medium into a lower-index one, there is a maximum angle of incidence — the critical angle θc = arcsin(n2/n1) — beyond which no real solution for θ2 exists and the light totally internally reflects instead of refracting.
Worked example 1 — air into water
Given: Light travels from air (n1 = 1.00) into water (n2 = 1.33), hitting the surface at θ1 = 30° from the normal. Find θ2.
Water is denser (higher n) than air, so the ray bends toward the normal: θ2 < θ1.
Worked example 2 — critical angle in glass
Given: Light inside glass (n1 = 1.50) hits a boundary with air (n2 = 1.00). Find the critical angle for total internal reflection.
For any angle of incidence beyond 41.81° inside the glass, the light cannot escape into the air — it totally internally reflects.
Refractive indices of common materials
Standard reference values at visible-light wavelengths, used as calculator presets.
| Material | Refractive index (n) |
|---|---|
| Vacuum / air | 1.00 |
| Water | 1.33 |
| Glass (crown) | 1.50 |
| Diamond | 2.42 |
Actual values vary slightly with wavelength (dispersion) and exact material composition — these are widely used approximations.
Where Snell's law actually matters
🔦 Fiber optic cables
Light is sent down a glass or plastic core with a higher refractive index than the surrounding cladding. Because the light always strikes the core-cladding boundary beyond the critical angle, it totally internally reflects over and over, carrying signals for kilometres with minimal loss.
👓 Eyeglass and camera lens design
Lens makers choose glass with a specific refractive index (and shape the curvature) so that Snell's law bends incoming light rays to converge exactly on the retina or sensor, correcting for the eye's natural focusing error or capturing a sharp image.
🌈 Rainbow formation
Sunlight refracts as it enters a raindrop, reflects off the back of the drop, and refracts again on the way out. Because the refractive index depends slightly on wavelength, different colours bend by different amounts, spreading white light into the visible spectrum.
💎 Gemstone brilliance
Diamond's very high refractive index (2.42) gives it a small critical angle, so light entering the stone tends to totally internally reflect multiple times before exiting — this is a major reason cut diamonds sparkle so much more than lower-index gems.
Common misconceptions
"Light always bends toward the normal when entering any new medium."
It only bends toward the normal when entering a MORE optically dense medium (higher n) — like air into water. Going the other way, into a LESS dense medium (lower n), the ray bends away from the normal instead.
"Total internal reflection can happen going from any medium to any other."
It can only happen when light travels from a higher-index medium into a lower-index one (n1 > n2), and only when the angle of incidence exceeds the critical angle θc = arcsin(n2/n1). Going from lower to higher index, a refracted ray always exists.
"The refractive index tells you how much a material bends light, full stop."
It sets the ratio n1sinθ1 = n2sinθ2, but the actual bend also depends on the angle of incidence — light hitting the surface straight on (θ1 = 0°) does not bend at all, no matter how different the two refractive indices are.
"A higher refractive index always means a more transparent material."
Refractive index is about how much light slows down and bends, not about transparency or absorption. A material can have a high n and still be highly transparent (diamond) or, in principle, absorb strongly — the two properties are independent.
Formula sources & further reading
The formulas here are standard, traceable to:
- • OpenStax, University Physics Volume 3 — §1.3 "The Law of Refraction" (free, peer-reviewed). openstax.org
- • Halliday, Resnick & Walker, Fundamentals of Physics — Chapter 33, Electromagnetic Waves (refraction and Snell's law).
- • Serway & Jewett, Physics for Scientists and Engineers — Chapter 35, The Nature of Light and the Laws of Geometric Optics.
n1 sinθ1 = n2 sinθ2, with angles measured from the normal to the interface. Results are rounded for display.
How to use this calculator
Choose the unknown
The calculator solves for n1, θ1, n2, or θ2 from the other three.
Use the material presets
Pick air, water, glass, or diamond, or type any positive refractive index.
Watch the bending ray
Use the sliders to see the ray bend at the interface, and check for total internal reflection.
Related tools
Frequently asked questions
What is refraction?
Refraction is the bending of light as it passes from one transparent medium into another with a different refractive index. It happens because light changes speed at the boundary — Snell's law, n₁sinθ₁ = n₂sinθ₂, describes exactly how much the ray bends, with angles measured from the normal (the line perpendicular to the interface).
What does the refractive index physically represent?
The refractive index n is the ratio of the speed of light in a vacuum to its speed in the medium: n = c/v. A higher n means light travels slower in that material. Vacuum/air is about 1.00, water about 1.33, glass about 1.50, and diamond about 2.42.
What is total internal reflection?
When light travels from a denser medium (higher n) into a less dense one (lower n) and hits the interface at an angle beyond the critical angle θc = arcsin(n2/n1), it cannot refract out at all — every bit of it reflects back into the denser medium. This is total internal reflection, and it only occurs when n1 > n2.
Why does a straw look bent in a glass of water?
Light from the submerged part of the straw refracts as it exits the water into the air, bending away from the normal because it is moving into a less dense medium (lower n). Your eye assumes light travelled in a straight line, so the submerged part appears shifted from where it actually is — making the straw look bent at the surface.
Does Snell's law work for any angle of incidence?
Yes, as long as a refracted ray exists. If you're going from a higher-index medium to a lower-index one and the angle of incidence exceeds the critical angle, there is no real solution for θ2 (sinθ2 would need to exceed 1) — that's exactly the total-internal-reflection condition, and the calculator flags it rather than returning an angle.