Skip to main content
Calcimator

Diffraction Grating Calculator

Calculate diffraction angles for each order using d sin(θ) = mλ. Find the maximum observable order and angular dispersion.

About this calculator

This calculator applies the diffraction grating equation d sin(θ) = mλ, where d is the spacing between adjacent slits (Grating Spacing), θ is the Diffraction Angle, m is the Diffraction Order, and λ is the Wavelength of the incident light. Grating Spacing is simply the reciprocal of Grating Lines (lines per millimeter) -- more lines packed into each millimeter means a smaller spacing between them, which is why Grating Spacing decreases as Grating Lines increases. Max Observable Order is the largest integer m for which sin(θ) = mλ/d stays at or below 1 -- beyond that order, the equation has no real solution because the required angle would exceed 90°, so no diffraction maximum exists at all; a finer grating (more lines per mm, smaller d) or a longer wavelength both reduce how many orders are observable, since both make mλ/d reach 1 sooner.

Angular Dispersion measures how many degrees the diffraction angle shifts per nanometre of wavelength at the current order -- it is what makes a grating useful for spectroscopy, since it is what spreads different wavelengths into visibly different angles. When the requested order and wavelength combination has no valid solution (sin θ would exceed 1), the Diffraction Angle output reports "No solution" and Angular Dispersion reports "Undefined (no such order)" instead of numbers, rather than showing a meaningless out-of-range angle or a spurious zero dispersion.

Inputs

nm
lines/mm

Results

Diffraction Angle (°)

19.269°

Grating Spacing1.67 μm
Max Observable Order3
Angular Dispersion (°/nm)0.036418
sin θ0.33
How to Use This Calculator
  1. Enter Wavelength, Grating Lines, and Diffraction Order (m).
  2. Review the Diffraction Angle (°) result.
  3. Use Grating Spacing (μm) and Max Observable Order to inform your decision.
  4. Use the chart to visualize the results and explore different scenarios by adjusting inputs.

What each input means

Wavelength
Wavelength of the incident light in nanometers. Visible light: 380–700 nm.
Grating Lines
Number of slits per millimeter on the grating. Typical gratings: 300–1200 lines/mm.
Diffraction Order (m)
The order of the diffraction maximum. First order (m=1) is typically the brightest.

How this is calculated

Worked example, using the default values

  1. Identify Input Parameters
    Wavelength = 550, Grating Lines = 600, Diffraction Order (m) = 1 = 3 input(s) provided
  2. Calculate Diffraction Angle
    sin(θ) = mλ / d
    sin(θ) = (1 × 550 nm) / 1.667 μm = 0.33 = 19.269°
  3. Calculate Grating Spacing
    Grating Spacing = d
    1.667 = 1.667
  4. Calculate Max Observable Order
    Max Observable Order
    3 = 3

Engine last updated . Checked against 1 independently-derived test — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.

Frequently Asked Questions

Why does Grating Spacing decrease as I increase Grating Lines?

Grating Spacing is the physical distance between adjacent slits, which is simply 1 divided by the number of lines per millimeter -- so packing more lines into the same millimeter necessarily squeezes them closer together. A 1200 lines/mm grating has half the spacing of a 600 lines/mm grating.

What does 'No solution (sinθ > 1)' mean?

It means the diffraction grating equation d sin(θ) = mλ has no valid angle for the order and wavelength you entered, because mλ/d would need to exceed 1 -- and sine can never exceed 1. Physically, that diffraction order simply does not exist for this grating and wavelength; try a lower order, a coarser grating (fewer lines/mm), or a shorter wavelength.

Why does Max Observable Order go down for a finer grating?

A finer grating (more lines per millimeter) has a smaller Grating Spacing, and Max Observable Order is roughly Grating Spacing divided by Wavelength -- so a smaller spacing directly caps how many diffraction orders can satisfy the equation before sin(θ) would need to exceed 1. This is a real physical trade-off: finer gratings spread light out more per order but support fewer total orders.

Does a longer wavelength always mean fewer observable orders?

Yes eventually, holding the grating fixed -- though because the order count is a whole number, small wavelength changes often leave it unchanged before it drops by one. Max Observable Order is Grating Spacing divided by Wavelength, so a longer wavelength (redder light) divides into the same spacing more coarsely and reaches the sin(θ) = 1 limit at a lower order number than a shorter wavelength (bluer light) would.

What is Angular Dispersion used for?

Angular Dispersion measures how many degrees the diffraction angle shifts per nanometre of wavelength at the order you selected -- it's the property that makes gratings useful in spectrometers, since a higher dispersion spreads different wavelengths of light into more widely separated angles, making it easier to resolve closely spaced spectral lines.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Science & Physics.