Toolvito

Works on this device

Grating Equation Calculator

A diffraction grating splits light into orders that leave at set angles. The grating equation, m λ = d (sin α + sin β), links the wavelength, the line spacing and the angles. Find the angles of every order, a wavelength, or the grating a design needs.

Enter your values

Every diffraction order that a wavelength makes with a grating, and its angle: m λ = d (sin α + sin β).

Your values

The number printed on the grating, such as 300, 600 or 1200 lines/mm.

From the grating normal (the line at right angles to the grating). 0 means the light meets the grating straight on.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose Calculate.

How to use this calculator

  1. Choose a task: the angles of every order, the wavelength from a measured angle, the line spacing for a design, or the resolving power.
  2. Give the grating as lines per millimetre, per centimetre or per inch, or as its line spacing d.
  3. Enter the wavelength and the angles. Angles are measured from the grating normal. Leave the angle of incidence at 0 when the light meets the grating straight on.
  4. Choose Calculate. The table lists each order that exists with its angle.

The formulas

  • Grating equation: m λ = d (sin α + sin β). At normal incidence: d sin β = m λ.
  • Line spacing: d = 1 mm ÷ (lines per mm).
  • Orders that exist: |m λ ÷ d − sin α| ≤ 1. At normal incidence the highest order is the whole number part of d ÷ λ.
  • Angular dispersion: dβ/dλ = m ÷ (d cos β).
  • Resolving power: R = λ ÷ Δλ = |m| × N, with N the number of lines lit.
  • Signs: α and β are positive on the same side of the grating normal (the convention of the Diffraction Grating Handbook).

Worked examples

Angles. Green laser light of 532 nm meets a grating of 600 lines/mm straight on. d = 1 ÷ 600 mm = 1.6667 µm. First order: sin β = 0.532 ÷ 1.6667 = 0.3192, so β = 18.61°. Second order: 39.67°. Third order: 73.26°. The highest order is 3, because 1.6667 ÷ 0.532 = 3.13.

Wavelength. With the same grating, a line of light at 18.61° in the first order has λ = 1666.67 nm × sin 18.61° = 531.87 nm.

Design. To send 532 nm to 30° in the first order: d = 532 nm ÷ sin 30° = 1064 nm, which is 939.85 lines/mm.

Resolving power. 10 mm of a 600 lines/mm grating holds 6000 lines. In the first order R = 6000, so at 589 nm it separates lines 589 ÷ 6000 = 0.0982 nm apart.

Limits you should know

  • The grating equation gives the directions only. How bright each order is depends on the shape of the lines (the blaze) and is not worked out here.
  • The resolving power is the limit of the grating. A real spectrometer is often limited more by its slit, optics and detector.
  • For one or two slits see the Double Slit Calculator and the Single Slit Diffraction Calculator.

Related tools