# Diffraction Grating Calculator

**Light is weird**: if you shine a beam on a material covered in finely spaced apertures, it spreads out at specific angles in a phenomenon called **diffraction**: learn more with our **diffraction grating calculator**.

Here you will learn:

- What is diffraction;
- What is a diffraction grating;
- What happens when a light beam shines on a diffraction grating;
- The formula of a diffraction grating: how to calculate the diffraction angles.

## What is diffraction

Diffraction is a physical phenomenon that occurs in the presence of **periodic**, **wave-like** motions. Under a purely classical analysis, diffraction arises when a wavefront meets a small opening. The opening becomes a secondary propagation point, from which circular waves expand outward.

If you open more than a slit near the other, the newly formed **wavefronts* can **interfere**, thus reinforcing or dampening each other. We owe this explanation of diffraction to the Huygens-Fresnel principle.

The story is slightly different when it comes to **light** since it behaves both as a wave (carrying ) and as a particle (carrying ). We need to introduce **diffraction gratings**.

## Diffraction gratings

A diffraction grating is a material covered in regularly spaced multiple small slits. The dimensions involved are **micrometric** or even **nanometric**, that's a requirement depending on the characteristic scale of visible light.

When a light beam meets a diffraction grating, the oscillatory nature of photons causes the beam to change direction. The behavior in the presence of multiple slits resembles one of "conventional" waves (like the ones in the ocean).

Diffraction gratings can be reflective (acting as mirrors) or transmissive (acting as lenses). It may sound unlikely, but you can easily find examples of both in everyday life. CDs are good reflective gratings/ Shine a light on them, and they will iridesce, point a laser and you'll see the characteristic pattern. Feathers are transmissive gratings: the phenomenon was first observed thanks to them.

A monochromatic light ray incident on a diffraction grating creates a characteristic **interference pattern**. As said, each slit in the grating acts as a new propagation point: from there the light creates circular, concentric wavefronts. If we consider the **optical path** of the light from each slit, we can intuitively think that there will be **angles** at which the diffracted beams will meet when they are in the same **phase**. This situation corresponds to **constructive interference**. If the beams are entirely out of phase at the intersection, we have **destructive interference**. These two situations correspond, respectively, to bright and dark spots on a screen placed behind the grating. A similar phenomenon occurs in anti-reflective coating: learn more at our thin-film interference calculator.

But how do we calculate the directions at which these spots originate? We need to learn how to find the diffraction angle.

🙋 The oscillatory nature of light was proven by an experiment involving interference after the diffraction of a light beam by a double slit diffraction grating: we are talking of the famous **Young experiment**.

## How to calculate the diffraction angles in a diffraction grating

Our diffraction grating calculator implements the equation to calculate the diffraction angle. Suppose we shine a monochromatic beam with **wavelength** $\lambda$ perpendicular to a diffraction grating with spacing $d$. In that case, we find that the angles at which we find constructive interference are given by the equation:

Where:

- $m$ is any non-negative integer; and
- $\theta_{\text{m}}$ is the m
^{th}angle in the diffraction pattern.

🙋 If we take $m=0$, we would have **zero-order diffraction**, with the spot being the brightest of the diffraction pattern and subject to no diffraction.

Let's learn how to find the diffraction angles in the more general situation of a **non-perpendicular** incident beam.

Assuming that the beam hits the diffraction grating with angle $\theta_{\text{i}}$ we can calculate the diffraction grating pattern angles with the following formula:

This is the formula we implemented in our diffraction grating calculator. We will calculate the first **five orders** of the diffracted beam, neglecting the trivial order zero. Let's check an example.

Take a laserbeam with $\lambda =650\ \text{nm}$, and point it **perpendicularly** on a CD. The distance between tracks on a compact disk is $1.6\ \text{μm}$. Let's calculate the angle of diffraction for $m = 1,\ 2,\ 3,\ 4,\ 5$:

Higher orders yield **complex values**, and we are not interested in them.

## Non-monochromatic beams shining on diffraction gratings

If a **non-monochromatic** (**continuous**) light beam shines on a diffraction grating, the various wavelength will deviate at different angles following the formula above. The result is a separation of the colors, with the characteristic emergence of **iridescence**. Try it with a CD!