Snell'S Law Calculator
Use Snell's law to find the refraction angle between two media from refractive indices and incident angle. Helpful for ray tracing in optics.
Snell'S Law Calculator
Result will appear here...
What the Snell's law calculator does
When light crosses from one material into another, it bends. This calculator uses Snell's law to find the angle of that bend, taking the refractive indices of the two media and the angle at which the light arrives, and giving the angle at which it continues. Presets cover common materials from air and water to glass and diamond.
Below is what refraction is, the equation behind it, which way light bends, and a worked example.
How to use it
- Choose the two media from the presets, or enter their refractive indices directly.
- Enter the angle of incidence, measured from the line perpendicular to the surface.
- Press Calculate for the angle of refraction, or Reset to clear it.
What refraction is
Refraction is the bending of light as it passes from one transparent material into another. The cause is a change in speed: light travels at different speeds in different media, slower in water or glass than in air, and when a wave slows down or speeds up at a boundary, its direction shifts. The effect is everywhere once you look for it. A straw in a glass of water appears bent at the surface, a swimming pool looks shallower than it is, and a lens focuses light precisely by refracting it.
Snell's law is the precise rule governing this bending. It relates the angle at which light strikes a surface to the angle at which it leaves, through the refractive indices of the two materials, which measure how much each slows light down. With it, you can trace exactly how a ray will bend at any interface, which is the foundation of designing lenses, prisms, and every optical instrument. This calculator applies that rule.
The equation it uses
Snell's law relates the angles and refractive indices on the two sides of the boundary:
n₁ sinθ₁ = n₂ sinθ₂
Here n₁ and n₂ are the refractive indices of the first and second media, θ₁ is the angle of incidence, and θ₂ is the angle of refraction, both measured from the normal, the line perpendicular to the surface. To find the refracted angle, the calculator rearranges this to θ₂ = arcsin(n₁ sinθ₁ ÷ n₂). The product of refractive index and the sine of the angle stays the same across the boundary, which is the heart of the law.
Which way light bends
The direction of the bend depends on which medium is denser optically, meaning which has the higher refractive index. When light passes into a denser medium, from air into water or glass, it slows down and bends toward the normal, so the refracted ray is steeper than the incoming one. When it passes into a less dense medium, from water back into air, it speeds up and bends away from the normal.
This simple rule explains the familiar distortions of everyday optics. The straw looks bent because light from its underwater part leaves the water and bends away from the normal on its way to your eye, shifting where the straw appears to be. The pool looks shallow for the same reason. The greater the difference in refractive index between the two media, the sharper the bend, which is why light bends far more entering diamond than entering water, since diamond slows light dramatically.
Total internal reflection
Something special happens when light tries to pass from a denser medium into a less dense one at a steep enough angle. As the angle of incidence increases, the refracted ray bends ever further from the normal, until at a certain critical angle it would bend so far that it cannot leave at all. Beyond that angle, the light is reflected entirely back into the denser medium, an effect called total internal reflection.
This is not a flaw but a hugely useful phenomenon. It is what makes optical fibres work, trapping light inside a thin glass strand so it can carry signals for kilometres with little loss, the backbone of modern internet and telephone networks. It is also why diamonds sparkle so brilliantly, as light bounces around inside before escaping. When you ask the calculator for a refraction from a dense medium into a thinner one at a large angle, and it cannot return a valid angle, that is total internal reflection at work: the light has nowhere to refract to, and is reflected instead.
Units and precision
The calculator takes the refractive indices as plain numbers, with presets carrying the standard values for vacuum, air, water, ethanol, ice, acrylic, glass, and diamond, and it accepts the angle in degrees, radians, and several other angular units. The refraction angle is returned in your chosen unit. The relationship is exact for the ray directions, and the results carry several significant figures.
A worked example
Suppose light travels from air, with a refractive index of about 1.0003, into water, with an index of 1.333, striking the surface at 30 degrees from the normal.
Snell's law gives θ₂ = arcsin(1.0003 × sin 30° ÷ 1.333) ≈ 22 degrees. The light bends toward the normal, from 30 degrees down to 22, because it has entered a denser medium and slowed down. Going the other way, from water into air, the same pair of angles would apply in reverse, and beyond about 48.6 degrees inside the water, the light would be totally internally reflected.
Questions people ask
What is Snell's law?
The rule for how light bends at a boundary, n₁ sinθ₁ = n₂ sinθ₂, relating the angles of incidence and refraction through the refractive indices of the two media.
Why does light bend when entering water?
Because it slows down. Light travels more slowly in water than in air, and that change in speed at the surface shifts its direction, bending it toward the normal as it enters the denser medium.
What is total internal reflection?
When light hits the boundary from a denser medium at a steep enough angle, it cannot refract out and is reflected entirely back. This effect makes optical fibres work and helps diamonds sparkle.
Why does a straw look bent in water?
Because light from the submerged part bends as it leaves the water, shifting where the straw appears to be. The break you see at the surface is refraction changing the apparent position.
References
A quick note on where the physics comes from. Snell's law and refraction are standard optics, set out in OpenStax's University Physics and in Georgia State University's HyperPhysics. Refractive index values follow standard optical references. The HyperPhysics link is worth a quick click to confirm it lands where you expect.
- OpenStax, University Physics Volume 3, Section 1.4, Refraction. https://openstax.org/books/university-physics-volume-3/pages/1-4-refraction
- HyperPhysics, Refraction of Light and Snell's Law. http://hyperphysics.phy-astr.gsu.edu/hbase/geoopt/refr.html
- HyperPhysics, Index of Refraction values. http://hyperphysics.phy-astr.gsu.edu/hbase/Tables/indrf.html
Bibek Lal Karna is a PhD student and graduate teaching assistant at the University of Mississippi, with deep interests in theoretical and gravitational physics. He is also the founder of NRCC and is strongly engaged in scientific teaching and communication. At Eon Tools, he reviews physics tools.