In this guide 5 sections
The diffraction grating equation relates wavelength, groove spacing and diffraction angle. Begin by declaring the geometry: equations with different angle-sign conventions can look different while describing the same physics. The simplest useful example is a beam arriving perpendicular to a grating in air.
Normal-incidence geometry
Draw the grating surface as a line and its normal as a perpendicular line through the illuminated point. The incoming beam follows that normal. Measure the outgoing angle θ from the same normal; assign opposite sides opposite signs.
mλ = d sin θ, where m is an integer diffraction order, λ is wavelength, and d is the spacing between adjacent grooves. Use the same length unit for λ and d. The zero order, m = 0, is undispersed in this ideal geometry.
Work an example with units
A grating with 600 grooves/mm has d = 1/600 mm = 0.001667 mm = 1,667 nm. At λ = 500 nm in first order, sin θ = 500/1,667 ≈ 0.300, so θ ≈ 17.5°. In second order the same wavelength gives sin θ ≈ 0.600 and θ ≈ 36.9°.
If an equation requires |sin θ| greater than one, that order does not propagate in this ideal arrangement. More grooves per millimeter mean smaller d and usually greater angular separation for the same wavelength and order; they do not guarantee that the complete instrument has better resolution or efficiency.
Solve for an unknown wavelength
Rearrange the normal-incidence equation to λ = d sin θ/m. For the same grating and a measured first-order angle of 20°, λ ≈ 1,667 × sin 20° ≈ 570 nm. Angular measurement error and uncertainty in the actual groove spacing propagate into the wavelength estimate.
Why orders overlap
The equation depends on the product mλ. First-order 600 nm and second-order 300 nm therefore leave at the same angle in this geometry. An order-sorting filter or cross-disperser can be needed to distinguish contributions. A bright feature at one detector position is not automatically a unique wavelength.
Oblique incidence and real instruments
A frequently used reflection-grating convention writes mλ = d(sin α + sin β), with signed incidence and diffraction angles measured from the grating normal. Other ray-direction conventions produce a difference of sines. Use the diagram and convention in the MKS/Newport grating handbook rather than mixing definitions from two sources.
The equation predicts directions, not how much power enters an order. Groove profile, wavelength, polarization, coatings and illumination affect efficiency. Slit width, aberrations and detector sampling also constrain usable resolution. Continue with our spectroscopy workflow to connect the angle calculation with a calibrated measurement.