The Snell's law calculator above works out the direction a light ray takes when it crosses a boundary between two materials, and it treats total internal reflection as a proper outcome rather than an error. That distinction is the reason this page exists. When the geometry makes refraction impossible, the arithmetic asks for the inverse sine of a number greater than one, and a badly written calculator returns nothing usable. What actually happens physically is that the entire beam reflects back into the first medium, and that is what this tool reports.
Arb Digital builds free calculators that handle their edge cases deliberately. Alongside the refraction angle you get the critical angle for the pair of materials, the speed of light in each medium, and the fraction of the beam that reflects at the surface — which is never zero, even when refraction proceeds normally.
What This Snell's Law Calculator Does
You choose the two materials, or type their refractive indices directly, and set the angle at which the ray meets the boundary. The headline result is the angle of refraction in the second medium, measured from the normal, or a clear statement of total internal reflection when the ray cannot cross at all.
The grid gives four supporting numbers. The critical angle is the incidence angle beyond which total internal reflection begins; it exists only when the second medium has the lower index, and the tool says so plainly when it does not. The two light speeds show what refractive index physically means — it is the factor by which light is slowed. The reflected fraction is the Fresnel reflectance for unpolarised light, which tells you how much of the beam bounces off rather than crossing.
The material list is drawn from standard values at the sodium D line, around 589 nm. Both index fields remain editable so you can enter a value for a wavelength or a material that is not on the list.
How to Use It
- Set the starting medium first. The order matters enormously. Air into glass and glass into air are different problems with different behaviour, and only one of them can produce total internal reflection.
- Pick the second medium or type its index. Selecting from the menu fills the numeric field; editing the field directly overrides it, so an unusual material or a non-visible wavelength is easy to enter.
- Enter the angle of incidence from the normal. This is measured from the perpendicular to the surface, not from the surface. A ray arriving at a grazing angle has an incidence angle near 90 degrees, not near zero.
- Check the critical angle before trusting a large incidence angle. If your angle exceeds it, no refracted ray exists and the result changes character entirely.
- Read the reflected fraction. Even at normal incidence into glass, around 4 per cent of the beam reflects. That is why uncoated lenses have visible surface reflections and why coatings exist.
The Formula: How Snell's Law Works
Snell's law states that n1 sin θ1 = n2 sin θ2, where both angles are measured from the normal to the surface. Solving for the refraction angle gives θ2 = arcsin(n1 sin θ1 ÷ n2).
The refractive index itself is defined as n = c ÷ v, the ratio of the speed of light in vacuum to its speed in the material. OpenStax University Physics Volume 3, section 1.3 on refraction, gives that definition along with the table of standard values used in the material menu here, and notes that the index is always at least one because light never travels faster in matter than it does in vacuum.
Work the defaults through. Light going from air, index 1.0003, into water, index 1.333, at 45 degrees: sin 45° = 0.7071, so sin θ2 = 1.0003 × 0.7071 ÷ 1.333 = 0.5306, and θ2 = 32.05 degrees. The ray bends toward the normal, which is always what happens when light enters a denser medium.
The light speeds follow directly: 2.998 × 108 m/s in air and 2.249 × 108 m/s in water. The Fresnel reflectance for unpolarised light at this angle works out at about 2.8 per cent, so roughly 97 per cent of the beam crosses into the water and the rest reflects off the surface.
Total Internal Reflection Is an Outcome, Not an Error
When light travels from a denser medium into a thinner one — glass to air, water to air — the refracted ray bends away from the normal. Increase the angle of incidence and the refracted ray swings ever closer to the surface itself. At one particular angle it lies exactly along the surface, and beyond that there is no direction it can go. Every photon reflects back into the first medium.
That angle is the critical angle, θc = arcsin(n2 ÷ n1), valid only when n1 is greater than n2. OpenStax University Physics Volume 3, section 1.4 on total internal reflection, derives it from Snell's law by setting the refraction angle to 90 degrees.
For water to air the critical angle is 48.6 degrees. Sit underwater and look up: everything above the surface is compressed into a cone of that half-angle directly overhead, and outside that cone the surface acts as a mirror showing you the bottom of the pool. For crown glass to air it is 41.1 degrees, which is why a 45-degree prism reflects perfectly without any silvering. For diamond to air it is only 24.4 degrees, which is why cut diamonds trap light so effectively and return it through the top.
Optical fibre is the same effect put to work. Light entering at a shallow enough angle to the fibre axis strikes the core-cladding boundary beyond the critical angle at every bounce, and so travels kilometres with almost no loss through the wall. Nothing is coated or mirrored; the geometry alone does it.
Reflection Happens Even When Refraction Works
A point most treatments skip: refraction and reflection are not alternatives. At every boundary some of the light reflects and some crosses, and the split depends on the angle and on the two indices.
At normal incidence the reflectance is ((n1 − n2) ÷ (n1 + n2))2. For air to crown glass that is about 4.3 per cent per surface. A simple lens has two surfaces, so it loses over 8 per cent of the light before any absorption, and a camera lens with ten elements would lose most of the image to surface reflections if it were left uncoated. That is precisely why anti-reflection coatings were developed.
Reflectance rises steeply as the incidence angle approaches grazing, which is why a lake looks transparent when you stand over it and mirror-like when you look across it at a shallow angle. The reflected fraction in the grid uses the Fresnel equations averaged over the two polarisation states, which is the correct treatment for ordinary unpolarised light.
Refractive Index Depends on Wavelength
The values in the material menu are quoted at the sodium D line near 589 nm, which is the standard reference wavelength. Index is not constant across the spectrum: it is larger for blue light than for red in ordinary transparent materials, so blue bends more at every boundary.
That variation is dispersion, and it is what splits white light into a spectrum in a prism and what produces a rainbow from spherical raindrops. For crown glass the index runs from about 1.514 in the red to about 1.528 in the violet — a difference of under one per cent that is nevertheless enough to separate colours visibly over a few centimetres of glass.
The practical consequence for this calculator is that if you are working at a specific wavelength rather than in white light, look up the index at that wavelength and type it in rather than using the menu. If you need to convert between wavelength and frequency for that lookup, the wavelength calculator handles it, and the photon energy calculator converts either into an energy.
Where This Sits Next to Our Other Optics Tools
This page handles a single flat boundary between two media. It gives you the direction of one ray. It does not trace that ray through a curved surface or form an image, which is a different calculation: the thin lens equation calculator takes object distance and focal length and returns image position and magnification for a lens as a whole.
For the trigonometry underneath Snell's law, the unit circle calculator shows how the sine behaves across the range and why an argument above one has no solution. If your angle arrived in radians or gradians, the angle converter puts it into degrees first. And since refractive index is fundamentally about the speed of light in a medium, the Doppler effect calculator covers the other way a medium and a motion change what an observer sees.
Arb Digital builds free tools like this one because useful pages earn attention. If you want tools, calculators or content built for your own audience, we can help.
Browse All Free Tools Talk to Arb DigitalCommon Mistakes to Avoid
- Measuring the angle from the surface — both angles in Snell's law are measured from the normal, the perpendicular. A ray 10 degrees off the surface has an incidence angle of 80 degrees.
- Swapping the two media — air into glass and glass into air give different answers, and only the second can produce total internal reflection.
- Treating an impossible arcsine as a bug — when the argument exceeds one there is no refracted ray. That is total internal reflection, a real physical result, not a numerical failure.
- Assuming all the light crosses — around 4 per cent reflects at every air-to-glass surface even at normal incidence, and far more at grazing angles.
- Using one index for all colours — index depends on wavelength. The listed values are for yellow light near 589 nm, and blue light bends measurably more.
Related Free Tools From Arb Digital
Move from a single surface to a whole lens with the thin lens equation calculator. Look up the wavelength you need with the wavelength calculator and convert it to an energy with the photon energy calculator. For the trigonometry behind the critical angle use the unit circle calculator, and to change angle units first use the angle converter. For how motion rather than a medium changes light, see the Doppler effect calculator. Everything Arb Digital publishes is listed at the free online tools hub.
Frequently Asked Questions
Total internal reflection happens. The equation asks for the inverse sine of a number greater than one, which means no refracted ray can exist, so the entire beam reflects back into the first medium. It is a real physical outcome and this calculator reports it as one rather than returning an error.
Only when light travels from a medium of higher refractive index into one of lower index, and only when the angle of incidence exceeds the critical angle. Going from air into glass or water it can never happen at any angle.
It is the inverse sine of the second index divided by the first, valid only when the first index is larger. It comes from setting the refraction angle to 90 degrees in Snell's law. For water to air it is 48.6 degrees, for crown glass to air 41.1 degrees and for diamond to air 24.4 degrees.
From the normal, which is the line perpendicular to the surface at the point where the ray meets it. This is the most common mistake with Snell's law. A ray skimming along close to the surface has an incidence angle near 90 degrees, not near zero.
No. Some of it always reflects. At normal incidence from air into crown glass about 4.3 per cent reflects, and the fraction rises steeply as the angle approaches grazing. That is why uncoated lenses show surface reflections and why anti-reflection coatings exist.
Because the response of the material to the oscillating field of the light wave depends on frequency. In ordinary transparent materials the index is higher for blue than for red, so blue bends more. That effect is called dispersion and it is what makes a prism split white light.
Light entering the core at a shallow enough angle strikes the boundary with the surrounding cladding beyond the critical angle at every bounce, so it reflects completely each time. Nothing is mirrored or coated; the difference in refractive index between core and cladding does all the work.
This tool is provided for educational and study use. It models a single flat boundary between two non-absorbing, non-magnetic media at one wavelength, so it does not account for dispersion, absorption, surface coatings or scattering.