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.
Result
Full equation values
Visible spectrum position
380 nm (UV)700 nm (IR)
Summary
Pick which variable to solve for, enter the other three, and instantly get the result from m·λ = d·sin(θ).
How it works
- Select which quantity you want to solve for: wavelength (λ), grating spacing (d), diffraction order (m), or angle (θ).
- Enter values for the three known quantities in the input fields that appear.
- Click Calculate — the tool rearranges the grating equation and computes the unknown.
- Results include the derived value with its unit, plus a summary equation showing all four variables.
- 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