Skip to content
ScienceQuest
Waves & Optics Simulator Undergraduate

Double Slit Simulator

Two slits and one wavelength, with the fringe pattern redrawn as you change the spacing, the slit width or the colour. Shows why some orders vanish.

Simulator

Missing orders
A fringe landing exactly on a zero of the envelope. Happens whenever m·a/d is a whole number: every third order when the separation is three widths, orders 5, 10 and so on at 2.5 widths.
±3, ±6, ±9, ±12, ±15, ±18, ±21, ±24, ±27, ±30, ±33, ±36, ±39, ±42, ±45, ±48, ±51, ±54
Fringe spacing
Centre to first order, measured on the screen. Grows with wavelength and with screen distance, shrinks with separation.
18.3 mm
Angular spacing
asin(λ/d). Set by the wavelength and the separation alone, so moving the screen cannot change it.
1.05 °
Fringes visible
Both sides plus the centre. Only 5 of them sit inside the bright central lobe.
73
Envelope minimum
First zero of the single-slit envelope, at a·sinθ = λ. A slit narrower than one wavelength has no zero at all.
3.15 °
Separation / width
A whole number here removes every order that is a multiple of it: at 3, every third fringe is gone. A fraction such as 2.5 removes orders too, in that case 5, 10 and so on.
3
Parameters
nm

The visible range. Red fringes sit almost twice as far apart as violet ones.

µm

Centre to centre. This sets the fringe spacing and nothing else.

µm

Sets the envelope. Make the separation a whole multiple of this to kill entire orders.

cm

Moves no fringe in angle. It only scales the pattern you measure with a ruler.

The separation sets where the fringes are. The slit width sets how bright each one comes out. Only the second of those can remove a fringe entirely.

  • Intensity
  • Single-slit envelope
Intensity against angle, with the single-slit envelope dashed over it. Fringes sit at equal steps in the sine of the angle, and the envelope is what dims the outer ones and removes missing orders altogether.

Citing this tool

Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.

Teaching with this? You can put it on a class page or LMS for free, with no ads inside the frame. Get the embed code.

The equation

dsin⁡θ=mλd\sin\theta = m\lambda

Young (1801), double-slit interference

Two effects, multiplied together

Almost every textbook picture of this experiment shows evenly spaced fringes of equal brightness. Almost every real photograph shows fringes that fade away towards the edges, and sometimes a fringe missing entirely. Both pictures are of the same experiment, and the difference is that the real one has two things happening at once.

The two slits interfere with each other. Light from one arrives a little later than light from the other, and when that delay is a whole number of wavelengths the two add up. That gives bright fringes wherever d sin θ = mλ, evenly spaced in the sine of the angle, with d the separation between slit centres.

Each slit also diffracts on its own, because it has a finite width. A single slit of width a produces a broad central hump with zeros at a sin θ = mλ. Since a is smaller than d, those zeros are much further apart than the fringes.

What you actually see is one multiplied by the other: I = I₀ cos²(πd sinθ/λ) · sinc²(πa sinθ/λ). The cos² makes the fringes and the sinc² is an envelope that decides how bright each one gets. The dashed curve on the graph is that envelope on its own, which is the quickest way to see which formula owns which feature.

Missing orders

Now the interesting case. An interference maximum can land exactly on a zero of the envelope, and when it does the fringe is not merely dim, it is absent. The condition is easy to state: it happens when the separation is a whole-number multiple of the slit width, and more generally whenever an order m makes ma/d a whole number, so a separation of 2.5 widths removes orders 5, 10 and so on.

Set the separation to three times the width and every third fringe disappears: orders 3, 6, 9 and so on. Set it to twice the width and every second one goes. The readout reports which orders have vanished, and the ratio underneath tells you when to expect it.

This is worth doing by hand once, because it is a genuine prediction rather than a curiosity. Interference says a fringe belongs at sin θ = 3λ/d. With d = 3a that is sin θ = λ/a, which is precisely the envelope’s first zero. Two independent conditions coincide, so the fringe has nowhere to appear.

Screen distance changes the picture, not the physics

Move the screen further away and every fringe stays exactly where it was in angle. Nothing about d sin θ = mλ mentions the screen. What changes is the spacing you would measure with a ruler, because a fixed set of angles intercepts a more distant screen further apart.

That is where the familiar lab formula comes from. Near the axis the angles are small, so sin θ ≈ tan θ ≈ θ, and the fringe spacing on the screen is about λL/d. It is an approximation and it is a good one for the first few fringes.

Further out it fails, and this simulator does not use it. Positions here come from L tan θ with the angle from the exact sine condition, which is why the outer fringes on the coloured band are not quite evenly spaced: they spread further apart. That widening is real, and using λL/d across the whole pattern would hide it.

Why red spreads further than blue

Fringe positions scale with wavelength: sin θ = mλ/d. Deep red at 700 nm has nearly twice the wavelength of violet at 380 nm, so its fringes sit almost twice as far apart through the same pair of slits. Drag the wavelength slider and watch the whole pattern breathe in and out.

This is also why the experiment is done with a laser or a filter. In white light every wavelength produces its own set of fringes, all sharing a central maximum but diverging further out, so the centre stays white and the fringes either side turn into coloured bands that quickly wash into each other.

Counting how many fringes you can get

There is a hard limit, and it comes from the sine. Since sin θ cannot exceed 1, no order beyond m = d/λ exists at all. With a 30 µm separation and 550 nm light that is 54 orders each side, but at 2 µm it is only 3.

The boundary case is worth noticing. When mλ equals d exactly, the fringe would sit at 90 degrees, running parallel to the screen and never meeting it. The readouts count only fringes that reach a finite point, so 500 nm through a 2 µm separation gives three orders and not four.

What this model leaves out

This is the far-field, or Fraunhofer, pattern: it assumes the screen is far enough away that rays reaching any one point are effectively parallel. Close to the slits the pattern is different and considerably messier, and the transition is governed by the Fresnel number.

The light is taken to be perfectly monochromatic and perfectly coherent, from a source of no size at all. A real lamp has a spread of wavelengths and a finite width, and both blur the fringes, with the effect growing towards the outer orders. That blurring is the practical reason fringe visibility falls off faster in a real experiment than it does here.

The slits are treated as infinitely tall, so this is a one-dimensional pattern. Real slits diffract vertically too, which is why a photograph shows short dashes rather than lines of unlimited length. The treatment is also scalar, so nothing here describes polarisation, and the slits are ideal apertures in an infinitely thin opaque screen with no thickness and no edge effects.

Common mistakes

  • Using λL/d for the whole pattern. It is a small-angle approximation. Beyond the first few orders the exact sine condition and L tan θ are needed, and the difference is visible.
  • Mixing up d and a. The separation sets where fringes are. The width sets how bright they are. Only the width can remove one.
  • Expecting equal brightness. The envelope dims everything away from the centre, and the fringes inside the central lobe are the only ones near full strength.
  • Treating a missing order as an error. It is a prediction. Check the separation to width ratio before assuming the apparatus is faulty.
  • Counting an order at exactly 90 degrees. It never reaches the screen, so it is not a fringe you can observe.
  • Forgetting that both slits must be illuminated coherently. Cover one and the fringes vanish, leaving the single-slit envelope alone, which is the dashed curve on the graph.
  • Reading the angular spacing as constant in angle. It is constant in sin θ. Those are the same thing only while the angles stay small.

Model and assumptions

Method
Exact expression, no time stepping
Repeatability
Deterministic. The same link gives the same numbers on any machine.

What it assumes

  • Far-field Fraunhofer diffraction, with intensity given exactly by a two-slit interference factor times a single-slit sinc-squared envelope.
  • One wavelength, fully coherent illumination, and slits of finite width in an opaque screen.
  • Scalar wave optics: no polarisation and no vector field effects.

Where it stops holding. Near-field distances, where the far-field approximation fails and the pattern is not yet formed.

Numerical accuracy

No method error to report: the result is a closed-form expression evaluated directly, with no time stepping to accumulate error. What remains is double-precision rounding, of order one part in 10^16 per operation.

Double Slit Simulator: the equation d sin θ = mλ.
The equation the simulator is built on, with its source. Image © ScienceQuest, CC BY 4.0. Free to reuse with credit and a link to this page; how to reuse it. Download PNG

Common questions

Why are the fringes not all the same brightness?

Because two separate effects are happening at once. The two slits interfere with each other, which produces the evenly spaced fringes at d sin θ = mλ. Each slit also diffracts on its own, because it has a finite width, and that produces a broad envelope with its own minima at a sin θ = mλ. What you see is the fringe pattern multiplied by the envelope, so fringes near the centre are bright and those further out are dimmed by the envelope falling away.

What is a missing order?

A fringe that should be there by the two-slit condition but lands exactly on a zero of the single-slit envelope, so nothing appears. It happens whenever the slit separation is an exact whole-number multiple of the slit width: with d = 3a, every third fringe is missing. Widen the slits towards the separation and you can watch orders disappear one at a time, which is a good check that you understand which formula controls which feature.

Does the pattern depend on the screen distance?

The angles do not, but the spacing you measure on the screen does. Fringes sit at fixed angles set by d sin θ = mλ, and the screen simply intercepts them, so the separation between adjacent fringes on the screen is about λL/d for a screen at distance L. Doubling the distance doubles the spacing without moving a single fringe in angle, which is why the small-angle form is the one used in the lab.

Why does red give wider fringes than blue?

Because the fringe positions depend on wavelength, and red light, near 700 nm, has about one and a half times the wavelength of blue light near 450 nm, and nearly twice that of violet at 380 nm. Since sin θ = mλ/d, a longer wavelength pushes every fringe further out, so red fringes are spaced about one and a half times as widely as blue ones, and nearly twice as widely as violet ones, through the same pair of slits. Shine white light through and each colour produces its own set, which is why the fringes away from the centre look coloured rather than white.