Snell's Law Calculator
Apply Snell's law to find the refraction angle, the critical angle for total internal reflection, or the refractive index of a medium from light speed.
Snell's Law Calculator
Put a straw in a glass of water and it looks broken at the surface. Light leaving the straw crosses from water into air, speeds up, and bends away from the normal, so the part that reaches your eye appears to come from a different place than the part above the waterline. Snell's law is the rule that quantifies that bend, and it is the same rule behind the design of every lens, the cladding that keeps light inside a fibre-optic cable, the shimmer of a mirage on a hot road, and the rainbow arc that appears after rain.
This calculator covers the three questions the law gets asked most often. It finds the refraction angle when light crosses between two media, it finds the critical angle above which no light escapes a denser medium, and it derives a medium's refractive index from the speed of light inside it. Because these calculations are the geometric backbone of imaging, the natural companion tools are the Lens Equation Calculator for thin lenses and mirrors, and the Wave Speed Calculator for the frequency-wavelength side of the same wave.
The calculator has three modes, all working in degrees for angles and dimensionless numbers for refractive index.
Example 1 — air into water. Light reaches the surface at 45° from the normal. Enter an index of 1 for air, 45 for the angle of incidence, and 1.33 for water. The refraction angle comes back at 32.118°, so the ray bends 12.882° toward the normal. This is the everyday case: entering a denser medium slows the light down and pulls the ray inward, and the critical angle result is blank because it does not apply when the second medium is denser.
Example 2 — glass into air, past the limit. Change the first index to 1.5 and the second to 1, and keep the incidence angle at 50°. Nothing is transmitted: the calculator reports Total internal reflection - no refracted ray. The reason is visible in the critical angle field, which reads 41.810°. Any angle larger than that cannot refract out of glass into air, because the required sine would exceed 1.
Example 3 — the critical angle directly. Switch to Critical angle, enter 1.5 for glass and 1 for air. You get 41.810° and a sine of 0.6667. This is the number that sets the acceptance angle of an optical fibre: as long as light inside the core strikes the cladding at more than this angle, it stays trapped and the signal travels for kilometres.
Example 4 — index from speed. Switch to Refractive index and enter the speed of light in a medium, for example 225,000,000 m/s. The calculator divides the vacuum speed by it and returns an index of 1.3324, which is water to three decimals. The second result, speed relative to vacuum, is 0.7505 — the light travels at 75% of c inside that medium.
Working Example 1 by hand. Take the sine of the incidence angle first: sin 45° is 0.7071. Multiply by the first index, 1, which leaves 0.7071. Divide by the second index, 1.33, to get 0.5317. Then take the arcsine, and 0.5317 corresponds to 32.12°. The deviation is the difference between the two angles, 12.88°. If you ever get a number larger than 90° out of that last step, you have taken a sine greater than 1, which physically means the ray cannot leave the first medium — that is the total internal reflection case the calculator reports explicitly.
Snell's law relates the angles on both sides of an interface to the refractive indices of the two media:
The angle is always measured from the normal, the line perpendicular to the surface, not from the surface itself. That single convention causes most of the wrong answers people get by hand: 45° measured from the water surface is 45° from the surface, which is an incidence angle of 45° from the normal only by coincidence.
Solving for the transmitted angle makes the direction of the bend explicit:
If n2 is larger than n1, the ratio is smaller than 1, the sine decreases, and the ray bends toward the normal. If n2 is smaller, the ray bends away — and once the argument of the arcsine exceeds 1 there is no real angle to return. That limit is the critical angle, obtained by setting the transmitted angle to 90°:
The critical angle only exists when light travels from the denser medium to the less dense one. The calculator states that condition explicitly rather than returning a mathematical artefact.
The index itself is a ratio of speeds, which is why the third mode can invert the calculation:
with c the speed of light in vacuum. A medium's index is not a constant of nature: it varies with wavelength, which is why a prism separates white light into colours. The value you enter is the index at the wavelength you care about.
One everyday consequence is worth doing with numbers. Looking straight down into water, the bottom appears shallower than it is, by the ratio of the two indices:
so a pool that is really 2.0 m deep appears about 1.50 m deep from directly above, with the light travelling out of water only. Look in at an angle and the apparent position shifts sideways as well, which is the same refraction that makes the straw look broken.
The numbers below are typical values at visible wavelengths. They move between sources because index depends on wavelength, temperature and, for glasses, on the exact composition.
| Vacuum | 1.0000 | 299,792 | Reference; light cannot go faster |
| Air | 1.0003 | 299,703 | Close enough to 1 for most textbook work |
| Water | 1.333 | 224,900 | The standard "straw in a glass" example |
| Acrylic | 1.49 | 201,200 | Common plastic optics |
| Crown glass | 1.52 | 197,230 | Typical window and lens glass |
| Flint glass | 1.66 | 180,598 | Higher index, stronger bending |
| Diamond | 2.42 | 123,881 | The critical angle is only 24.4° |
Read the table as a ranking of bending power. Going from air into diamond bends a ray almost three times as much as going into water at the same incidence angle, and the critical angle falls with it: diamond's 24.4° is why a cut stone sends light back out through the crown rather than letting it leak through the pavilion.
- Measure from the normal. If your protractor gives the angle from the surface, subtract it from 90° before entering it. This is the single most common source of wrong refraction angles.
- Round the index, not the angle. Indices are usually good to three decimals; entering 1.33 instead of 1.333 moves the refracted angle by about 0.06° at 45°, which is harmless. Rounding the incidence angle to whole degrees is what hurts.
- Use the right direction. Snell's law is reversible: the same equation gives the angle on the other side, but the critical angle only exists when light goes from the higher index to the lower one.
- Treat total internal reflection as a result, not an error. A blank transmitted angle past
θcmeans the light is reflected entirely; that is the operating principle of optical fibres and of many prisms in binoculars. - Check the wavelength assumption. Glass indices quoted for 589 nm (sodium light) differ from those at 400 or 700 nm by a few percent. For colour-critical work, look up the index at your wavelength in a database rather than using a textbook average.
- Convert speeds carefully. The index mode expects metres per second, so a value quoted as 2.25×10⁸ must be entered as 225000000.
- Watch the grazing-ray case. Near 89° incidence the ray skims the surface and the transmitted angle sits close to its own limit. Those inputs are mathematically valid but very sensitive: a fraction of a degree in incidence can move the result by several degrees, so do not read precision into the last digits.
The formula assumes plane waves, flat interfaces and isotropic media. A curved surface — a raindrop, a lens, the cornea — changes the local normal across the beam, so the ray path must be traced point by point; the same law applies at every point, but a single calculation no longer describes the whole path. Anisotropic crystals split one ray into two, which needs a tensor description rather than a single index.
The index is treated as a constant, but real materials disperse. That approximation is invisible at a single wavelength and wrong across a spectrum, which is why prisms and rainbows are not described accurately by one number. Temperature and pressure matter too, especially in gases: air's index changes by about 3×10⁻⁵ over a 30 °C swing, enough to bend a survey line over a hot road.
Finally, the model ignores absorption and scattering. A medium can have a well-defined index and still swallow the light before it emerges; index tells you where the ray goes, not how much of it arrives.
- ❓ What does Snell's law actually state?
- ✅ That the product of the refractive index and the sine of the angle from the normal is the same on both sides of an interface: n1 sin(theta1) equals n2 sin(theta2).
- ❓ Why is the angle measured from the normal and not the surface?
- ✅ Because the normal is the direction in which the light's speed changes, so the bending is symmetric around it. Measuring from the surface makes the same physics produce awkward complementary angles.
- ❓ What is the critical angle?
- ✅ The incidence angle at which the refracted ray would travel exactly along the interface. Beyond it, no light refracts out and the ray is reflected entirely, a condition called total internal reflection.
- ❓ Why does the critical angle only exist in one direction?
- ✅ It requires n1 greater than n2, meaning light starts in the denser medium. Going the other way the sine of the transmitted angle is always below 1, so a real transmitted ray always exists.
- ❓ What is the refractive index of water?
- ✅ About 1.333 at visible wavelengths. That makes the light speed inside water roughly 225,000 km/s, and the critical angle for water into air about 48.6 degrees.
- ❓ How do fibre optics use this?
- ✅ The core has a slightly higher index than the cladding, so light inside the core strikes the boundary at a shallow angle and undergoes total internal reflection, staying trapped for the length of the cable.
- ❓ Why does a prism split white light?
- ✅ Because the index depends on wavelength. Blue light has a higher index in glass than red, so it bends more, and the different colours leave the prism at different angles.
- ❓ Does Snell's law work for sound and water waves?
- ✅ Yes, with the wave speeds in place of the indices: the ratio of the sines equals the ratio of the speeds. The geometry is the same; only the physical meaning of the constant changes.
- ❓ What happens at exactly the critical angle?
- ✅ The refracted ray skims along the interface at 90 degrees from the normal, and its intensity goes to zero. In practice any slight roughness makes the transition a gradual fade rather than a sharp cutoff.
- ❓ Can the refractive index be less than 1?
- ✅ Not for ordinary transparent materials, since that would mean light travelling faster than in vacuum. Metamaterials and plasmas can show effective indices below 1 for specific frequencies, but that is a different regime.
- ❓ Why does the straw look bent rather than shifted?
- ✅ Each point on the submerged part emits light that refracts at the surface, and your eye extrapolates those rays backward in straight lines. The result is a displaced image of the submerged section, with the join at the waterline.
References
- [1]OpenStax. (2020). College Physics 2e, Section 25.3: The Law of Refraction. Retrieved from openstax.org
- [2]Nave, C. R. (n.d.). Snell's Law. HyperPhysics, Georgia State University. Retrieved from hyperphysics.phy-astr.gsu.edu
- [3]The Physics Classroom. (n.d.). Refraction and the Ray Model of Light. Retrieved from physicsclassroom.com
- [4]Wikipedia. (n.d.). Snell's law. Retrieved from en.wikipedia.org
- [5]Wikipedia. (n.d.). Total internal reflection. Retrieved from en.wikipedia.org
- [6]Polyanskiy, M. N. (n.d.). Refractive index database. Retrieved from refractiveindex.info
Last updated: October 19, 2026
UnByte — Independent Software Engineering
Every calculator references authoritative sources — Editorial policy
