**Snell's law** is the simple formula used to calculate the refraction of light when travelling between two media of differing refractive index. Named for its discoverer, Dutch mathematician Willebrord van Roijen Snell (1580-1626).

In the diagram above, two media of refractive indices *n*_{1} (on the left) and *n*_{2} (on the right) meet at a surface or interface (vertical line). *n*_{2} > *n*_{1}, and light has a slower phase velocity within the second medium.

A light ray **PO** in the leftmost medium strikes the interface at the point **O**. From point **O**, we project a straight line at right angles to the line of the interface; this is known as the normal to the surface (horizontal line). The angle between the normal and the light ray **PO** is known as the *angle of incidence*, θ_{1}.

The ray continues through the interface into the medium on the right; this is shown as the ray **OQ**. The angle with which is makes to the normal is known of as the *angle of refraction*, θ_{2}.

**Snell's law** gives the relation between the angles θ_{1} and θ_{2}:

*n*_{1}sin (θ_{1}) =*n*_{2}sin(θ_{2}).

The above is also valid for light going from a dense to a less dense medium; the symmetry of Snell's law shows that the same raypaths are applicable in opposite direction.

A qualitative rule for determining the direction of refraction is that the ray in the denser medium is always closer to the normal. A handy way to remember this is to visualize the ray as a car crossing the boundary between asphalt (the less dense medium) and mud (the denser medium). Depending on the angle, either the left wheel or the right wheel of the car will cross into the new medium first, causing the car to swerve.

When moving from a dense to a less dense medium (i.e. *n*_{1}>*n*_{2}), it is easily verified that the above equation has no solution when θ_{1} exceeds a value known as the ** critical angle**:

- θ
_{crit}= arcsin (*n*_{2}/*n*_{1}) .

Snell's law may be derived from Fermat's principle, which states that the light travels the path which takes the least time. By taking the derivative of the optical path length the stationary point is found giving the path taken by the light. In a classic analogy by Feynman, the area of lower refractive index is replaced by a beach, the area of higher refractive index by the sea, and the fastest way for a rescuer on the beach to get to a drowning person in the sea is to run along a path that follows Snell's law.

See also Fresnel equations.