Snell’s Law Calculator

Use this Snell’s law calculator to find a missing refraction angle or refractive index, with an angle helper that fixes the common normal-vs-surface mixup. It also flags total internal reflection (TIR) and shows the critical angle when that situation is possible.

Advanced options
Presets (approximate)
Other angle (only needed in some modes)
Display and extra outputs
Did we solve your problem today?

How to use our Snell's Law Calculator

  1. Pick the unknown in Solve for (theta2, theta1, n1, or n2).
  2. Set Angles measured from: choose Normal if your angle is measured from the perpendicular line, or Surface if your angle is measured from the surface itself (the calculator converts using 90 deg minus your surface angle).
  3. Choose Angle unit (degrees or radians). Enter every angle in that same unit.
  4. Enter the known refractive index value(s) (n1 and/or n2). If you are solving for one of them, that input will hide so you do not accidentally use it.
  5. Enter the known angle(s): theta1 is the incident angle in medium 1; theta2 (in Advanced options) is only needed in modes that use it.
  6. Optional: In Advanced options, use the medium presets to fill n1 or n2 faster, and choose a Number display format if you want scientific notation.
  7. Click Calculate.
  8. Sanity-check: if light goes from lower n to higher n (example: air to water), the refracted angle from the normal should be smaller than the incident angle; also the two numbers in Snell's law check should match closely unless TIR is reported.

Definitions

Snell's law: The refraction rule n1*sin(θ1) = n2*sin(θ2), where angles are measured from the normal. [2]

Incident angle (θ1): The incoming ray angle in medium 1, measured from the normal (unless you choose Surface as your input reference).

Refraction angle (θ2): The bent ray angle in medium 2, measured from the normal (unless you choose Surface as your input reference).

Normal: The imaginary line perpendicular to the surface. Snell's law uses angles from this line. [2]

Angle from surface: An angle measured from the surface instead of the normal. Convert using θ_normal = 90 deg - θ_surface (or θ_normal = (π/2) - θ_surface in radians).

Refractive index (n): A unitless number that describes how light travels in a material; larger n means light travels slower in that material (in the usual classroom model). [2]

Total internal reflection (TIR): When refraction cannot happen, so there is no real value for θ2. It can only happen when light tries to go from higher n to lower n, and the incident angle is above the critical angle. [2]

Critical angle (θ_c): The incident angle (from the normal) that is right at the boundary between refraction and TIR when n1 > n2. [2]


Methodology

What this calculator does: It applies Snell's law at a flat boundary between two media and solves for the quantity you choose. Any entered angles are first converted to angles from the normal (because that is the definition used in Snell's law). [2]

1) Convert angles to the normal reference (if needed)

If your problem gives angles from the surface, the calculator converts them before using trig.

θ_normal = (π/2) - θ_surface

Angle limits: the entered angle must be between 0 and 90 degrees (or between 0 and π/2 radians). The calculator shows an error if you are outside that range.

2) Use Snell's law (computed with normal-based angles)

n1*sin(θ1) = n2*sin(θ2)

The calculator converts degrees to radians internally for sin and asin, then converts back to your selected unit for display.

3) Solve formulas by mode

θ2 = asin((n1/n2)*sin(θ1))

θ1 = asin((n2/n1)*sin(θ2))

n2 = n1*sin(θ1)/sin(θ2)

n1 = n2*sin(θ2)/sin(θ1)

Divide-by-zero handling: when solving for n1 or n2, if the known angle makes the denominator sin(angle) equal to 0, the calculator stops and tells you the inputs do not provide enough information (for example, straight-on incidence can make many n values possible).

4) Total internal reflection (TIR) and critical angle

TIR can only happen when n1 > n2. In that case, the critical angle (from the normal) is:

θ_c = asin(n2/n1)

When solving for θ2, the calculator first computes s = (n1/n2)*sin(θ1). If s > 1 (outside the asin domain), there is no real refraction angle, so the calculator reports TIR and shows θ2 as N/A. [2]

5) Extra insights (optional)

If you enable extra insights, the calculator shows simple ratios that follow from the common relation v = c/n (speed v in a medium vs refractive index n):

v2/v1 = n1/n2

λ2/λ1 = n1/n2

6) Snell's law check output

The tool prints both sides of Snell's law using the normal-based angles: n1*sin(θ1) and n2*sin(θ2). If refraction is possible, they should match closely (small differences can happen from rounding).

Mini-example (degrees)

Given n1 = 1.0003 (air), n2 = 1.333 (water), and θ1 = 30 deg from the normal, solve for θ2.

sin(θ2) = (n1/n2)*sin(30 deg) = (1.0003/1.333)*0.5 = 0.3752

θ2 = asin(0.3752) = 22.04 deg

Assumptions and limits

This is the standard classroom model for refraction at a flat boundary. Real refractive index can vary with wavelength and conditions (air in particular is close to, but not exactly, 1.0000), so your textbook or lab values may differ slightly. [1][2]


Sources