Tool · Imaging and diffraction

Diffraction Grating Calculator

A grating sends each wavelength into orders at angles fixed by the grating equation, mλ = d(sin α + sin β). The calculator takes the groove density, wavelength, incidence angle or the Littrow condition, and order, and reports the diffraction angle of every propagating order, the angular and linear dispersion, the resolving power for a given illuminated width, the resolution of a spectrometer with a given entrance slit, the free spectral range and the Littrow angle. Background: diffraction grating, external-cavity laser, free spectral range, optical spectrum analyzer, and optical spectrum analyzer fundamentals.

Grating and light
Instrument
W sets the resolving power of the grating; F, the focal length of the camera optic, turns angular dispersion into millimeters at the detector. The slit is imaged onto the detector by a collimator of the same focal length, as in a Czerny-Turner spectrometer.
Presets
Angles are measured from the grating normal and are positive on the side of the incident beam, so the equation reads mλ = d(sin α + sin β) with d the groove period (the convention of Palmer’s Diffraction Grating Handbook). The same equation holds for a transmission grating with β measured on the far side. The tool gives directions, dispersion and resolution; how much power reaches each order depends on the groove profile and polarization and is not modeled.
Readouts
order mβ (°)dispersion (°/nm)
Incident beam and diffracted orders
incident beamset orderother ordersgrating normal
Diffraction angle versus wavelength
Learn with it

Three short experiments. Each one sets the inputs, says where to look, and asks for a prediction before it shows the result.

Checked against

These checks run in your browser on every load. The angles are compared with values worked out by hand, each computed angle is put back into the grating equation, and the analytic dispersion is compared with a numerical derivative of the diffraction angle.

CheckExpectedComputedTolerance

The expected values are the grating equation and its derivatives as given in Palmer, Diffraction Grating Handbook, chapter 2, evaluated by hand for the stated gratings. The tolerance is the largest relative difference from Expected that still passes.

The model

Light of wavelength λ meeting grooves of period d at incidence angle α is diffracted into the angles β for which the waves from neighboring grooves differ in path by a whole number m of wavelengths:

mλ=d (sin⁡α+sin⁡β)

Both angles are measured from the grating normal and are positive on the side of the incident beam. An order propagates only while ∣mλ/d−sin⁡α∣≤1. At fixed incidence, differentiating gives the angular dispersion, and a camera of focal length F turns it into a reciprocal linear dispersion at the detector:

dβdλ=mdcos⁡β,dλdx=dcos⁡βmF

With N grooves illuminated, the resolving power and the free spectral range of order m are

R=λδλ=∣m∣N=W(sin⁡α+sin⁡β)λ,FSR=λ∣m∣

so at given angles the resolving power depends only on the illuminated width W. In the Littrow arrangement the diffracted order returns along the incident beam, α=β=θL, with

sin⁡θL=mλ2d,dβdλ=2tan⁡θLλ

These are the directions and spreads of the orders. How much power each order carries depends on the groove profile, blaze angle and polarization, and needs electromagnetic theory; the tool does not model it. The resolving power is the ideal value for a perfect grating filled by a plane wave; ruling errors, a partly filled aperture and the slit and pixel widths of a real spectrometer reduce what is reached. For the pattern of a few slits, where the orders sit under a single-slit envelope, see the slit diffraction calculator.

In a spectrometer whose collimator and camera have the same focal length F, as in the Czerny-Turner layout, an entrance slit of width w is imaged wcos⁡α/cos⁡β wide, and multiplying by the reciprocal linear dispersion gives the slit-limited bandpass

Δλslit=w dcos⁡α∣m∣F

The calculator reports the larger of this and λ/R as the resolution. Both are estimates to within a factor of order one: the exact figure depends on how the line shape is defined, and a detector whose pixels are wider than the slit image, or aberrations of the optics, set a further limit that the tool does not include.

Worked example

A 600 line/mm grating has a period of 1.667 µm. At normal incidence with HeNe light at 632.8 nm the first order leaves at arcsin⁡(0.37968)=22.31∘ and the second at 49.41°; a third order would need sin⁡β=1.139 and does not exist. The first-order dispersion is 0.03716°/nm, or 0.6486 mrad/nm, so a 300 mm camera spreads the spectrum at 5.140 nm per millimeter of detector. Illuminated over 50 mm the grating has 30,000 grooves in the beam and can resolve lines 21.09 pm apart in first order. As a spectrometer with a 50 µm slit and 300 mm optics, its bandpass is 0.2778 nm, so the slit, not the grating, sets the resolution. The same grating in first-order Littrow at this wavelength would sit at 10.94°.

References: C. Palmer, Diffraction Grating Handbook, 8th ed., MKS Instruments (2020), chapter 2. E. Hecht, Optics, 5th ed., Pearson (2017). M. Born and E. Wolf, Principles of Optics, 7th ed., Cambridge University Press (1999).