Diffraction Grating Calculator
Calculate the diffraction angle for different orders of light through a diffraction grating.
Find wavelength separation and angular dispersion.
A diffraction grating splits light into its component wavelengths. The grating equation gives the angles at which constructive interference occurs:
mλ = d sin(θ) d = 1/N (where N = lines per mm)
Where:
- m = Diffraction order (0, ±1, ±2, …)
- λ = Wavelength (m)
- d = Grating spacing = slit-to-slit distance (m)
- θ = Diffraction angle
- N = Number of lines per mm
Angular dispersion: dθ/dλ = m / (d cos(θ)), which is how much the angle changes per unit wavelength
Resolving power: R = mN_total, which is how well the grating separates closely spaced wavelengths
Diffraction gratings vs. prisms:
| Property | Prism | Grating |
|---|---|---|
| Dispersion mechanism | Refraction | Diffraction |
| Visible spectrum | Blue bends most | Red diffracts most (1st order) |
| Multiple orders | No | Yes |
| Common use | Decoration | Spectroscopy |
Applications:
- Spectroscopy: Gratings are the heart of spectrometers in chemistry, astronomy, and environmental monitoring
- Astronomy: Spectrographs on telescopes use gratings to measure stellar composition and redshift
- CDs and DVDs: The closely spaced tracks (d ≈ 1.6 μm) act as a reflection grating, producing rainbow colors
- Laser wavelength selection: Tunable lasers use gratings to select specific wavelengths
How many orders can you actually see
The grating equation has a hard ceiling, because sin(θ) cannot exceed 1. Rearranged, the highest visible order is whatever m keeps mλ below d. A 600 lines/mm grating has d = 1,667 nm, so at 550 nm green you get m = 1, 2 and 3, and there is no fourth order at any angle. Push the line count up to 1,800 per mm and d falls to 556 nm, which is barely more than the wavelength itself: now only the first order exists. That is a real design trade, not a curiosity. Finer gratings disperse more strongly but throw away the higher orders that give a spectrometer its resolving power.
Where the orders overlap
Second-order violet at 400 nm and first-order deep red at 800 nm come off the grating at the same angle, since 2 × 400 = 1 × 800. Any spectrometer working over more than an octave has to deal with this, usually with a coloured blocking filter that kills the short wavelengths before they reach the detector. Miss that and you get a perfectly convincing spectral line that is not there.
A note on the numbers you enter
Gratings are sold by lines per millimetre, typically 300, 600, 1200 or 1800 for laboratory work. The calculator converts to the spacing d for you, because that is what the equation actually uses. Watch the units: 600 lines per mm means d = 1/600 mm, which is 1.667 micrometres, not 600 of anything.
How we build and check this calculator
This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.
SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.