Diffraction Grating Calculator
Enter grating spacing (or lines/mm), diffraction order, and wavelength to find diffraction angles — or solve for any missing variable.
Inputs
d in nm
or
lines / mm
Integer; 0 = straight-through
Visible range: 380–700 nm
Results
Fill in the inputs and click Calculate
Diffraction Angle θ
Grating spacing d
Order m
Wavelength λ
Grating equation
Visible spectrum position
380 nm700 nm
Summary
Enter grating spacing (or lines/mm), diffraction order, and wavelength to find diffraction angles — or solve for any missing variable.
How it works
- Enter the grating spacing d in nanometers, or the lines-per-mm value (the tool converts automatically).
- Select the diffraction order m (0, ±1, ±2, …).
- Enter the incident wavelength λ in nanometers.
- Click Calculate to get the diffraction angle θ for that order.
- Switch to "Solve for λ" mode to find the wavelength when you know the angle.
- The visible-spectrum bar shows where the wavelength falls in the 380–700 nm range.
Use cases
- Predict the angle at which a laser beam will appear for a given diffraction order.
- Identify an unknown wavelength by measuring the diffraction angle experimentally.
- Design spectroscopy setups by comparing first-order and second-order separations.
- Verify grating specifications when the lines/mm rating is known.
- Teach and visualize the grating equation in optics coursework.
Frequently Asked Questions
Last updated: 2026-06-11 ·
Reviewed by Nham Vu