Snell's Law Calculator
Enter the refractive index of each medium and the angle of incidence, and this calculator solves the refracted angle from Snell's law, n1 sin(theta1) = n2 sin(theta2). It also reports the critical angle whenever the light travels into a less dense medium, and flags total internal reflection when the incident angle passes that critical value. Four presets cover the everyday air, water and glass boundaries so you can check a result in one click.
How to use the Snell's law calculator
- Pick a preset such as Air to glass or Water to air, or leave the defaults, to set the two indices quickly.
- Type the refractive index of the first, incident medium in the n1 field.
- Type the refractive index of the second, transmission medium in the n2 field.
- Enter the angle of incidence in degrees in the Angle field (0 to 90).
- Read the refracted angle and the critical angle in the result cards below.
- Use the Copy button to grab the refracted angle, or the total internal reflection notice, as text.
Examples
Air into glass at 30 degrees
n1 = 1.0, n2 = 1.5, angle = 30 deg
Refracted angle = 19.4712 deg. Critical angle: none, since n1 is not greater than n2.
Air into water at 45 degrees
n1 = 1.0, n2 = 1.33, angle = 45 deg
Refracted angle about 32.12 deg. The ray bends toward the normal on entering the denser water.
Water into air past the critical angle
n1 = 1.33, n2 = 1.0, angle = 60 deg
Total internal reflection (critical angle 48.7535 deg). No refracted ray leaves the water.
Frequently asked questions
What is Snell's law?
Snell's law relates the angles on each side of a boundary between two media: n1 x sin(theta1) = n2 x sin(theta2). Here n1 and n2 are the refractive indices and theta1 and theta2 are the angles measured from the normal, the line perpendicular to the surface. This calculator rearranges it to solve theta2 from your n1, n2 and theta1.
What is the index of refraction?
It measures how much a medium slows light relative to a vacuum, which is exactly 1. A vacuum is 1, air is roughly 1.0003 and usually rounded to 1.00, water is about 1.33 and ordinary crown glass is near 1.50. A higher index bends light more strongly and slows it further.
How does the tool find the critical angle?
A critical angle only exists when light moves from a denser medium into a rarer one, that is when n1 is greater than n2. The tool computes it as asin(n2 / n1). Water to air gives asin(1.0 / 1.33), about 48.7535 degrees. When n1 is less than or equal to n2 the result card shows none, because refraction always succeeds.
What is total internal reflection and when is it flagged?
When the incident angle exceeds the critical angle, Snell's law would need sin(theta2) greater than 1, which is impossible, so no light refracts out and all of it reflects back inside the denser medium. The tool detects this and shows a Total internal reflection notice instead of a refracted angle. This effect is what guides light along fiber optic cables.
Why does air to glass never show a critical angle?
Going from air (about 1.00) into glass (about 1.50) means n1 is less than n2, so light always crosses the boundary and bends toward the normal. A critical angle needs the reverse arrangement, a denser starting medium, so the tool correctly reports none for that direction.
Which angle should I enter, and how is it measured?
Enter the angle of incidence, measured between the incoming ray and the surface normal rather than the surface itself. A ray hitting the surface straight on is 0 degrees, and a grazing ray approaches 90 degrees. The calculator accepts any value from 0 to 90 degrees.
Can it solve for the incident angle instead of the refracted one?
The on-page form solves the refracted angle from an angle of incidence. The underlying engine can also solve the incident angle when an angle of refraction is supplied to the API, but the form is set up for the common forward direction. Swap the n1 and n2 values to model the reverse boundary if you need it.
How accurate are the results?
The engine works in double precision and rounds the internal result to six decimal places, and the display keeps six significant figures. Real accuracy is limited by your index values, which vary slightly with the light's wavelength and the material's temperature, so treat published indices as typical rather than exact.
Does anything I enter get uploaded?
No. The calculation runs entirely in your browser with plain arithmetic, so your indices and angles never leave your device and there is no account or server call involved.
Learn more
- Refraction, the critical angle and total internal reflection
How Snell's law bends light between media, why a critical angle appears going to a rarer medium, and how total internal reflection guides fiber optics.
Related tools
Wavelength Frequency Calculator
Convert wavelength to frequency and back using c = f x lambda. Enter a wavelength or frequency in metres, nm, Hz, MHz or GHz and get the photon energy too.
Lens Magnification Calculator
Solve the thin lens equation 1/f = 1/do + 1/di and find magnification m = -di/do. Enter any two of focal length, object and image distance. Free tool.
Telescope Magnification Calculator
Calculate telescope magnification from focal lengths, plus max useful power, exit pupil and focal ratio from your aperture. Free astronomy optics tool.
555 Timer Calculator
Calculate 555 timer astable frequency, period, high and low times and duty cycle from R1, R2 and the timing capacitor. Free oscillator design helper.
Absolute Humidity Calculator
Calculate absolute humidity in grams of water vapor per cubic meter from air temperature and relative humidity. Fast, free and works in your browser.
Allele Frequency Calculator
Find allele frequencies from genotype counts. Enter the number of AA, Aa and aa individuals to get the A and a allele frequencies and allele totals.