Diffraction Grating Calculator

Find the diffraction angle of a grating.

How it is calculated

A grating sends light of wavelength λ to angles satisfying m λ = d sin θ. The line spacing is found from the density: d = 106 / N nanometres, where N is the number of lines per millimetre and λ is in nanometres. The tool then returns θ = arcsin(m λ / d) in degrees, with two decimals, measured from the straight-through direction.

The order m is rounded to a whole number of at least 1. If m λ / d is greater than 1, that order does not exist for this grating and no result is shown, so higher orders may vanish for coarse gratings or long wavelengths. The formula assumes light striking the grating at right angles.

Worked example

Wavelength 589 nm, 600 lines/mm, first order. d = 1,000,000 / 600 = 1666.7 nm. sin θ = 1 × 589 / 1666.7 = 0.3534. θ = arcsin(0.3534) ≈ 20.70°. The tool shows 20.70°.

Try this example →

Common mistakes

  • Entering the wavelength in metres or micrometres; the field expects nanometres (green light is about 500 nm).
  • Entering lines per metre or per centimetre instead of lines per millimetre.
  • Entering the line spacing instead of the line density; they are reciprocals.
  • Asking for a high order and being surprised there is no answer: when the sine would exceed 1, that order does not appear.

About this calculator

This calculator applies the diffraction grating equation, mλ = d·sinθ, to find the angle at which light of wavelength λ constructively interferes after passing through a grating with line spacing d, for a given diffraction order m (m=1 being the first bright fringe off the central beam). Rearranged as θ = arcsin(mλ/d), it shows that closer-spaced lines (higher line density) or longer wavelengths bend light through a larger angle.

Physics students verifying spectroscopy lab results, optical engineers designing spectrometers or monochromators, and astronomers calibrating instruments that split starlight into spectra to identify chemical composition use this.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    There is a quick way to see how many orders your setup has: the highest usable order is the largest whole number not above d ÷ λ. For 600 lines/mm and 589 nm, d is about 1,667 nm, so only orders 1 and 2 exist, at 20.70 and 44.98 degrees, and order 3 returns nothing. Angles assume light hitting the grating head-on. Which grating and wavelength are you working with?

Popular calculators

All Calculators