Snell’s law is the fundamental equation governing how light (or any wave) bends when it crosses the boundary between two media with different optical densities. Published by René Descartes in 1637 based on the geometric work of Willebrord Snellius, it underpins every lens, fibre-optic cable, camera, microscope, and pair of glasses ever made. This calculator implements the exact formula, lets you solve for any of the four variables, detects total internal reflection, and adds the Fresnel unpolarised reflectance as a bonus.
The formula
n₁ sin θ₁ = n₂ sin θ₂
| Symbol | Meaning | Unit |
|---|---|---|
| n₁ | Refractive index of medium 1 (incident side) | dimensionless |
| θ₁ | Angle of incidence — from the surface normal | degrees |
| n₂ | Refractive index of medium 2 (refracted side) | dimensionless |
| θ₂ | Angle of refraction — from the surface normal | degrees |
Because the product n sin θ is conserved across any planar interface, you can rearrange for any single unknown:
- θ₂ = arcsin(n₁ sin θ₁ / n₂) — standard forward calculation.
- θ₁ = arcsin(n₂ sin θ₂ / n₁) — find the required incident angle.
- n₁ = n₂ sin θ₂ / sin θ₁ — identify an unknown medium by measuring both angles.
- n₂ = n₁ sin θ₁ / sin θ₂ — find the index of the second medium.
How it works
The calculator applies the exact trigonometric form of Snell’s law — no linear
approximations. Angles are converted to radians internally via θ_rad = θ_deg × π / 180
before the sine/arcsine operations. When solving for a refracted angle, it checks
whether |n₁ sin θ₁ / n₂| > 1; if so, the refracted ray does not exist and the
interface undergoes total internal reflection — the calculator flags this clearly
rather than silently returning a NaN.
The critical angle θ_c = arcsin(n₂ / n₁) is displayed whenever n₁ > n₂, reminding you of the TIR threshold for that medium pair.
The Fresnel unpolarised reflectance uses the standard formulae:
R_s = [(n₁ cos θ₁ − n₂ cos θ₂) / (n₁ cos θ₁ + n₂ cos θ₂)]²
R_p = [(n₁ cos θ₂ − n₂ cos θ₁) / (n₁ cos θ₂ + n₂ cos θ₁)]²
R = (R_s + R_p) / 2
This tells you what fraction of the light intensity is reflected — important for anti- reflection coating design and telescope mirror budgets.
Worked example — air into a glass prism
A laser beam in air (n₁ = 1.000293) strikes a crown glass surface (n₂ = 1.523) at 30° from the normal. What is the refracted angle, and how much light is reflected?
Step 1 — Snell’s law:
sin θ₂ = n₁ sin θ₁ / n₂ = 1.000293 × sin(30°) / 1.523
= 1.000293 × 0.5 / 1.523 ≈ 0.3284
θ₂ = arcsin(0.3284) ≈ 19.17°
The ray bends toward the normal (30° → 19.17°) because glass is denser than air.
Step 2 — Fresnel reflectance:
cos θ₁ = cos 30° ≈ 0.8660, cos θ₂ = cos 19.17° ≈ 0.9450
Rs = ((1 × 0.8660 − 1.523 × 0.9450) / (1 × 0.8660 + 1.523 × 0.9450))² ≈ 0.0785
Rp = ((1 × 0.9450 − 1.523 × 0.8660) / (1 × 0.9450 + 1.523 × 0.8660))² ≈ 0.0422
R = (0.0785 + 0.0422) / 2 ≈ 3.5 %
About 3.5 % of the light is reflected — consistent with the ~4 % rule of thumb for uncoated glass at near-normal incidence.
| Scenario | n₁ | n₂ | θ₁ | θ₂ | R |
|---|---|---|---|---|---|
| Air → Water | 1.000 | 1.333 | 45° | 32.1° | 2.8 % |
| Air → Crown glass | 1.000 | 1.523 | 30° | 19.2° | 3.5 % |
| Water → Air | 1.333 | 1.000 | 30° | 41.8° | 5.6 % |
| Water → Air (TIR) | 1.333 | 1.000 | 50° | — | 100 % |
| Air → Diamond | 1.000 | 2.417 | 20° | 8.2° | 17.2 % |
Diamond reflects 17 % even at shallow angles — combined with multiple internal TIR reflections, this produces the intense brilliance of a well-cut stone.
Every calculation runs locally in your browser. No data is sent to any server.