Diffraction Grating Calculator

A diffraction grating splits light into sharp beams at angles set by the line spacing and the wavelength. Enter the grating density and wavelength to get the angle of each order, or measure an angle to identify a wavelength, as in a school spectrometer practical. The calculator also gives the dispersion and the finest wavelength difference the grating can resolve.

Inputs

Advanced options (1)

Results

Result
θ₁ = 18.61°
Diffraction angle
18.61
Wavelength
532
Line spacing d
1.667
Highest visible order
3
Angular dispersion (degrees per nm)
0.03628
Resolving power λ/Δλ
6,000
Smallest resolvable wavelength difference
0.08867

    RefPHY-OPT-004
    Methodd·sinθ = mλ, R = mN
    UnitsSI
    Date2026-11-24

    Working

    Calculated in SI base units; inputs are converted from the units you choose.

    1. Line spacingd = 1/Nd = 1 / 600 per mm = 1,667 nm
    2. Grating equationd·sinθ = mλsinθ = 1 × 532 / 1,667 = 0.3192 → θ = 18.61°
    3. Highest orderm_max = floor(d/λ)m_max = floor(3.133) = 3
    4. Dispersion and resolving powerdθ/dλ = m/(d cosθ), R = mN_lines0.03628°/nm, R = 6,000 (Δλ = 0.08867 nm)

    Angle of each order

    Order mAngle (°)
    118.615
    239.673
    373.256

    The grating equation

    Light from neighbouring slits reinforces where the path difference d·sinθ is a whole number of wavelengths, d·sinθ = mλ. Finer gratings spread the spectrum more, but fewer orders fit before sinθ reaches 1. The resolving power R = mN grows with the number of illuminated lines N: separating the sodium doublet at 589.0 and 589.6 nm needs R of about 1000.

    Assumptions and limits

    • Light strikes the grating at normal incidence.
    • Plane transmission grating with equally spaced lines.
    • Far-field (Fraunhofer) diffraction.

    References

    • Hecht, E., Optics, 5th ed., Pearson, 2017, chapter on diffraction (the grating).
    • Halliday, D., Resnick, R. and Walker, J., Fundamentals of Physics, 12th ed., Wiley, 2021, sections on diffraction gratings.

    Questions

    At what angle does a 532 nm green laser leave a 600 lines/mm grating?
    The first order is at 18.61° and the second at 39.67°. The third order is at 73.26°, the last one that exists.
    What wavelength gives a first-order maximum at 20° with 600 lines/mm?
    570.0 nm, yellow-green light.

    This calculator is a design aid. Check results against the governing code or standard and have critical work verified by a qualified engineer. Read the disclaimer.