About the Snell's Law Calculator
This calculator finds the angle at which light bends when it crosses from one transparent material into another, using Snell's Law. It is built for optics students, lens designers, and anyone working through problems involving lenses, prisms, or fiber optics, where knowing the exact refraction angle matters. Because the relationship between the two materials' refractive indices determines whether light refracts at all, the calculator also flags cases where no refraction is possible.
How It Works
You enter the refractive index of the material light starts in, the refractive index of the material it enters, and the angle of incidence in degrees, measured from the normal. The calculator converts the incidence angle to radians, computes the sine of the refraction angle from Snell's Law, and converts back to degrees. If that computed sine value would need to exceed 1, which is mathematically impossible, the calculator reports total internal reflection instead of an angle.
Formula & Methodology
By hand, convert the incidence angle to radians, take its sine, and multiply by the first material's refractive index. Divide that product by the second material's refractive index to get sin(angle2). If the result is between -1 and 1, take the arcsine and convert back to degrees for the refraction angle. If the magnitude of that result exceeds 1, no real angle satisfies the equation, meaning the light reflects entirely rather than refracting.
Examples
Air into water
Light traveling from air, n1 = 1.0, into water, n2 = 1.33, at a 30 degree angle of incidence refracts to about 22.1 degrees from the normal, bending toward the normal because water is the denser medium.
Glass into air past the critical angle
Light traveling from glass, n1 = 1.5, into air, n2 = 1.0, at a 45 degree angle of incidence exceeds glass's critical angle of about 41.8 degrees, so the calculator reports total internal reflection rather than a refraction angle.
Advantages
- Automatically detects and reports total internal reflection instead of returning an invalid or undefined angle when the physics makes refraction impossible.
- Handles the degree-to-radian conversion internally, so you can work entirely in degrees, the unit most textbooks and lab reports use.
- Applies to any pair of transparent materials, not just a fixed air-to-glass or air-to-water case, by letting you set both refractive indices directly.
Common Mistakes
- Forgetting that going from a denser to a less dense medium, like glass to air, can trigger total internal reflection at steep angles, and being surprised when no angle is returned.
- Entering the angle of incidence measured from the surface rather than from the normal, which is the convention Snell's Law and this calculator use.
- Swapping n1 and n2, which reverses the direction of the light path and produces an incorrect refraction angle for the intended scenario.
Edge Cases to Watch For
- If sin(angle2) computes to a magnitude greater than 1, which happens when light travels from a denser to a less dense medium at a steep enough incidence angle, the calculator reports total internal reflection instead of a numeric angle.
- Both refractive indices must be greater than zero; the calculator returns an error otherwise, since a zero or negative index has no physical meaning.
- The incidence angle field is capped at 89.9 degrees in the input, avoiding the physically extreme case of light traveling exactly parallel to the surface.
Common Use Cases
- Optics students working through Snell's Law problems for lenses, prisms, and refraction labs.
- Engineers designing fiber optic systems, where staying above the critical angle is what keeps light confined inside the fiber.
- Photographers and lens designers reasoning about how light bends when passing through glass or water interfaces.