Home / Optics & Photonics / Wave Optics / Diffraction Grating Equation

Formula & Calculator

Diffraction Grating Equation

A diffraction grating is a surface with thousands of tiny parallel lines. When light passes through it, each line acts like a tiny source, and the waves interfere with each other. At certain angles, the waves add up brightly (constructive interference). This equation tells you those angles based on the spacing between lines, the wavelength of light, and the order of the bright spot. It is used in spectrometers to split light into its colours and identify materials by their spectra.

Optics Wave Optics Diffraction

Diffraction Grating Calculator d·sinθ = m·λ

d · sin θ = m · λ
d = grating spacing (m)  ·  θ = diffraction angle (°)  ·  m = order (integer)  ·  λ = wavelength (m)
⟹ Solve ⟷ d, θ, m, λ
m
°
—
m
Please fix the errors above.
Solve for:
Presets:
Grating spacing (d) —
—
d: — θ: — m: — λ: —
✓ Copied!
Diffraction Pattern —
Constructive peaks Orders
d·sinθ = m·λ  ·  Constructive interference occurs when the path difference between adjacent slits is an integer multiple of the wavelength.

Variables

Symbol Quantity Unit
d Grating spacing m
θ Diffraction angle
m Order number
λ Wavelength m

What it means

The diffraction grating equation gives the angles at which light of wavelength λ will constructively interfere when passing through a grating with slit spacing d. The integer m is the order of the spectrum. Gratings are used in spectrometers to disperse light into its component wavelengths, enabling chemical analysis, astronomical spectroscopy, and wavelength measurements. The equation applies to reflection and transmission gratings. It is also used in optical communications to select wavelengths. Understanding this equation is essential for spectroscopists and optical engineers to design instruments with high resolution and to interpret spectra.

Worked example

Diffraction Grating Equation – Two Detailed Examples

Real‑World
Scenario: A diffraction grating with 1000 lines/mm (d = 1.00×10⁻⁶ m) is illuminated with a laser of wavelength 500 nm. The first‑order bright spot (m = 1) appears at angle θ. The spectroscopist uses d sinθ = mλ to find sinθ = 500×10⁻⁹ / 1.00×10⁻⁶ = 0.5, giving θ = 30°. This simple measurement allows precise determination of the laser wavelength.
ParameterValue
d (m)1.00e-6
m1
λ (nm)500
1sinθ = mλ / d = 1 × 500e-9 / 1e-6 = 0.5
2θ = arcsin(0.5) = 30°
Result 30° ✓ Diffraction angle
Scenario: A grating with d = 1.50×10⁻⁶ m produces a first‑order maximum at 30° for a certain wavelength. The chemist wants to find the wavelength of the spectral line. Rearranging d sinθ = mλ gives λ = d sinθ / m = 1.50×10⁻⁶ × sin30° / 1 = 750 nm. This wavelength is in the red region, confirming that the sample contains a red‑emitting element.
ParameterValue
d1.50e-6
θ30
m1
1λ = d sinθ / m = 1.50e-6 × 0.5 / 1 = 7.50e-7 m = 750 nm
Result 750 nm ✓ Wavelength determined
Insight: The diffraction grating equation is essential for spectroscopy. It relates the grating spacing, wavelength, and diffraction angle. Higher orders (m) produce more widely spaced maxima.

Common mistakes

  • Diffraction grating: d·sinθ = mλ – where d is the grating spacing (distance between adjacent slits).
  • Order m: An integer (0, ±1, ±2, …) – do not use non‑integer values.
  • Angle θ: Measured from the grating normal – not from the surface.
  • Maximum order: m_max = floor(d/λ) – for normal incidence.
  • Units: d and λ in the same units (e.g., nm, µm).

Applications

The diffraction grating equation, d sin θ = mλ, governs the angles at which maxima occur in the pattern produced by a diffraction grating. This is used to separate light into its constituent wavelengths, forming the basis of spectroscopy. Engineers and scientists use it to design spectrometers, to analyse the composition of materials, and to study atomic and molecular structures. By measuring the angles and using known grating spacing, they can determine the wavelength of light. This equation is also applied in optical communications for wavelength division multiplexing. Understanding diffraction gratings is essential for fields ranging from chemistry to astronomy, enabling precise measurements of light spectra.

  • Spectroscopic analysis of materials in chemistry and physics
  • Design of monochromators and spectrometers
  • Wavelength measurement and calibration in optics labs
  • Optical communications – wavelength division multiplexing
  • Education on interference and diffraction phenomena