Loading…

Diffraction Grating Calculator

Physics Oscillations and Waves • Superposition and Interference

View all topics

Compute diffraction grating maxima using \[ d\sin\theta_m = m\lambda, \] so \[ \sin\theta_m = \frac{m\lambda}{d}. \] For an ideal \(N\)-slit grating, the interference factor is \[ I = I_0\left(\frac{\sin(N\beta/2)}{\sin(\beta/2)}\right)^2, \qquad \beta = \frac{2\pi d\sin\theta}{\lambda}. \] The resolving power is \[ R=\frac{\lambda}{\Delta\lambda}=Nm. \] This tool computes maxima angles, grating intensity, and resolving power, with both an interactive plot and a contained grating animation.

Grating setup
Spacing \(d\) is entered in micrometers and wavelength in nanometers. The tool converts both internally to SI units before computing the diffraction angle.
Visualization
Larger \(N\) makes the principal maxima narrower and sharper, while the grating resolving power grows as \(Nm\).
Ready
Contained grating animation
The slit array, diffracted rays, and a schematic spectrum pattern are shown together. The animation stays fully inside the frame and updates with the selected wavelength and order.
Schematic diffraction grating animation.
Interactive diffraction-grating plot
Plot normalized grating intensity versus angle or inspect how maxima angle changes with diffraction order.
Tip: on narrow screens, scroll horizontally to see the full plot.
Enter values and click “Calculate”.

Rate this calculator

0.0 /5 (0 ratings)
Be the first to rate.
Your rating
You can update your rating any time.

Frequently Asked Questions

What does the diffraction grating calculator compute?

It computes diffraction maxima angles, checks whether a selected order is physically allowed, estimates the normalized N-slit intensity pattern, and gives the grating resolving power.

Why is there no maximum for some diffraction orders?

Because the grating condition requires |mλ/d| ≤ 1. If this ratio is greater than 1, sinθ would be impossible, so that order does not exist.

What is the role of the number of slits N?

A larger N makes the principal maxima narrower and sharper, improving spectral separation and increasing the resolving power through R = Nm.

Why do diffraction gratings separate colors so well?

Because different wavelengths satisfy the grating equation at different angles, so the grating spreads them into separate diffraction orders and can resolve small wavelength differences.