Simuveliq

Interference and diffraction calculator

Solve wave optics problems from whatever data you have: the position and spacing of Young's fringes, the minima and the width of the central maximum of a slit, the Airy disk and the Rayleigh criterion, the orders and resolving power of a diffraction grating, and the thickness of a thin film that reinforces or cancels a color, with the phase changes on reflection. Each case draws what is seen on the screen and its intensity curve.

Theory and worked examples: Interference and diffraction of light.

What you can do

Frequently asked questions

Where are the fringes of the double slit?

The bright ones where d sin θ = m λ and the dark ones where d sin θ = (m + ½) λ; on the screen, y = L tan θ, and with small angles the fringes are Δy = λ L/d apart. With λ = 600 nm, d = 0.25 mm and the screen at 1.2 m, Δy = 2.88 mm and the third bright fringe is 8.64 mm from the center.

How wide is the central maximum of a slit?

It goes from one first minimum to the other, at a sin θ = λ, so it is W = 2 L tan θ₁ ≈ 2 λ L/a wide. A 0.1 mm slit with 633 nm light and the screen at 2 m gives a 25.32 mm central maximum, twice the others.

How many orders does a diffraction grating give?

Those with sin θ = m λ/d < 1. A 600 lines/mm grating has d = 1.667 µm: with 500 nm light the first order leaves at 17.46° and the highest order is 3.

How thick must an anti-reflective coating be?

A quarter of the wavelength inside the layer when both reflections change phase: t = λ/(4n). An MgF₂ layer (n = 1.38) on glass with n = 1.52 cancels 550 nm with 99.64 nm; the ideal index would be √1.52 = 1.233. A soap bubble (n = 1.33) in air, with only one reflection changing phase, reinforces 550 nm at 103.4 nm.

What is the Rayleigh criterion?

Two points are resolved if at least the angular radius of the Airy disk separates them, sin θ = 1.22 λ/D. A 3 mm pupil with 550 nm light gives 0.01282° (46.13″): two headlights 1.5 m apart are resolved up to about 6706 m. A 10 cm telescope reaches 1.384″.

Guide: interference and diffraction of light

When light goes through slits or reflects off very thin layers, its waves add up and bright and dark fringes appear that ray optics cannot explain. This guide covers Young's double slit, diffraction by a slit and by a circular aperture, diffraction gratings and thin films, with examples checked in the tool. Wavelengths are those in vacuum.

Interference from two slits

Two slits lit by the same wave are two sources in phase. A distant point of the screen gets their light along paths that differ by Δr = d·sin θ, with d the slit separation. If that difference is a whole number of wavelengths the waves add up; if it is a whole number plus a half, they cancel:

bright: d·sin θ = m·λ dark: d·sin θ = (m + ½)·λ y = L·tan θ

With small angles the fringes are evenly spaced, Δy = λ·L/d. Since sin θ < 1, the order cannot exceed d/λ. The intensity is I = I₀·cos²(π·d·sin θ/λ); if the slits have a width a, it is multiplied by the diffraction envelope of each one, and the orders that fall on its minima (the multiples of d/a) are missing.

Diffraction by a slit and by a circular aperture

Each point of the slit emits like a source. In the direction θ where the slit can be split into two halves whose waves arrive out of phase, the light cancels: the minima are at a·sin θ = m·λ (m = 1, 2, 3…), and the central maximum, between the first two, is W = 2·L·tan θ₁ ≈ 2·λ·L/a wide, twice the others. A circular aperture of diameter D gives a bright disk with rings, the Airy disk, with its first minimum at sin θ = 1.22·λ/D. It is also the Rayleigh criterion: two points are resolved if at least that angle separates them.

Diffraction gratings

A grating has thousands of slits d = 1/N apart (N lines per meter). The maxima satisfy the same equation as the double slit, d·sin θ = m·λ, but they are thin bright lines: each color leaves at its own angle and the grating spreads the spectrum. The resolving power, λ/Δλ = m·Ntot, grows with the order and with the number of lines illuminated.

Thin films

In a film of thickness t two waves are reflected: one at the top face and one at the bottom, which travels 2·nf·t more optical path (2·nf·t·cos θt if the light arrives at an angle). Besides, each reflection off a medium of higher index adds half a wave of phase. If there is one such reflection (a soap bubble in air), the reflected light is reinforced when 2·nf·t = (m + ½)·λ; if there are none or two (an anti-reflective coating on glass), it is reinforced when 2·nf·t = m·λ and cancelled when it is (m + ½)·λ. The smallest thickness of an anti-reflective coating is a quarter of the wavelength inside the layer, λ/(4·nf), and it cancels completely if nf = √(n₁·n₂).

Worked examples

  1. Young: λ = 600 nm, d = 0.25 mm and the screen at 1.2 m. The third bright fringe is at sin θ = 3·600×10⁻⁹/0.25×10⁻³, θ = 0.4125°, y = 1.2·tan θ = 8.64 mm; the fringes are Δy = 2.88 mm apart and the highest order is 416.
  2. The second bright fringe is 4.5 mm from the center, with d = 0.3 mm and L = 1.5 m. λ = d·sin θ/2 = 450 nm. The first dark fringe with λ = 500 nm, d = 0.1 mm and L = 2 m is at 5 mm.
  3. Slits 0.05 mm wide and 0.2 mm apart (λ = 550 nm, L = 1 m). d/a = 4: orders 4, 8… are missing. The second bright fringe, at 5.5 mm, has an intensity of 0.4053·I₀ because of the envelope.
  4. d = 2 µm and λ = 650 nm. d/λ = 3.08: the highest order is 3 and there are 7 bright fringes. The third leaves at 77.16°: at 1 m it is 4.388 m from the center, while the small-angle formula would give 0.975 m.
  5. A 0.1 mm slit, λ = 633 nm, screen at 2 m. θ₁ = 0.3627° and the central maximum is 25.32 mm wide. Conversely, a 12 mm central maximum 1.5 m away with 500 nm comes from a 0.125 mm slit. The second minimum of a 0.05 mm slit with 600 nm at 1 m is at 24.01 mm.
  6. Rayleigh criterion. A 3 mm pupil with 550 nm light resolves 0.01282° (46.13″): two headlights 1.5 m apart are resolved up to about 6706 m. A 10 cm telescope reaches 1.384″, and with a 1 m focal length its Airy disk is 0.01342 mm across.
  7. A 600 lines/mm grating with 500 nm light. d = 1.667 µm, the first order leaves at 17.46° and the highest order is 3. If the first order of an unknown light leaves at 20° from a 500 lines/mm grating, λ = 2 µm·sin 20° = 684 nm. With 300 lines/mm and 650 nm, the second order leaves at 22.95° and on a screen 1.5 m away it is 0.6353 m from the center.
  8. The sodium doublet (589.0 and 589.6 nm) in second order. R = 589/0.6 = 981.7, so 490.8 illuminated lines are needed: with 300 lines/mm, 1.636 mm of grating.
  9. Films. A soap bubble (n = 1.33) reinforces 550 nm at 550/(4·1.33) = 103.4 nm. An MgF₂ coating (n = 1.38) on 1.52 glass cancels it at 99.64 nm (the ideal index would be 1.233). An oil slick (n = 1.45) 300 nm thick on water reinforces λ = 2·1.45·300/1.5 = 580 nm. A 400 nm water film seen at 30° reinforces 657.3 nm (and 394.4 nm).

How to use the tool

  1. Under Kind of problem, choose the Problem: double slit, single slit and circular aperture, diffraction grating or thin films. Depending on the case, choose whether the fringe is bright or dark, the aperture, or whether you want reinforcement or cancellation in the reflected light, and check «Smallest thickness» for the lowest possible order.
  2. Under Data, type what you know (λ in nm, slits in mm, gratings in lines/mm) and leave empty what you are looking for. The groups of the panel only enter if you type one of their values. For films, type the three indices: the tool counts the phase changes.
  3. Look at the figure: a sketch of the experiment with what is seen on the screen and its intensity curve, the orders of the grating at their true angles, or the two waves reflected by the film and the reflected light by color.
  4. Check the Step by step, which converts everything to SI, and the Detailed solution (PDF). The cases of this guide are under Examples.

Common mistakes

Further reading

The chapters on interference, diffraction and thin-film optics of any university physics textbook. On Simuveliq, geometric optics treats light as rays (lenses, mirrors and prisms) and waves and sound explains waves that add up, standing waves and beats.

More tools

Versión en español

© 2026 Simuveliq. All rights reserved.