Diffraction Grating Calculator Formula

Understand the math behind the diffraction grating calculator. Each variable explained with a worked example.

Formulas Used

Diffraction Angle

angle = asin(order * wavelength / slit_spacing) * 180 / pi

Variables

VariableDescriptionDefault
slit_spacingSlit Spacing (d)(nm)1667
orderDiffraction Order (m)1
wavelengthWavelength(nm)550

How It Works

Diffraction Grating

A diffraction grating splits light into its component wavelengths at specific angles.

Formula

d * sin(theta) = m * lambda

where d is the slit spacing, m is the diffraction order (1, 2, 3, ...), and lambda is the wavelength. The slit spacing d = 1/(lines per unit length).

Worked Example

First-order diffraction of 550 nm light through a 600 lines/mm grating (d = 1667 nm).

slit_spacing = 1667order = 1wavelength = 550
  1. 01d * sin(theta) = m * lambda
  2. 021667 * sin(theta) = 1 * 550
  3. 03sin(theta) = 550/1667 = 0.3299
  4. 04theta = 19.26°

Ready to run the numbers?

Open Diffraction Grating Calculator