Diffraction Gratings and Laser Beam Focusing Explained
How a diffraction grating spreads light into orders, what limits its resolution, the Rayleigh criterion, and how focused laser beams set spot size.

Diffraction Gratings and Laser Beam Focusing Explained
A diffraction grating turns white light into a rainbow and lets scientists measure wavelengths precisely. A focusing lens turns a laser into a tiny spot, but never into a point. Both are governed by diffraction. This guide explains the key formulas, and you can calculate them with the grating and Gaussian beam calculator.
The grating equation
A grating has many parallel lines, typically hundreds or thousands per millimetre. Light from each line interferes constructively only at angles where the path difference is a whole number of wavelengths. At normal incidence:
d sin θ = m λ,
with d the line spacing, m the order (1, 2, 3...) and λ the wavelength. Longer wavelengths are diffracted more, so red appears farther from the centre than blue.
Example
A 600 lines/mm grating has d = 1/600 mm = 1667 nm. Green laser light at 532 nm appears at 18.6° in first order, 39.7° in second and 73.2° in third. A fourth order would need sin θ > 1, so it does not exist.
Resolving power
How close can two wavelengths be and still be seen as separate lines? The resolving power is R = λ / Δλ = m N, where N is the number of illuminated lines. Illuminating 10 mm of a 600 lines/mm grating gives N = 6000. In first order at 532 nm it separates lines 0.09 nm apart. The yellow sodium doublet (589.0 and 589.6 nm) needs only R ≈ 1000.
The Rayleigh criterion
Any circular aperture, such as a telescope mirror or camera lens, blurs a point into an Airy disk. Two points are just resolved when separated by:
θ = 1.22 λ / D.
A 100 mm telescope at 532 nm resolves about 1.3 arcseconds. Larger apertures resolve finer detail, which is why astronomers build big telescopes.
Gaussian laser beams
Most lasers emit beams whose intensity follows a Gaussian profile. A Gaussian beam focuses to a waist w₀ rather than a point. Focusing a beam of radius w with a lens of focal length f gives:
w₀ = M² λ f / (π w).
M² is the beam quality factor: 1 for a perfect Gaussian beam, higher for real lasers. Diode lasers often have M² of several.
Depth of focus
The beam stays close to its waist size over the Rayleigh range:
z_R = π w₀² / (M² λ).
Beyond that, it spreads with half-angle divergence θ = M² λ / (π w₀). The radius at distance z from the waist is w₀ √(1 + (z / z_R)²).
The trade-off
A smaller spot needs a larger input beam or a shorter focal length, but then the Rayleigh range shrinks rapidly, as w₀². Laser cutters, laser engravers and confocal microscopes all balance spot size against depth of focus.
Example
Focusing a 2 mm radius beam at 532 nm with a 100 mm lens gives a waist of 8.5 µm, a Rayleigh range of 0.42 mm and a divergence of 20 mrad. One millimetre from focus, the beam radius has grown to 21.7 µm.
Using the calculator
- Enter the grating lines per millimetre and the wavelength.
- Enter the illuminated width.
- Enter an aperture diameter.
- Enter the input beam radius, focal length and M².
- Read diffraction angles, resolving power, the Rayleigh limit and beam parameters.
Laser safety
Focused lasers concentrate power into tiny spots. Follow the laser safety rules for your laser class and use proper eye protection.
Limits
The calculator assumes normal incidence on the grating and an ideal thin focusing lens. Real systems have aberrations and alignment errors.


