numvana

Diffraction Grating Calculator

Find the angle at which a diffraction grating sends a given order of light, d·sin(θm) = m·λ, from the grating's lines-per-millimeter rating, the light's wavelength, and the order number.

Grating spacing (d)
1,666.7 nm
Diffraction angle (θm)
18.615°
Highest order that exists for this setup
3

How it works

A diffraction grating is a surface ruled with many closely and evenly spaced lines; light passing each line interferes with light from its neighbors, reinforcing only at angles where the extra path length between adjacent lines, d·sin(θ), is an exact whole number of wavelengths — the grating equation d·sin(θm) = m·λ. Here d, the spacing between lines, is derived from the grating's lines-per-millimeter rating (the figure a real grating's datasheet actually publishes) as d = 1,000,000 ÷ linesPerMm, converting to nanometers to match the wavelength's usual scale.

Solving for the angle gives θm = arcsin(m·λ/d), which only has a real solution while m·λ/d stays at or below 1 — beyond that, the requested order simply doesn't exist for that grating and wavelength. This calculator also reports the highest order that does exist, floor(d/λ), so you can see at a glance how many diffracted beams a given setup actually produces.

FAQ

Why does a finer grating (more lines per mm) produce a bigger angle?

More lines per millimeter means a smaller spacing d between them, and since the grating equation is m·λ = d·sin(θ), a smaller d needs a larger sin(θ) — and therefore a larger angle — to make the same order's path-length condition work out. This is why spectrometers built for fine wavelength separation use gratings with very high line densities.

Why does the order number matter for how many beams I see?

Each integer order m (1, 2, 3, ...) satisfies the grating equation at its own distinct angle, so a single grating under one wavelength of light produces several diffracted beams at once, spreading out further from the straight-through direction as m increases — up to whichever order first pushes m·λ/d past 1, beyond which no further orders exist.

Related calculators