Snell's Law Calculator Formula

Understand the math behind the snell's law calculator. Each variable explained with a worked example.

Formulas Used

Angle of Refraction

theta2 = asin(n1 * sin(theta1 * pi / 180) / n2) * 180 / pi

Variables

VariableDescriptionDefault
n1Refractive Index 11
theta1Angle of Incidence(°)30
n2Refractive Index 21.5

How It Works

Snell's Law

Snell's law describes how light bends when passing between media with different refractive indices.

Formula

n1 * sin(theta1) = n2 * sin(theta2)

Light bends toward the normal when entering a denser medium (higher n) and away from the normal when entering a less dense medium.

Worked Example

Light enters glass (n=1.5) from air (n=1) at 30 degrees.

n1 = 1theta1 = 30n2 = 1.5
  1. 01n1*sin(theta1) = n2*sin(theta2)
  2. 021*sin(30°) = 1.5*sin(theta2)
  3. 030.5 = 1.5*sin(theta2)
  4. 04sin(theta2) = 0.333
  5. 05theta2 = 19.47°

Frequently Asked Questions

What is the refractive index?

The ratio of the speed of light in vacuum to the speed of light in the material. Air: ~1.0003, water: 1.33, glass: 1.5, diamond: 2.42.

What causes a rainbow?

Sunlight refracts when entering water droplets, disperses by wavelength (Snell's law gives different angles for different colors), and refracts again on exit.

What happens when light goes from dense to less dense?

The refracted angle is larger than the incident angle. Above a critical angle, total internal reflection occurs.

Learn More

Guide

Understanding Optics and Lenses

A complete guide to optics and lenses. Learn about refraction, Snell's law, converging and diverging lenses, the thin lens equation, magnification, mirrors, and optical instruments.

Ready to run the numbers?

Open Snell's Law Calculator