Thin-film interference appears when light reflects from the two boundaries of a very thin layer, such as a soap bubble, an oil slick, or a water film.
One reflected ray comes from the top surface of the film, while another ray enters the film, reflects at the lower surface, and emerges back into the top medium.
Because the two reflected rays travel different optical distances, they can interfere constructively or destructively.
The central quantity in the simplest single-film model is the optical path difference
\[
\Delta = 2nt\cos\theta,
\]
where \(n\) is the refractive index of the film, \(t\) is the film thickness, and \(\theta\) is the angle inside the film relative to the normal.
The factor of 2 appears because the internal ray travels down through the film and then back up.
The factor \(n\) is included because the relevant phase depends on optical path, not just geometric distance.
If there were no extra reflection phase shifts, the usual conditions would be
\[
\text{Constructive: } \Delta = m\lambda,
\qquad
\text{Destructive: } \Delta = \left(m+\frac12\right)\lambda,
\]
with \(m=0,1,2,\dots\). However, thin-film interference is famous because reflections can introduce an additional phase reversal.
When light reflects from a boundary leading into a denser medium, the reflected wave gains a phase shift of \(\pi\) radians.
Reflection from a boundary leading into a less dense medium does not produce that extra \(\pi\) shift.
If the two reflected rays differ by an odd number of such \(\pi\) reversals, there is a net extra phase shift of \(\pi\).
In that case the reflected-light conditions swap:
\[
\text{Constructive: } \Delta = \left(m+\frac12\right)\lambda,
\qquad
\text{Destructive: } \Delta = m\lambda.
\]
This is why a soap bubble or a water film can look bright for one color and dark for another even when the path-difference formula itself looks simple.
The geometric path contribution and the reflection phase contribution must both be taken into account.
The phase difference of the two reflected rays can be written as
\[
\Phi = \frac{2\pi\Delta}{\lambda} + \phi_r,
\]
where \(\phi_r\) is either \(0\) or \(\pi\), depending on whether there is no net reflection phase reversal or one net reversal.
In a simple equal-amplitude two-beam preview, the reflected intensity is then modeled as
\[
I = I_0\cos^2\left(\frac{\Phi}{2}\right).
\]
This is not a full Fresnel-amplitude treatment, but it is a very useful educational approximation because it shows how the reflected brightness changes continuously as film thickness changes.
For the sample input
\(t=200\ \text{nm}\),
\(n=1.33\),
\(\theta=0^\circ\),
and
\(\lambda=550\ \text{nm}\),
the optical path difference is
\[
\Delta = 2nt\cos\theta
= 2(1.33)(200\ \text{nm})(1)
= 532\ \text{nm}.
\]
Since this value is very close to \(550\ \text{nm}\), it is close to the condition
\[
\Delta \approx 1\lambda.
\]
If the reflected-light case has a net \(\pi\) shift, then
\[
\text{Destructive: } \Delta = m\lambda,
\]
so the sample is close to a destructive shifted condition. That matches the example output.
The animation in the calculator shows the first reflected ray from the top interface and the second reflected ray that travels through the film and back out.
The right side then previews the reflected color and an intensity-vs-thickness plot for the selected wavelength.
This makes it easier to see why tiny changes in thickness can strongly change the observed color.
At a more advanced level, real thin-film calculations often include Fresnel reflection coefficients, unequal amplitudes, polarization, multiple internal reflections, dispersion, and multilayer stacks.
Those ideas lead into dielectric coatings, anti-reflection layers, mirrors, and optical filters.
But the foundational formulas remain the same in spirit:
first compute the optical path difference, then decide whether a reflection phase reversal changes the constructive or destructive condition.
So the key takeaways are:
\[
\Delta = 2nt\cos\theta,
\qquad
\Phi = \frac{2\pi\Delta}{\lambda} + \phi_r,
\]
and the important physical idea that
reflection from a denser medium introduces a \(\pi\) phase shift.
That single extra phase reversal is what makes thin-film interference such a rich and visually striking topic.