Tilt a CD or DVD under a desk lamp and a band of color sweeps across its surface. The disc is not painted; it is a spiral of microscopic pits, packed so tightly that they act on light the way a finely ruled scientific instrument does. Each wavelength of white light leaves the surface at its own angle, and your eye sees the result fanned out as a rainbow.
That is a diffraction grating at work. The same principle that decorates a CD is the engine inside spectrometers that identify chemical elements, tune lasers, and read the composition of distant stars. This article explains how a grating spreads light, how to compute the angles, and where the analysis goes wrong.
Why this calculation matters
A prism also splits white light, but a grating does it with far more control and far more precision. Because the spreading depends on a countable number โ the spacing between lines โ a grating can be designed to send a chosen wavelength to a chosen angle. That predictability is what makes it the heart of the spectrometer.
Spectroscopy underpins a remarkable range of work. Astronomers read a star's chemistry and velocity from the dark lines in its spectrum. Chemists identify unknown compounds by the wavelengths they absorb. Telecommunications engineers use gratings to combine and separate the many wavelengths sharing a single optical fiber. In every case the first task is the same: given the grating and the light, predict the angle at which each wavelength emerges. Get that wrong and a spectral line lands on the wrong detector pixel, and the measurement is meaningless.
The core formula
A diffraction grating is a surface ruled with a large number of equally spaced, parallel lines. When light passes through or reflects off it, each line acts as a source of secondary waves. Those waves interfere, and they reinforce each other only in specific directions โ the directions where waves from neighboring lines arrive exactly in step.
The condition for that reinforcement is the grating equation:
d * sin(theta) = m * lambda
Here d is the spacing between adjacent lines, theta is the angle of the diffracted beam measured from the grating normal, lambda is the wavelength, and m is the diffraction order โ an integer 0, 1, 2, and so on (and their negatives).
The physics behind the equation is straightforward. The quantity d*sin(theta) is the extra path one wave travels compared with the wave from the next line. When that extra path equals a whole number of wavelengths, the waves add constructively and a bright beam appears. Order m = 0 sends every wavelength straight through together. Orders m = 1, 2 and beyond peel each wavelength off at its own angle, and that angle grows with wavelength โ which is why red light bends further than blue in a given order.
Grating spacing is often quoted as a line density, in lines per millimetre. The spacing is simply its reciprocal:
d = 1 / (lines per millimetre)
Two practical consequences follow. First, a finer grating โ more lines per millimetre, smaller d โ spreads the spectrum more widely. Second, only orders that keep sin(theta) at or below 1 actually exist; high orders for long wavelengths simply have nowhere to go.
A worked example
Take a diffraction grating ruled with 600 lines per millimetre, illuminated by green light of wavelength lambda = 550 nm. Find the angle of the first-order beam.
Step 1 โ find the slit spacing. The grating has 600 lines per millimetre, so the spacing is the reciprocal:
d = 1 / 600 mm = 1.667e-3 mm = 1.667e-6 m
Step 2 โ apply the grating equation for the first order. Set m = 1:
d * sin(theta) = m * lambda
sin(theta) = (m * lambda) / d
sin(theta) = (1 * 550e-9 m) / 1.667e-6 m
sin(theta) = 0.330
Step 3 โ take the inverse sine.
theta = arcsin(0.330) = 19.3 degrees
The first-order green beam leaves the grating at 19.3 degrees from the normal. Repeat the calculation for red light at 700 nm and the angle grows; do it for blue at 450 nm and it shrinks. Each wavelength leaves at its own angle, and that fanning out of angles is precisely how a grating turns a beam of white light into a spread spectrum.
Common mistakes
Confusing line density with spacing. The grating equation needs d, the distance between lines, not the number of lines per millimetre. Forgetting to take the reciprocal โ and to convert millimetres to metres โ is the single most common slip.
Measuring the angle from the surface. As with refraction, theta is measured from the grating normal, not from the plane of the grating. The two differ by 90 degrees.
Assuming every order exists. The equation only has a solution when m*lambda/d is at most 1. Ask for an order that pushes that ratio past 1 and there is no diffracted beam โ the order is simply absent.
Treating a grating like a prism. A prism bends blue light most; a grating, in a given order, bends red light most. The dispersion runs the opposite way, so spectra from the two instruments are mirror images.
Forgetting that orders overlap. At higher orders, the long-wavelength end of one order can fall at the same angle as the short-wavelength end of the next. In real spectrometers this overlap has to be filtered out, or two different wavelengths get read as one.
Try the interactive NovaSolver calculator
Computing one diffraction angle is quick; getting a feel for how spacing, wavelength, and order interact is easier to do by watching it. The Diffraction Grating Simulator on NovaSolver lets you set the grating spacing, wavelength, incident angle, and number of slits, then returns the diffraction angle, the angular dispersion, the resolving power, and the smallest wavelength difference the grating can separate โ with a table of every order and an animated white-light dispersion to show the spectrum forming.
Related calculators
- Single-Slit Diffraction โ the simpler case of one aperture, useful for understanding the envelope that shapes a grating's pattern.
- Diffraction Calculator โ for general wave-spreading problems beyond the regular grating geometry.
- Bragg Diffraction โ the same interference idea applied to crystal planes and X-rays.
You can browse the rest in the optics tools hub.
Closing note
The diffraction grating is a small piece of precision engineering with an outsized reach: it takes a beam of mixed light and lays its wavelengths out in order, ready to be measured. The whole behaviour comes from one equation, d*sin(theta) = m*lambda, and one idea โ waves from many evenly spaced sources reinforce only where their paths differ by a whole wavelength. Keep the spacing, the order, and the angle reference straight, and a grating becomes one of the most dependable instruments in optics.
United States
NORTH AMERICA
Related News
Secret Claude Tracker Shocks Users After Anthropic's Anti-Surveillance Stance
12h ago
EV Batteries Defy Expectations, Last Hundreds of Thousands of Miles
1d ago
GBase 8a Performance Anomaly Case Study: How a Single Parameter Change Sparked a Chain Reaction
1d ago
Who Else Has Inherited a Codebase With Zero Comments and a Prayer?
1d ago
ๅฎ็พ็ๅนณๅบธ
4h ago