Double-Slit & Diffraction Grating Calculator

Work out interference and diffraction patterns. Solve Young’s double slit (Δy = λL/d), the single-slit minima (a sin θ = mλ) and the diffraction grating (d sin θ = mλ) for the spacing or angle, the wavelength, the slit or line spacing, or the screen distance, with the intensity pattern drawn.

Calculator Science & Engineering Updated Oct 4, 2026
How to Use
  1. Pick the set-up: a double slit, a single slit or a diffraction grating.
  2. Pick what to solve for: the fringe spacing (or central width, or angle), the wavelength, the slit or line spacing, or the distance to the screen.
  3. Enter the other values with a unit beside each: the wavelength in nm, slit sizes in mm or µm, the screen distance in metres, a grating in lines per mm.
  4. For a double slit, add the slit width to see the single-slit envelope and any missing orders. For a grating, add the illuminated width for the resolving power.
  5. Read the answer in the highlighted field and the readouts, the pattern on the screen drawn in the laser’s colour, and the exact fringe positions in the table.
  6. Press a laser preset (632.8 nm helium-neon, 532 nm green, 650 nm red diode) and check Show Work for each step.
Input
optional for a double slit
1, 2, 3 …
for resolving power
optional for a grating
Presets
Pattern on the Screen
Fringe spacing
—
First-order angle
—
Fringes per cm
—
Fringes in envelope
—

Worked Example

Young’s slits with a helium-neon laser. 632.8 nm light through two slits 0.25 mm apart, screen 1.5 m away: Δy = λL ÷ d = 632.8 × 10⁻⁹ × 1.5 ÷ 0.00025 = 3.797 mm. If each slit is 0.05 mm wide, d ÷ a = 5, so the single-slit envelope holds 9 bright fringes and the 5th order lands on an envelope zero and is missing.

A 600 lines/mm grating with green light. The line spacing is d = 1 ÷ 600 mm = 1.667 µm. For 532 nm, sin θ = λ ÷ d = 0.3192, so the first order leaves at 18.61°; d ÷ λ = 3.13, so orders 2 and 3 appear at 39.67° and 73.26°, and there is no 4th.

The common mistake: the small-angle formula for a grating. On a screen 1 m from that grating, y = λL ÷ d gives 0.3192 m for the first-order spot, but the exact position is L tan θ = 1 × tan 18.61° = 0.3368 m, 5.5% further out. For the second order the shortcut gives 0.638 m against a true 0.829 m. Δy = λL ÷ d only holds while the angles stay small, as they do for slits much wider than the wavelength.

Show Work

Enter values and calculate to see the step-by-step breakdown.

Formulas

Fringe spacing
Δy = λL ÷ d
Double slit, small angles
Bright fringes
d sin θ = mλ
Double slit and grating; dark fringes at (m + ½)λ
Single-slit minima
a sin θ = mλ
m = 1, 2, 3 …; the central band is w = 2λL ÷ a wide
Intensity
I = cos²(πd sin θ ÷ λ) × sinc²(πa sin θ ÷ λ)
Two-slit fringes inside the single-slit envelope; sinc x = sin x ÷ x
Grating spacing
d = 1 ÷ lines per length
600 lines/mm is d = 1.667 µm; highest order below d ÷ λ
Resolving power
R = λ ÷ Δλ = mN
Order times the number of lines illuminated

From Young’s Slits to the Laser

In 1803 Thomas Young told the Royal Society that light passing two close openings makes alternating bright and dark bands, and used the spacing to estimate the wavelengths of the colours, a direct challenge to Newton’s particle picture of light. Augustin Fresnel’s mathematical theory of diffraction won the French Academy’s prize in 1819 after Siméon Poisson objected that it predicted a bright spot in the shadow of a disc, and François Arago then found the spot.

The American astronomer David Rittenhouse made a grating from hairs strung between fine screws in 1785. Joseph von Fraunhofer built far better wire and ruled gratings around 1821 and used them to measure the wavelengths of the dark lines in sunlight, and Henry Rowland’s ruling engines at Johns Hopkins in the 1880s made gratings precise enough for modern spectroscopy.

The helium-neon laser was first run at Bell Labs in 1960 by Ali Javan, William Bennett and Donald Herriott, in the infrared; the familiar 632.8 nm red line followed in 1962. Its clean single wavelength made Young’s experiment a bench-top classroom demonstration. Green 532 nm pointers are frequency-doubled 1064 nm lasers; red diode pointers are typically about 650 nm, and their exact wavelength varies from one diode to the next.

About This Tool

This calculator covers the three classic diffraction set-ups: Young’s double slit, a single slit and a diffraction grating. It solves for whichever value you leave out, then lists the exact positions of the bright and dark fringes (using L tan θ rather than the small-angle shortcut, and saying when the two disagree), the highest order a grating can show and its resolving power. The pattern is drawn on the screen in the colour of the light, with the intensity curve under it, including the single-slit envelope and any missing orders when you give the slit width.

Everything runs in your browser; nothing you enter is sent anywhere.

Related tools: Photon Energy & Wavelength Calculator, Snell’s Law & Refraction Calculator, and Standing Waves & Harmonics Calculator.

Frequently Asked Questions

What is the formula for double-slit fringe spacing?

Δy = λL ÷ d, where λ is the wavelength, L the distance to the screen and d the distance between the slit centres. Helium-neon light (632.8 nm) through slits 0.25 mm apart onto a screen 1.5 m away gives 632.8 × 10⁻⁹ × 1.5 ÷ 0.00025 = 3.797 mm. Halving d to 0.125 mm doubles the spacing to 7.594 mm.

How do I measure a laser’s wavelength with a double slit?

Measure the fringe spacing and use λ = Δy × d ÷ L. With slits 0.3 mm apart and a screen 1.5 m away, fringes 2.66 mm apart give 0.00266 × 0.0003 ÷ 1.5 = 532 nm, a green laser. Measure across 10 fringes (26.6 mm) and divide by 10 for a more accurate spacing.

Why is the central maximum of a single slit twice as wide?

The first dark fringes are at a sin θ = ±λ, one on each side, so the central band spans 2λL ÷ a while every other band spans λL ÷ a. A 650 nm red laser through a 0.1 mm slit onto a screen 2 m away has its first minima 13 mm either side of centre, a central band 26 mm wide. The first side band is only 4.7% as bright as the centre.

How many orders can a diffraction grating show?

Orders exist only while sin θ = mλ ÷ d stays below 1, so the highest is the largest whole number below d ÷ λ. A 600 lines/mm grating has d = 1.667 µm; with 532 nm light d ÷ λ = 3.13, so there are 3 orders on each side, at 18.61°, 39.67° and 73.26°, plus the straight-through spot.

What resolving power do I need to split the sodium D lines?

The sodium doublet is 588.995 and 589.592 nm, 0.597 nm apart, so R = λ ÷ Δλ = 589.29 ÷ 0.597 = 987. Since R = mN, a grating with 1,000 lines illuminated just does it in first order, and 500 lines would do it in second order.

How do I use the Double-Slit & Diffraction Grating Calculator?

Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.

Do I need to install or sign up for anything?

Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.

Is my information private?

Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.

Common Use Cases

Measuring a laser wavelength

Fringes 2.66 mm apart from slits 0.3 mm apart on a screen 1.5 m away give λ = 532 nm, the green line of a frequency-doubled laser.

Measuring a hair

A hair diffracts like a slit of the same width (Babinet’s principle): a 0.07 mm hair in a 650 nm beam gives a central band 37.14 mm wide on a wall 2 m away.

A CD as a grating

A CD’s tracks are 1.6 µm apart (625 per mm), so a 650 nm red laser reflects into first order at 23.97° and second order at 54.34°.

Simple spectroscope

A 600 lines/mm grating sends 532 nm green light to 18.61° and 650 nm red to 22.95°, 4.34° apart in first order.

Setting up a demonstration

For 5 mm fringes from a helium-neon laser and slits 0.25 mm apart, put the screen L = Δy × d ÷ λ = 1.975 m away.

Last updated: