What this calculator does
A diffraction grating splits light by wavelength far more sharply than a prism does, which is why it sits at the heart of almost every spectrometer. Each wavelength emerges at its own angle, and the relationship between them is exact rather than empirical.
Not every order exists. At high orders the required sine exceeds one, which has no solution, and the light simply does not appear in that direction. The calculator reports that rather than producing a meaningless angle.
The formula
The grating equation sets the order times the wavelength equal to the line spacing times the sum of the sines of the incident and diffracted angles. Line spacing is one over the line density.
| Term | Meaning |
|---|---|
| Order (m) | Which diffracted beam is being considered. Higher orders emerge at larger angles. |
| Line density | Grating lines per millimetre. Spacing is its reciprocal. |
| Incident angle (θi) | The angle at which light arrives at the grating. |
The inputs explained
| Field | What to enter |
|---|---|
| Diffraction order (m) | The diffraction order, a whole number. Order 1 is the first beam either side of the direct one. |
| Wavelength (λ) (nm) | The wavelength in nanometres. |
| Grating line density (lines/mm) | Grating line density in lines per millimetre. A 1,000 lines/mm grating has 1,000 nm spacing. |
| Incident angle (θi) (°) | The incident angle in degrees, measured from the grating normal. |
When to use it
Designing a spectrometer
The angular spread between wavelengths determines the resolution achievable at a given detector distance.
Checking whether an order exists
High orders and long wavelengths often have no solution, which limits the usable range of a grating.
Identifying an unknown wavelength
Measuring the diffraction angle and working backwards gives the wavelength directly.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
Where does each order appear for green light?
Successive diffraction orders from the same grating.
| Order | Diffraction angle | Grating spacing |
|---|---|---|
| Order 1 | 3.44 ° | 1000.0 nm |
| Order 2 | 38.32 ° | 1000.0 nm |
| Order 3 | No solution, this order does not exist at this angle and spacing | 1000.0 nm |
Questions
Why does a grating beat a prism?
Because its dispersion is far larger and depends on geometry rather than on the material. That gives better wavelength separation and a relationship that can be calculated exactly instead of calibrated.
Why do some orders not exist?
The grating equation requires a sine, which cannot exceed one. When the order and wavelength demand more than that, there is no angle that satisfies the condition and no beam appears.
Why do higher orders spread further apart?
Because the angle grows with order, and the spacing between wavelengths grows with it. Higher orders give better resolution, which is why spectrometers use them when the light is bright enough.
What does the incident angle change?
It shifts every order. Tilting the grating is how a monochromator selects which wavelength reaches the exit slit, without moving anything else in the instrument.
For refraction through a prism instead, see the Snell's law calculator. For the wavelengths atoms emit, see the Rydberg equation calculator.