n1 · sinθ1 = n2 · sinθ2θ2 = arcsin(n1·sinθ1 / n2)  ·  critical angle θ_c = arcsin(n2 / n1) when n1 > n2

Snell's law: when light crosses between two media, the angle it makes with the normal changes so that the index times the sine of the angle is conserved — n1sinθ1 = n2sinθ2. This free calculator takes the two refractive indices and the angle of incidence, returns the refraction angle θ2 with a live ray diagram, and flags the critical angle and total internal reflection when they apply.

How to calculate the angle of refraction

Light bends when it crosses between media of different optical density because its speed changes — the slowdown is set by the refractive index through n = c/v, and the larger the index, the more sharply the ray turns. Snell's law captures this exactly: the refractive index of each medium multiplied by the sine of the angle that the ray makes with the normal is the same on both sides of the boundary — n1·sinθ1 = n2·sinθ2. Rearranged for the unknown, the refraction angle is θ2 = arcsin(n1·sinθ1 / n2).

There are three steps. First, set the two media: the index n1 of the medium the light starts in and n2 of the medium it enters, either by typing a value or picking a preset (vacuum/air 1.00, water 1.33, glass 1.50, diamond 2.42). Second, enter the angle of incidence θ1, measured from the normal in degrees. Third, read the answer — the refraction angle θ2 with the working substituted in, the critical angle where it applies, and a ray diagram showing the incident and refracted rays. When light enters a denser medium (n2 > n1) it bends toward the normal; entering a rarer medium it bends away.

One behaviour deserves special attention. When light travels from a denser to a rarer medium (n1 > n2), there is a critical angle θ_c = arcsin(n2/n1) beyond which no refracted ray can exist — the light is reflected entirely back into the denser medium. This total internal reflection is the principle behind fibre optics, where light is trapped inside a glass thread and guided over kilometres with almost no loss. The calculator detects this case and tells you the critical angle rather than returning an impossible refraction angle.

Refraction never works in isolation. The same bending that turns a single ray here is what forms images in lenses and mirrors, and the index that drives it is set by how fast light moves in the material — see the refractive index calculator, or the broader wave speed relationship. To look up a term, try the physics glossary.

Worked example

A ray passes from air (n1 = 1.00) into glass (n2 = 1.50) at an angle of incidence θ1 = 30°. Applying Snell's law, sinθ2 = n1·sinθ1 / n2 = 1.00 × sin30° / 1.50 = 0.5 / 1.50 = 0.333, so θ2 = arcsin(0.333) = 19.5°. The ray bends toward the normal, as expected when entering a denser medium. Reverse the journey — glass (1.50) into air (1.00) — and a critical angle appears: θ_c = arcsin(1.00 / 1.50) = 41.8°. Strike the surface from inside the glass at any angle greater than 41.8° and the ray is totally internally reflected, never escaping into the air.

Why it matters

Snell's law underpins the design of lenses, cameras and eyeglasses, prisms and spectrometers, and the fibre-optic cables that carry the internet by total internal reflection. It explains everyday sights too — a straw that looks bent in a glass of water, the shimmer of a mirage on a hot road, and the splitting of sunlight into a rainbow as different colours refract by slightly different amounts.

Frequently asked questions

What is Snell's law?

Snell's law of refraction states n1sinθ1 = n2sinθ2: when light crosses the boundary between two transparent media, the product of the refractive index and the sine of the angle to the normal is conserved. Rearranged, the refraction angle is θ2 = arcsin(n1sinθ1 / n2). It explains why a ray bends toward the normal when entering a denser medium and away from it when entering a rarer one.

What does the refractive index mean?

The refractive index n is the ratio of the speed of light in a vacuum to its speed in the medium, n = c/v, so a higher index means light travels more slowly and bends more sharply. Vacuum and air are about 1.00, water 1.33, ordinary glass 1.50 and diamond 2.42. Because light slows on entering a denser medium, the ray turns toward the normal.

What is the critical angle and total internal reflection?

When light passes from a denser medium to a rarer one (n1 > n2), there is a critical angle θ_c = arcsin(n2/n1) at which the refracted ray grazes along the surface at 90°. Beyond it no light escapes — it all reflects back inside. This total internal reflection is how optical fibres trap light and how prisms in binoculars and periscopes bend a beam without loss.

How does the calculator measure angles?

All angles are measured from the normal — the line drawn perpendicular to the boundary at the point where the ray strikes — not from the surface itself. An angle of incidence of 0° means the ray hits straight on and passes through undeviated; larger angles mean a more glancing strike and a larger bend.

Does Snell's law depend on wavelength?

Slightly. The refractive index of a real material varies a little with the colour of light, so blue light bends marginally more than red — this dispersion is what splits white light into a spectrum in a prism or a raindrop to make a rainbow. The calculator uses a single index per medium, which is an excellent approximation for monochromatic light or everyday calculations.

References & formula source

  • Hecht — Optics, Chapter 4 (The Propagation of Light: Reflection and Refraction).
  • Young & Freedman — University Physics with Modern Physics, §33.2 (Reflection and Refraction at a Plane Surface).
  • Halliday, Resnick & Walker — Fundamentals of Physics, Chapter 33 (Electromagnetic Waves: Refraction and Total Internal Reflection).
  • Further reading: Snell's law — Wikipedia

Embed this calculator

Add this free Snell's Law calculator to your own website — copy the snippet below.