Refraction angle, critical angle, and total internal reflection — worked out from two indices and one angle.

n1 sin(theta1) = n2 sin(theta2). Angles are measured from the normal; the calculator flags total internal reflection automatically.

How it works

A free optics calculator for students and the curious, covering refraction and total internal reflection.

Snell's law refraction calculator

Find the refracted angle, or check for total internal reflection.

About this Snell's law calculator

Light does not travel in a straight line when it crosses from one transparent material into another. It bends, and the amount of bending is not a matter of opinion: it follows Snell's law, one of the most reliable rules in all of optics. A Snell's law calculator takes the two refractive indices and the angle at which the ray arrives, and returns the angle at which it leaves, or tells you honestly when no refracted ray exists at all. That second case matters just as much as the first, because it is the physics behind fibre-optic cables, the sparkle of a diamond, and the way a swimming pool looks shallower than it really is. Whether you are a student checking homework, a photographer thinking about a lens, or simply curious about why a straw looks broken in a glass of water, this is the calculation at the heart of it.

Snell's law itself is beautifully compact: n1 times sin(theta1) equals n2 times sin(theta2), where n1 and n2 are the refractive indices of the two media and the angles are measured from the normal, the imaginary line perpendicular to the surface. The refractive index is just a number describing how much slower light travels in a material than in a vacuum: air is about 1.00, water about 1.33, and ordinary glass about 1.52. When light enters a denser medium it bends towards the normal, and when it leaves a denser medium it bends away from it. Rearranging the law gives the refracted angle directly, which is exactly what this calculator does, including the important edge case where the required sine exceeds one and no solution exists.

Using the tool follows the same order as the physics. Enter the refractive index of the medium the light starts in, then the medium it enters, then the incident angle in degrees, measured from the normal rather than from the surface itself, which is the most common source of errors. The preset buttons cover the classic pairings, air to water, air to glass, and the reverse directions that produce total internal reflection, so you can explore the behaviour before typing your own numbers. Results show the refracted angle, the amount of bending, and whether the ray bent towards or away from the normal, and each calculation is added to a short history so you can compare several pairings without losing track.

Consider the textbook example in detail. Light travels from air, with an index of 1.00, into water, with an index of 1.33, arriving at 30 degrees from the normal. Snell's law gives sin(theta2) equal to sin(30 degrees) divided by 1.33, which is 0.5 divided by 1.33, or about 0.3759. Taking the inverse sine gives a refracted angle of about 22.08 degrees, so the ray bends about 7.92 degrees towards the normal, exactly as expected when entering a denser medium. Running the same numbers in reverse, from water into air at 30 degrees, gives a refracted angle of about 41.68 degrees, bending away from the normal, and the asymmetry between the two directions is a good reminder that refraction is not simply reversible in angle, even though the underlying law is.

Total internal reflection deserves its own explanation, because it is where refraction stops and something more dramatic begins. When light travels from a denser medium towards a rarer one, the refracted angle grows faster than the incident angle, and beyond a certain critical angle there is no refracted ray at all: all the light reflects back inside. For water to air, that critical angle is about 48.75 degrees, which you get from the inverse sine of 1 divided by 1.33. This calculator detects that case automatically and reports the critical angle alongside your incident angle, rather than failing silently or inventing an impossible angle. Fibre-optic networks depend on this effect, trapping light inside thin glass strands over kilometres, and it is also why a diamond's cut matters so much: well-cut facets keep light bouncing inside until it returns to your eye.

The same law explains a long list of everyday observations that otherwise look like separate mysteries. A pool looks shallower than it is because rays from the bottom bend away from the normal as they leave the water, making the bottom appear raised. A straw in a glass looks kinked at the surface because your eye follows the bent rays back in straight lines. Mirages on hot roads happen because air near the hot surface has a slightly lower refractive index than the cooler air above, bending light gradually until it appears to come from the road itself. Lenses, from reading glasses to camera objectives to the lens in your eye, are all shaped pieces of glass whose curved surfaces apply Snell's law twice, once on entry and once on exit, to bring rays to a focus. Even rainbows are refraction plus reflection, as sunlight bends entering a raindrop, reflects inside, and bends again leaving, splitting into colours because the index depends slightly on wavelength.

A few practical tips will keep your results honest. Always measure angles from the normal, not from the surface: an angle of 30 degrees to the surface is 60 degrees to the normal, and mixing them up is the single most common refraction error. Remember that refractive indices vary slightly with wavelength and temperature, so textbook values like 1.33 for water are excellent approximations rather than exact constants. Check that your incident angle is below 90 degrees, since a ray travelling parallel to the surface is a limiting case, not a normal refraction problem. And when the tool reports total internal reflection, treat that as a real physical answer, not an error: it is telling you something true and useful about the boundary you described, and it is the starting point for understanding prisms, optical fibres, and the glitter of gemstones.

A second worked example in the reverse direction shows why the critical angle matters in practice. Light travelling inside glass, with an index of 1.52, towards air has a critical angle of the inverse sine of 1 divided by 1.52, which is about 41.14 degrees. A ray arriving at 30 degrees refracts out at about 48.61 degrees, bending sharply away from the normal, while a ray arriving at 45 degrees cannot escape at all and reflects entirely inside the glass. Prism designers use exactly this boundary: a 45-degree prism face reflects light internally with essentially no loss, which is why prisms, rather than mirrors, are used inside binoculars and periscopes, where every percent of reflected light matters for a bright image.

The law itself is named for the Dutch astronomer Willebrord Snellius, who discovered the relationship experimentally around 1621, though it had been glimpsed earlier by the Persian scholar Ibn Sahl in the tenth century and was later published in a different form by Descartes. Snell's original formulation used ratios of lengths rather than sines, which is equivalent but less convenient, and the sine form became standard as trigonometry matured. The deeper reason the law holds was only understood much later, when Fermat showed that light follows the path of least time, bending at a boundary precisely because it travels slower in the denser medium. That principle, that nature is economical with time, connects refraction to the whole of modern optics, from lens design to the mirages that shimmer above summer roads.

Frequently asked questions

What is Snell's law?

n1 sin(theta1) = n2 sin(theta2). It relates the angles of a light ray on either side of a boundary to the refractive indices of the two media.

Are angles measured from the surface or the normal?

From the normal, the line perpendicular to the surface. Measuring from the surface is the most common refraction mistake.

What is total internal reflection?

When light in a denser medium hits the boundary above the critical angle, no light refracts out: it all reflects back inside. It needs the light to travel from denser to rarer medium.

What is the critical angle for water to air?

About 48.75 degrees, from arcsin(1 / 1.33). Above that angle, light in water cannot escape into air.

Why does a straw look bent in water?

Rays from the submerged part bend as they leave the water, so your eye, following them back in straight lines, sees the straw in the wrong place at the surface.

What are typical refractive indices?

Air about 1.00, water about 1.33, ordinary glass about 1.52, diamond about 2.42. Values vary slightly with wavelength and temperature.