Skip to content
LoveToCalc

Definition — what does that mean?

The diffraction grating equation

A grating is thousands of slits side by side. It sends each colour off at its own angle, which is how a spectrometer reads light.

In Swedish: Gitterekvationen

Diffraction grating equation

The relation

d sin(θ)=mλ

The angle at which a diffraction grating sends light of a given order — the same condition as a double slit, sharpened into narrow lines by hundreds of slits instead of two, which is what makes a grating useful for reading off a spectrum.

Light passes through a grating, a barrier with many narrow slits a distance d apart (four are drawn), and falls on a screen to the right. A dashed line runs straight ahead from the middle; θ is the angle from it to the direction of a bright maximum, the one of order m.
Solve for
Solved for θ

θ=arcsin(mλd)

θ≈18.6146°

θ is approximately the arcsine of (((1 times 5.32 times 10 to the power of minus 7) divided by 1.667 times 10 to the power of minus 6)), is approximately the arcsine of ((5.32 times 10 to the power of minus 7 divided by 1.667 times 10 to the power of minus 6)), equals the arcsine of (0.3192), is approximately 18.6146 degrees °

Working4 steps

The formula

d is the grating spacing, the distance between neighbouring slits, θ the angle from the straight-through direction, m the order, 0, 1, 2 …, and λ the wavelength.

Holds when the light falls on the grating at right angles.

It is the same condition as for two slits: light from neighbouring slits arrives in step when the path difference is a whole number of wavelengths. With thousands of slits instead of two, every slit has to agree, so the bright maxima become thin, sharp lines.

Worked examples

The spacing from lines per millimetre. Gratings are sold by line density. 600 lines/mm means d = 1 mm / 600 ≈ 1,667 nm.

A red laser, 633 nm. First order: sin θ = 633 / 1,667 ≈ 0.380, so θ ≈ 22.3°. Second order: sin θ ≈ 0.760, θ ≈ 49.4°.

How many orders? sin θ can be at most 1, so m ≤ d / λ = 2.6. Only orders 1 and 2 exist on each side, plus the central spot.

White light. In first order, violet at 400 nm leaves at 13.9° and red at 700 nm at 24.8°: a full spectrum spread over about 11°.

Common mistakes

Questions people ask

Why does a CD show a rainbow? Its tracks are about 1.6 µm apart, very close to the grating above, so the disc acts as a reflection grating and spreads white light into colours.

How is it different from a prism? A prism bends blue more than red; a grating sends red further out than blue. And a grating’s angles follow exactly from d and λ, which is why it is used to measure wavelengths.

Looking for another letter? The formula solved for each one
Solved for each letter
Solve forRearrangedWith the numbersComes to
dmλsin(θ)1·5.32 × 10⁻⁷sin(18.6146°)1.667 × 10⁻⁶ m
md sin(θ)λ1.667 × 10⁻⁶ sin(18.6146°)5.32 × 10⁻⁷1
λd sin(θ)m1.667 × 10⁻⁶ sin(18.6146°)15.32 × 10⁻⁷ m
θarcsin(mλd)arcsin(1·5.32 × 10⁻⁷1.667 × 10⁻⁶)18.6146°

Last reviewed October 6, 2026 ·How pages are reviewed

Waves and opticsAll formulas

Put this formula on your site

Copy the code into your page where the formula card should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.