Snell's Law Calculator
Solve n₁sin θ₁ = n₂sin θ₂ for the refracted angle or either refractive index, with a critical angle, total internal reflection warning and wave speeds.
Medium 1 — where the light starts
Medium 2 — where the light goes
θ₂ is being solved for.
θ₂ = arcsin(n₁ · sin θ₁ ÷ n₂)
- sin θ₂ = 1.0003 × sin 30° ÷ 1.52 = 0.329046
- θ₂ = arcsin(0.329046) = 19.21089°
- The second medium is denser, so the ray bends towards the normal (θ₂ < θ₁).
- The ray is deviated by 10.7891° from its original direction.
- Wave speeds: v = c ÷ n gives 299,702,547 m/s in medium 1 and 197,231,880 m/s in medium 2.
All angles are measured from the normal — the line perpendicular to the surface — not from the surface itself. Refractive index depends slightly on wavelength (that dispersion is what splits white light in a prism), so the table values are quoted at the 589 nm sodium D line. Worked example: a ray hitting crown glass from air at 30° refracts to arcsin(1 × 0.5 ÷ 1.5) = 19.47°, and the critical angle for glass-to-air is 41.81°.
What is the Snell's Law Calculator?
Snell's law relates the angles either side of a boundary: n₁·sin θ₁ = n₂·sin θ₂, with both angles measured from the normal. Light going from air into crown glass at 30° refracts to arcsin(1 × 0.5 ÷ 1.5) = 19.47°.
- Solves Snell's law for either angle or either refractive index
- Sixteen material presets from vacuum and air to sapphire and diamond
- Critical angle θc = arcsin(n₂ ÷ n₁) shown whenever it exists
- Total internal reflection detected and explained rather than erroring out
- Wave speed v = c ÷ n reported for both media
- 100% in-browser: indices and angles never leave your device
How to use the Snell's Law Calculator
- 1
Choose what to solve for: the refracted angle, the angle of incidence, or n₁ or n₂.
- 2
Pick the material for medium 1 and medium 2, or type refractive indices directly.
- 3
Enter the known angle in degrees, measured from the normal rather than from the surface.
- 4
Read the answer plus the critical angle and the speed of light in each medium.
- 5
Watch for the total internal reflection banner, which appears when no refracted ray can exist.
About the Snell's Law Calculator
The ByteTools Snell's Law Calculator solves n₁·sin θ₁ = n₂·sin θ₂ for the refracted angle, the angle of incidence, or either refractive index. Both media have a dropdown of sixteen materials from vacuum and air through water, acrylic and crown glass to sapphire and diamond, and picking one fills in its index, which you can then overwrite with your own measured value.
Along with the angle it reports the critical angle θc = arcsin(n₂ ÷ n₁) whenever the light is leaving the denser medium, and it detects total internal reflection, showing a clear warning instead of a nonsense answer when the required sine would exceed 1. The speed of light inside each medium, v = c ÷ n, is shown at the same time.
All the trigonometry runs as JavaScript in your browser, so no values are uploaded, nothing is stored, and answers change the instant you adjust an angle. That also means the page keeps working in a lab or classroom with no internet connection once it has been loaded.
Frequently asked questions
What is Snell's law?
Snell's law states that n₁·sin θ₁ = n₂·sin θ₂ across a boundary between two materials, where n is the refractive index and each angle is measured from the normal. Light bends towards the normal when it enters a denser medium and away from it when it leaves one.
How do you find the critical angle?
The critical angle is θc = arcsin(n₂ ÷ n₁), and it only exists when the light starts in the denser medium. For glass with n = 1.52 meeting air the critical angle is about 41.1°, beyond which every ray is reflected back inside.
What is total internal reflection?
When light hits a boundary from the denser side at more than the critical angle, no refracted ray is possible and all the light reflects back into the first medium. Optical fibres and prismatic binoculars rely on this to guide light with almost no loss.
Are angles measured from the surface or the normal?
Always from the normal, the imaginary line perpendicular to the surface. A ray grazing the surface has an angle near 90°, and a ray arriving straight on has an angle of 0° and passes through undeflected.
Does refractive index depend on colour?
Slightly, and that dispersion is exactly what splits white light into a rainbow in a prism. The values in the material list are quoted at the 589 nm sodium D line, the usual reference wavelength, so blue light will bend a little more than the tool predicts and red a little less.
Related tools
Wavelength and Frequency Calculator
Convert between wavelength and frequency using c = λf, with wave speed for vacuum, a medium, sound in air or a custom value, plus photon energy in eV.
Density Calculator
Solve density = mass / volume for any variable in g/cm³, kg/m³ or lb/ft³, with specific gravity and a reference table of common material densities.
Scientific Calculator
Free online scientific calculator with sin, cos, tan in degrees or radians, log, ln, powers, roots, π, e, parentheses, memory keys and keyboard support.
Simple Pendulum Calculator
Find the period, length or local gravity of a simple pendulum from T = 2π√(L/g), with frequency, angular frequency and a large-amplitude correction.