Diffraction Grating Equation Calculator

Pick which variable to solve for, enter the other three, and instantly get the result from m·λ = d·sin(θ).

Grating Equation Solver

m · λ = d · sin(θ)

deg

Select what to solve for, fill in the three known values, then click Calculate.

Summary

Pick which variable to solve for, enter the other three, and instantly get the result from m·λ = d·sin(θ).

How it works

  1. Select which quantity you want to solve for: wavelength (λ), grating spacing (d), diffraction order (m), or angle (θ).
  2. Enter values for the three known quantities in the input fields that appear.
  3. Click Calculate — the tool rearranges the grating equation and computes the unknown.
  4. Results include the derived value with its unit, plus a summary equation showing all four variables.
  5. Use the unit toggles to switch between nm/mm/lines-per-mm as needed for your setup.

Use cases

  • Identify an unknown spectral line wavelength by measuring the diffraction angle experimentally.
  • Determine the grating spacing needed to resolve two wavelengths at a target angle.
  • Find which diffraction order a detected peak corresponds to in a spectrometer.
  • Calculate the angular position of a known wavelength before aligning an optical bench.
  • Cross-check grating manufacturer specs against measured diffraction angles.
  • Design monochromator exit slit positions for a given wavelength range.
  • Verify student lab measurements of sodium doublet lines with the D1/D2 wavelengths.

Frequently Asked Questions

Last updated: 2026-07-01 · Reviewed by Nham Vu