Diffraction Grating & Spectrometer Calculator

Where does a diffraction grating send each wavelength, and how finely can a spectrometer built around it separate wavelengths? Enter the grating’s groove density, the wavelength, and the geometry (a fixed angle of incidence, a Littrow mount, or a Czerny–Turner spectrometer) to get the diffraction angle, the dispersion at the detector, the bandpass for your slits, and the resolving power. Use it to choose a grating, to check that a wavelength reaches the detector, or to estimate a spectrometer’s resolution.

Key terms
Groove density
The number of grooves (lines) per millimeter, printed on the grating or its data sheet, for example 600, 1200, or 2400 lines/mm. More grooves spread the spectrum wider but reach a shorter longest wavelength. The groove spacing d is its inverse: 833 nm at 1200 lines/mm.
Diffraction order
A grating sends each wavelength into several directions, numbered m = 0, ±1, ±2, and so on. Order 0 is a plain mirror reflection with no separation of wavelengths; first order is the usual working order. Higher orders spread the spectrum more, but their spectra overlap.
Angles of incidence and diffraction
α and β, measured from the grating normal, the line perpendicular to the grating surface. An angle on the same side of the normal as the incoming light counts as positive, as in Figure 1 below.
Littrow and Czerny–Turner
Two common layouts. In Littrow, the grating sends the chosen wavelength straight back toward the source, as in tunable lasers. In a Czerny–Turner spectrometer, two concave mirrors bring the light to the grating and focus it on the exit slit or detector; the grating turns to select the wavelength while the angle between the beams, the deviation angle, stays fixed.
Dispersion
How far apart two wavelengths end up. The reciprocal linear dispersion, in nm/mm, is how many nanometers fall on each millimeter of the exit slit or detector; the smaller it is, the finer the detail.
Bandpass
The range of wavelengths that passes the exit slit at once, as a full width at half maximum. It is set by the slit widths and the dispersion and usually limits a spectrometer’s resolution.
Resolving power
λ/Δλ for the finest detail the grating itself could separate: the diffraction order times the number of illuminated grooves.
Free spectral range
Light at 500 nm in first order leaves the grating in the same direction as 250 nm in second order. The free spectral range is the band free of such overlap; order-sorting filters block the light that would overlap.

Inputs

Fixed incidence: the light meets the grating at a set angle, as in a spectrograph or a bench setup. Littrow: the grating sends the wavelength back toward the source, as in a tunable laser. Constant deviation: the grating turns between fixed entrance and exit arms, as in most scanning monochromators and Czerny–Turner spectrometers.

lines/mm
order

The groove density is printed on the grating or its data sheet. The order is usually 1; positive orders lie on the incoming side of the mirror reflection (m = 0), negative orders on the other side.

The wavelength in the air around the grating, as on spectrometer scales and in tables of visible lines (Hα: 656.28 nm in air, 656.46 nm in vacuum). At the default settings, the vacuum value would move β by only about 0.01°.

Measured from the grating normal, 0° when the light arrives straight on. Angles on the incoming side of the normal are positive (Figure 1 below).

Of the mirror or lens that focuses the spectrum onto the exit slit or detector; usually the spectrometer’s quoted focal length.

Measured across the grooves. A collimated beam of diameter D covers W = D/cos α.

Entrance and exit slits are taken as equally wide, the usual monochromator setting. For a spectrograph with a detector array, enter the entrance slit and read the slit-image result.

Results

Diffraction angleβ— From the grating normal, positive on the incoming side. The mirror reflection (m = 0) leaves at −α.
Angle of incidenceα—
Deviation angleα − β—
Littrow angle for this λ and m— The grating angle that sends this wavelength back along the incoming beam. Catalogs quote blaze wavelengths for this geometry.
Angular dispersiondβ/dλ—
Reciprocal linear dispersiondλ/dx— Nanometers per millimeter along the exit slit or detector; the smaller, the finer the detail.
Bandpass, equal slitsB— The band (FWHM) that passes when the entrance and exit slits are both w wide: w·dλ/dx, or the entrance-slit image times dλ/dx when the image is wider. Aberrations and diffraction add to it. Use it as the instrument width in the line-broadening calculator.
Entrance-slit image widthw·cos α/cos β— The slit as imaged at the exit, for equal collimator and focusing focal lengths. With a detector array instead of an exit slit, the bandpass is about this width times dλ/dx, which spectrometers usually spread over 3 to 6 pixels.
Resolving powerR = |m|N— The grating’s own limit (Rayleigh criterion). Real spectrometers are usually limited by their slits or pixels long before this.
Diffraction-limited resolutionλ/R—
Grooves illuminatedN—
Free spectral rangeλ/|m|— The band above λ free of overlap from the next order. In first order, second-order light at λ/2 lands where λ does, so use an order-sorting filter if the source also emits there.
Longest wavelength in this order— Where a beam would graze the grating surface (|α| or |β| reaching 90°). An instrument’s grating drive usually stops sooner.

Diffraction angle vs. wavelength

How it is calculated

For a plane reflection grating with groove spacing \(d\) (the inverse of the groove density), light incident at angle \(\alpha\) is diffracted into angles \(\beta\) that satisfy the grating equation

\[ m\lambda = d\,(\sin\alpha + \sin\beta) . \]

Sign convention. Both angles are measured from the grating normal, and two angles have the same sign when they lie on the same side of it (Palmer’s convention). With the incoming side taken as positive, the zero order is the mirror reflection, \(\beta = -\alpha\); positive orders lie on the incoming side of it and negative orders on the other side (Figure 1). An order exists only if \(|\sin\beta| \le 1\); otherwise it is evanescent and carries no power away from the grating. Other books use other sign conventions, so check them before comparing angles between sources.

grating normal+−incoming lightα = +30°m = +1, β = +5.7°m = +2β = +44.4°m = 0, mirrorβ = −30°αβ₀β₂m = −1 would needsin β = −1.1:no such beamgrating, 1200 lines/mm, light at 500 nm
Figure 1. Angles and orders for the calculator’s defaults: 1200 lines/mm and 500 nm light arriving at α = +30°. Angles on the incoming side of the normal (+) are positive. The zero order leaves as from a mirror, at β = −30°; the +1 and +2 orders leave at +5.7° and +44.4°, on the incoming side of it. The −1 order would need sin β = −1.1, so there is no such beam. Angles computed from the grating equation.

Here \(\lambda\) is the wavelength in the medium around the grating, normally air, as on spectrometer scales and in HORIBA’s tutorial. The vacuum wavelength is about 0.03 % longer; at the default settings it would move \(\beta\) by about 0.01°.

Mountings

DVαβnormalcollimatingmirrorfocusingmirrorentranceslit, wexit slitor detectorLBWgrating: 1200 lines/mm, 500 nm, DV = 30°
Figure 2. A Czerny–Turner spectrometer seen from above, with the angles of the constant-deviation example: DV = 30°, 1200 lines/mm, 500 nm, so α = 33.1° and β = 3.1°. The collimating mirror makes the light from the entrance slit (width w) parallel, and the beam covers a width W of the grating; the focusing mirror, of focal length LB, forms the spectrum on the exit slit or detector. The grating turns about its center to change the wavelength while DV stays fixed. Turning it the other way (DV = −30°) gives α = 3.1° and β = 33.1°.

Dispersion, resolution, and bandpass

\[ \begin{gathered} \frac{d\beta}{d\lambda} = \frac{m}{d\cos\beta}, \\[4pt] \frac{d\lambda}{dx} = \frac{d\cos\beta}{|m|\,L_B}, \\[4pt] R = \frac{\lambda}{\Delta\lambda} = |m|N = \frac{W\,|\sin\alpha + \sin\beta|}{\lambda} \le \frac{2W}{\lambda} . \end{gathered} \]

The reciprocal linear dispersion \(d\lambda/dx\) (nm per mm at the focal plane) turns a width at the exit into a band of wavelengths. The grating also changes the width of the entrance-slit image: it is magnified by \(\cos\alpha/\cos\beta\), times \(L_B/L_A\) when the collimating focal length \(L_A\) differs from \(L_B\). The bandpass is set by the wider of that image and the exit slit:

\[ B \approx \frac{d\lambda}{dx}\,\max\!\left(w_\text{exit},\ w\,\frac{\cos\alpha}{\cos\beta}\,\frac{L_B}{L_A}\right) . \]

The calculator takes \(L_A = L_B\) and equal slits, \(w_\text{exit} = w\), so \(B = w\,d\max(\cos\alpha,\cos\beta)/(|m|L_B)\): both orientations of a constant-deviation mount give the same bandpass, although their dispersions differ. With a detector array instead of an exit slit, \(B\) is about the slit-image width times \(d\lambda/dx\). The resolving power \(R = |m|N\) is the theoretical limit set by the number of illuminated grooves (Rayleigh criterion), and no geometry can exceed \(2W/\lambda\); practical spectrometers are usually slit- or pixel-limited well before reaching it. The results give the bandpass and the diffraction-limited width \(\lambda/R\) in wavelength, frequency, and wavenumber, with \(\Delta\nu = c\,\Delta\lambda/\lambda^2\) and \(\Delta\tilde\nu = \Delta\lambda/\lambda^2\) (about 0.03 % high when \(\lambda\) is an air wavelength). The free spectral range \(\lambda/|m|\) is the band before the next order overlaps, so a first-order spectrum spanning more than a factor of two in wavelength needs order-sorting filters, unless the overlapping light is absorbed, as air absorbs it below about 190 nm.

Typical values: choosing a groove density

For a 300 mm Czerny–Turner with DV = 30° and 50 µm slits, used in first order, this calculator gives the dispersion and bandpass at 500 nm:

Lines
per mm
Longest
λ (nm)
dλ/dx
(nm/mm)
Bandpass
(nm)
300622010.90.546
60031105.520.276
120015552.770.139
180010371.810.0903
24007781.270.0637
36005180.5480.0274

Doubling the groove density roughly halves both the bandpass and the longest wavelength. The longest wavelength in the table is where a beam would graze the grating, and near it the angles become extreme: 3600 lines/mm at 500 nm already needs α = 83.7°. A real instrument’s grating drive stops sooner; in HORIBA’s example monochromator a 3600 lines/mm grating cannot go above 433 nm.

Worked example

Take a 1200 lines/mm grating (\(d = 833.3\) nm) at \(\alpha = 30^\circ\), first order, 500 nm. Then \(\sin\beta = 0.6 - 0.5 = 0.1\), so \(\beta = 5.74^\circ\). The angular dispersion is 1.206 mrad/nm, and with a 300 mm focusing mirror the reciprocal linear dispersion is 2.76 nm/mm. The grating shrinks the image of a 50 µm entrance slit to 43.5 µm (\(\cos 30^\circ/\cos 5.74^\circ = 0.870\)), so with 50 µm slits the exit slit sets the bandpass: about 0.14 nm (5.5 cm⁻¹). Fifty millimeters of illuminated grating gives \(R = 60\,000\), or 8.3 pm (10 GHz) at 500 nm, so the slits, not the grating, limit the resolution. In a Czerny–Turner with \(D_V = 30^\circ\), the same wavelength needs \(\alpha = 33.09^\circ\) and \(\beta = 3.09^\circ\). With \(D_V = -30^\circ\) the two angles swap: the reciprocal linear dispersion changes from 2.77 to 2.33 nm/mm, while the bandpass stays 0.139 nm.

Assumptions and limits

References

Primary sources and standards

  1. C. Palmer, Diffraction Grating Handbook, 8th ed., MKS Instruments (2020), free from MKS at newport.com: ch. 2 (the grating equation and its sign convention, Littrow and constant-deviation forms, eqs. 2-1 to 2-10; dispersion, eqs. 2-13 and 2-17; resolving power and its 2W/λ maximum, eqs. 2-19 to 2-23; free spectral range; blaze), ch. 6 (Czerny–Turner and Littrow mounts), ch. 8 (slit-image magnification, eq. 8-2, and instrumental bandpass, eq. 8-12), and ch. 9 (useful wavelength range and anomalies).
  2. E. G. Loewen and E. Popov, Diffraction Gratings and Applications, Marcel Dekker (1997), reissued by CRC Press (2018), doi:10.1201/9781315214849 (ch. 2, fundamental properties of gratings; ch. 8, surface waves and grating anomalies).
  3. W. Demtröder, Laser Spectroscopy 1: Basic Principles, 5th ed., Springer (2014), doi:10.1007/978-3-642-53859-9, ch. 4, “Spectroscopic Instrumentation,” pp. 113–256 (spectrographs and monochromators, including grating spectrometers).
  4. A. Thorne, U. Litzén, and S. Johansson, Spectrophysics: Principles and Applications, Springer (1999), the rewritten successor of A. P. Thorne, Spectrophysics, 2nd ed., Chapman and Hall (1988), doi:10.1007/978-94-009-1193-2, ch. 6, “Diffraction gratings” (textbook treatment of gratings and grating spectrographs).
  5. M. Czerny and A. F. Turner, “Über den Astigmatismus bei Spiegelspektrometern,” Z. Phys. 61, 792–797 (1930), doi:10.1007/BF01340206 (the paper the Czerny–Turner mount is named after).
  6. A. B. Shafer, L. R. Megill, and L. Droppleman, “Optimization of the Czerny–Turner spectrometer,” J. Opt. Soc. Am. 54, 879–887 (1964), doi:10.1364/JOSA.54.000879 (aberrations of the two-mirror mount and how an asymmetric layout corrects them).

Textbooks

Free introductions