Skip to content
Omnikalc

Diffraction grating calculator: angles, orders and resolving power

Enter the lines per millimeter, the wavelength and the illuminated width to get the angle of each order and the resolving power of the grating.

Updated on
Your inputs

Value out of range

Value out of range

mm

Value out of range

Results

Angle of the first order

19.27 °

Three or more orders appear on each side of the central maximum
Angle of the second order (0 if it does not exist)
41.30 °
Angle of the third order (0 if it does not exist)
81.89 °
Highest order that exists on each side
3
Spacing between lines
1.667 μm
Resolving power (order × lines illuminated)
6,000
Smallest wavelength difference resolved
0.092 nm

A diffraction grating spreads light into its colors using many fine lines. This calculator applies the grating equation to give the angles of the bright orders, the number of orders that exist and the resolving power of the grating.

How the calculation works

  • Line spacing d = 1 mm ÷ lines per millimeter
  • Grating equation: d × sin θ = m × λ, so θ = arcsin(m × λ ÷ d)
  • Highest order = the largest whole number m with m × λ ≤ d
  • Resolving power = order × number of lines illuminated
  • Smallest resolved difference Δλ = λ ÷ resolving power

Example

A grating of 600 lines/mm has a spacing of 1.667 μm. Green light of 550 nm appears at 19.27° in the first order, 41.30° in the second and 81.89° in the third, and there are no more. With 10 mm illuminated, 6,000 lines are used, so the first-order resolving power is 6,000 and the grating separates wavelengths 0.092 nm apart.

Why it matters

Gratings are the core of spectrometers, from school demonstrations to telescopes, and they explain the rainbow on the surface of a CD or DVD, whose tracks act as a grating. Knowing the angles lets you design the instrument, and the resolving power tells you whether it can separate two nearby lines, such as the sodium doublet.

Good to know

The equation is for light that hits the grating at a right angle. At other angles, the term d × sin of the incidence angle is added. The orders overlap for different wavelengths, so a second-order red may land on a third-order blue. Real gratings concentrate the light in one order by their groove shape (blaze). This tool is for education.

In practice

Try the same grating with red light at 700 nm and blue light at 450 nm: the red is bent farther than the blue, the opposite of a prism. A laser pointer and a CD, with about 625 lines per millimeter, make a simple test: measure the angle of the spots on a wall, then compare the wavelength you compute with the one printed on the pointer.

The wavelength calculator converts between frequency and wavelength, the refraction calculator applies Snell’s law, and the Malus’s law calculator handles polarized light.

Frequently asked questions

What is a diffraction grating?

It is a surface with many parallel, equally spaced lines that splits light into its wavelengths. Each wavelength is sent to angles where the waves from all lines add up, given by the grating equation d × sin θ = m × λ.

What is the order m?

The integer m labels the bright directions: m = 0 is the straight-through beam, m = 1 the first diffracted beam on each side, and so on. An order exists only if m × λ ÷ d is not above 1.

How is a grating better than a prism?

A grating spreads the colors in proportion to the wavelength and with more dispersion at higher orders, and its resolving power depends on the number of lines illuminated. A prism spreads blue more than red and has lower resolution.

What does the resolving power mean?

It is the ratio λ ÷ Δλ, where Δλ is the smallest difference between two wavelengths that you can still tell apart. It equals the order times the number of lines illuminated, so a wide, finely ruled grating resolves closely spaced lines.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.