The Snell's law calculator computes light refraction angles using n₁ sin θ₁ = n₂ sin θ₂. Select from 13 optical materials or enter custom refractive indices. Includes critical angle detection, total internal reflection warning, and an SVG ray diagram.
Inputs
Result
Enter values and click Calculate
How to Use the Snell's Law Calculator
Snell's law governs how light (and other waves) changes direction when crossing a boundary between two media with different refractive indices. This calculator supports all three common problem types: finding the refraction angle, working backward from a known refraction angle, or finding an unknown refractive index.
Example: Light from Air to Water
Light hits the surface of water at 45° to the normal. Using Snell's law with n₁ = 1.0003 (air) and n₂ = 1.333 (water): sin θ₂ = (1.0003/1.333) × sin(45°) = 0.7502 × 0.7071 = 0.5303. θ₂ = arcsin(0.5303) ≈ 32.1°. The light bends toward the normal when entering the denser medium.
Critical Angle and Total Internal Reflection
When light travels from a denser medium to a less dense medium (e.g., glass to air), there is a maximum incidence angle beyond which all light reflects back. For crown glass to air: θc = arcsin(1.0/1.52) ≈ 41.1°. Fiber optic cables use this effect — light is guided through the core by total internal reflection, bouncing along the fiber without escaping.
Reading the Ray Diagram
The SVG diagram shows: the dashed vertical line (normal), the incident ray in blue coming from the upper-left, the boundary (horizontal line), and the refracted or reflected ray in orange. The angles are labeled for quick visual confirmation of the calculation.
Solving for Refractive Index
Use the "Solve for n₂" option to find an unknown material's refractive index from measured refraction angles. This is useful in lab settings: if you measure an incidence angle of 45° and a refraction angle of 28.2° from air into an unknown material, n₂ = 1.0003 × sin(45°)/sin(28.2°) ≈ 1.5 (consistent with crown glass).
FAQ
What is Snell's law?
Snell's law describes how light bends when passing between materials with different optical densities: n₁ × sin θ₁ = n₂ × sin θ₂. Here n₁ and n₂ are the refractive indices of the two media, and θ₁ and θ₂ are the angles of incidence and refraction, measured from the surface normal.
What is the critical angle?
The critical angle θc occurs when light travels from a denser medium (higher n) to a less dense medium. At θc, the refracted ray runs along the boundary (θ₂ = 90°). Beyond θc, total internal reflection occurs and no light escapes. θc = arcsin(n₂/n₁). For glass-to-air: θc = arcsin(1/1.52) ≈ 41.1°.
What is total internal reflection?
When light hits a boundary at an angle greater than the critical angle (traveling from denser to less dense medium), all light is reflected back — none passes through. This is the principle behind fiber optic cables, which guide light around bends by keeping it above the critical angle at the glass-air interface.
What is the refractive index of water?
Water has a refractive index of approximately 1.333 at visible wavelengths. This means light travels about 33% slower in water than in vacuum. When light enters water at 45°, Snell's law gives θ₂ = arcsin(sin(45°)/1.333) ≈ 32.1°.
Is this calculator free?
Yes, completely free with no signup required. All calculations run in your browser.
Is my data private?
Yes. All calculations run locally in your browser. Nothing is transmitted to any server.
Why does a straw look bent in a glass of water?
The straw appears bent because light from the submerged portion travels from water (n=1.333) to air (n=1.0003) and bends away from the normal (toward the boundary surface). Your eye traces light in a straight line, placing the underwater portion higher than it actually is — creating the classic bent-straw illusion.