Thin-Film Optical Coating Calculator

Enter the light's wavelength, the refractive indices above, inside, and below the film, and the film thickness to find the optical path difference, the reflection phase shift, and the minimum thickness for constructive or destructive interference.

Quick Facts

Optical path difference
OPD = 2·n₂·t·cos(θ₂)
The extra distance the beam reflected off the bottom surface travels inside the film versus the top-surface beam.
Reflection phase shift
+180° (λ/2) at higher-index interfaces
Reflecting off a higher refractive index flips phase by π; reflecting off a lower index does not.
Quarter-wave AR coating
t = λ/(4·n₂)
Minimizes reflectance when n₁ < n₂ < n₃, e.g. MgF₂ (n≈1.38) on glass (n≈1.52).
Snell's law inside the film
n₁ sin(θ₁) = n₂ sin(θ₂)
Sets the refraction angle θ₂ used in the path-length calculation.

Your Results

Calculated
Optical Path Difference
-
OPD = 2·n₂·t·cos(θ₂)
Phase Difference at Reflection
-
Total phase shift between the two reflected beams
Min. Thickness — Constructive
-
First-order thickness for a bright reflected fringe
Min. Thickness — Destructive
-
First-order thickness for minimum reflectance (anti-reflective)

Ready

Enter the wavelength, refractive indices, and film thickness, then press Calculate.

How Thin-Film Interference Works

When light strikes a thin, transparent film — an oil slick on water, a soap bubble, or an engineered anti-reflective coating on a lens — part of the light reflects off the top surface and part continues into the film and reflects off the bottom surface. Those two reflected beams recombine and interfere. Whether they reinforce (constructive interference, a bright reflection) or cancel (destructive interference, a dim or anti-reflective surface) depends on two things: the extra distance the second beam travels inside the film, and any phase shift the beams pick up on reflection.

How the calculation works

The beam that enters the film and reflects off the bottom travels an extra optical path of 2·n₂·t·cos(θ₂), where n₂ is the film's refractive index, t is its physical thickness, and θ₂ is the angle of refraction inside the film (found from Snell's law, n₁sin(θ₁) = n₂sin(θ₂); at normal incidence θ₂ = 0° and cos(θ₂) = 1). Separately, a beam reflecting off a medium with a higher refractive index than the one it is traveling through picks up a 180° (π radian, or λ/2) phase shift; reflecting off a lower index causes no shift. Comparing the shift at the n₁/n₂ interface to the shift at the n₂/n₃ interface tells you whether the two reflections start in phase or already a half-wavelength apart, which flips which path lengths count as constructive versus destructive.

Common mistakes

  • Ignoring the phase shift term: using only 2n₂t = mλ for "bright" reflection is only correct when both interfaces (or neither) produce a phase shift. If exactly one interface does, constructive and destructive conditions swap.
  • Confusing vacuum wavelength with in-film wavelength: the wavelength that shortens inside the film is λ/n₂, but the standard interference formulas are written in terms of the vacuum (or air) wavelength λ, which is what you should enter here.
  • Forgetting the substrate index: a film's anti-reflective or high-reflective behavior depends on all three indices (n₁, n₂, n₃), not just the coating material — the same MgF₂ layer behaves differently on glass than on a metal mirror.

Real-world applications

  • Camera lenses and eyeglasses use quarter-wave MgF₂ or similar coatings (t ≈ λ/(4n₂)) to reduce glare and increase light transmission.
  • Soap films and oil slicks display rainbow bands because the constructive-interference thickness differs by wavelength, so each color reflects strongest at a different film thickness.
  • Dielectric mirrors and bandpass filters stack many thin layers, each tuned so reflected beams from every interface add constructively at the target wavelength.
  • Semiconductor fabrication uses thin-film interference colors on silicon wafers as a quick visual check of oxide layer thickness.

Frequently Asked Questions

Why do thin films like soap bubbles and oil slicks show rainbow colors?
White light contains many wavelengths, and the film thickness that produces constructive interference (a bright reflection) is different for each wavelength. At any given spot, some colors reflect strongly and others cancel out, so the film reflects a shifting mix of colors that changes with thickness and viewing angle.
Why does an anti-reflective coating use a quarter-wavelength thickness?
For a coating with n1 < n2 < n3 (e.g., air-MgF2-glass), both reflected beams pick up the same reflection phase shift, so they cancel out. What is left is the path difference inside the film: setting t = λ/(4n2) makes the round-trip path exactly half a wavelength, so the two reflected beams arrive out of phase and destructively interfere, minimizing reflected light.
What is the phase shift on reflection, and when does it happen?
When light reflects off a medium with a higher refractive index than the one it is traveling through, it undergoes a 180° (π radian, or λ/2) phase shift. Reflecting off a lower-index medium causes no phase shift. Whether the two reflections in a thin film pick up the same shift or different shifts determines whether the film is naturally anti-reflective or naturally reflective at zero thickness.
How is the angle of refraction inside the film found?
Snell's law relates the incidence angle in the first medium to the refraction angle inside the film: n1 sin(θ1) = n2 sin(θ2). This calculator solves for θ2 and uses it in the optical path difference formula 2·n2·t·cos(θ2), which reduces to 2·n2·t at normal incidence (θ1 = 0°).