Diffraction Grating Calculator

Enter your wavelength, grating density, diffraction order, and angle of incidence to find the diffraction angle for light passing through a grating. The Diffraction Grating Calculator applies the grating equation m·λ = d·sin(θ) and returns the diffraction angle, grating spacing, and an angular breakdown across multiple diffraction orders.

nm

Wavelength of the incident light in nanometres. Visible light is 380–750 nm.

lines/mm

Number of rulings or slits per millimetre on the diffraction grating.

Integer order of diffraction (1st, 2nd, 3rd, …).

°

Angle of the incoming light ray relative to the grating normal. Use 0 for perpendicular incidence.

Results

Diffraction Angle (θₘ)

--

Grating Spacing (d)

--

Path Difference (m·λ)

--

Maximum Possible Order

--

Angular Dispersion (dθ/dλ)

--

Diffraction Angle by Order

Results Table

Frequently Asked Questions

What is diffraction?

Diffraction is a wave phenomenon that occurs when a light ray (or any wave) encounters an obstacle or a narrow aperture. After passing through the opening, the wave changes direction and spreads out. Diffraction effects become pronounced when the aperture size is comparable to the wavelength of the light.

What is a diffraction grating?

A diffraction grating is an optical element with a large number of uniformly spaced parallel slits or rulings. When light hits the grating, each slit acts as a secondary source of circular waves. These waves interfere constructively only at specific angles, separating light into its component wavelengths — much like a prism, but based on interference rather than refraction.

What is the diffraction grating equation?

The standard diffraction grating equation is m·λ = d·sin(θₘ), where m is the diffraction order (integer), λ is the wavelength, d is the grating spacing (distance between adjacent rulings), and θₘ is the diffraction angle. For non-zero angles of incidence, the equation becomes m·λ = d·(sin(θᵢ) + sin(θₘ)) using a sign convention.

How do I calculate the grating spacing from grating density?

Grating spacing d (in mm) is simply the reciprocal of the grating density N (lines per mm): d = 1/N. For example, a grating with 600 lines/mm has a spacing of 1/600 mm ≈ 1666.67 nm. This spacing is the critical parameter in the diffraction equation.

What is the maximum diffraction order for a given grating?

The maximum order mₘₐₓ is limited by the condition that sin(θ) cannot exceed 1. Therefore mₘₐₓ = floor(d / λ) for normal incidence. Beyond this order, no real diffraction angle exists. Higher grating densities (smaller d) reduce the number of accessible orders.

At what angle is the second-order diffracted image for 560 nm light on a 600 lines/mm grating?

With d = 1/600 mm = 1666.67 nm, m = 2, and λ = 560 nm, the equation gives sin(θ) = 2 × 560 / 1666.67 ≈ 0.6720, so θ ≈ 42.25°. You can verify this directly with this calculator.

What are real-life examples of diffraction gratings?

Diffraction gratings appear in many everyday objects: the rainbow sheen on a CD or DVD surface, holographic stickers, iridescent butterfly wings, and the shimmery patterns on credit card holograms. In science, they are used in spectrometers to split light into its spectrum for chemical analysis and astronomical observations.

What is angular dispersion and why does it matter?

Angular dispersion (dθ/dλ) measures how much the diffraction angle changes per unit change in wavelength. A higher dispersion means the grating separates different wavelengths more widely, improving the ability to resolve closely spaced spectral lines. It is given by dθ/dλ = m / (d·cos θ), so higher orders and denser gratings produce greater dispersion.

More Physics Tools