A Fabry-Perot laser cavity supports standing electromagnetic waves only at specific resonance frequencies.
These resonances occur when an integer number of half-wavelengths fits inside the optical length of the cavity.
If the physical cavity length is \(L\), the refractive index inside the cavity is \(n\), and the longitudinal mode number is \(m\), then the resonance condition is
\[
m\frac{\lambda_n}{2}=L,
\]
where \(\lambda_n=\lambda/n\) is the wavelength inside the medium.
Rewriting this in frequency form gives the longitudinal mode frequencies
\[
f_m=\frac{mc}{2nL}.
\]
This means the resonant frequencies are evenly spaced in frequency.
The separation between adjacent longitudinal modes is called the free spectral range, abbreviated FSR:
\[
\Delta f = f_{m+1}-f_m = \frac{c}{2nL}.
\]
So once the cavity length and refractive index are known, the spacing between resonances is fixed.
Shorter cavities have larger free spectral ranges, while longer cavities have smaller ones.
This is why compact semiconductor laser cavities can have very large mode spacings, whereas longer gas-laser cavities support many closely spaced longitudinal modes.
The sample case in this calculator is a HeNe-style cavity with
\(L=30\,\text{cm}\) and \(n\approx1\).
The free spectral range is
\[
\Delta f=\frac{c}{2L}
=\frac{3.00\times10^8}{2(0.30)}
\approx 5.0\times10^8\,\text{Hz}
=500\,\text{MHz}.
\]
If the target wavelength is \(\lambda=632.8\,\text{nm}\), then the optical frequency is
\[
f=\frac{c}{\lambda}\approx \frac{3.00\times10^8}{632.8\times10^{-9}}
\approx 4.74\times10^{14}\,\text{Hz}.
\]
The corresponding longitudinal mode number is approximately
\[
m\approx\frac{f}{\Delta f}\approx \frac{4.74\times10^{14}}{5.0\times10^8}\approx 9.48\times10^5.
\]
This shows an important idea: although the wavelength is in the visible range, the mode number is enormous because many half-wavelengths fit inside even a modest cavity.
In practical lasers, not every resonant mode oscillates. The cavity resonances must also lie inside the gain bandwidth of the active medium.
If the gain bandwidth is \(\Delta \nu_g\), then the approximate number of longitudinal modes that can fit inside it is
\[
N_g \approx \left\lfloor \frac{\Delta \nu_g}{\Delta f}\right\rfloor + 1.
\]
This is only an estimate, but it is very useful.
A cavity with a very large free spectral range may allow only one or a few longitudinal modes inside the gain profile, while a longer cavity may allow many.
This is one reason short cavities are important for single-mode operation.
Another essential concept is cavity stability.
For a two-mirror resonator with mirror radii \(R_1\) and \(R_2\), one defines
\[
g_1=1-\frac{L}{R_1},
\qquad
g_2=1-\frac{L}{R_2}.
\]
The geometrical resonator is stable when
\[
0 < g_1g_2 < 1.
\]
If the product is exactly 0 or 1, the resonator is marginal.
Outside that interval, the resonator is unstable.
This stability condition is independent of the basic longitudinal-mode spacing formula, but it is crucial for determining whether the cavity can confine rays and Gaussian modes in a practical way.
Special edge cases include the plane-plane cavity, which is marginal, the confocal cavity, which is also on the boundary, and the hemispherical cavity, which is marginal as well.
Even though the simple resonance formula
\(f_m=mc/(2nL)\)
still appears in introductory calculations, the stability test tells you whether the cavity geometry is physically robust.
At a more advanced university level, one goes beyond the empty-cavity model and includes gain narrowing, mirror reflectivities, transverse modes, Gaussian beam parameters, and full ABCD-matrix treatments.
But the three core ideas remain the same:
the longitudinal-mode frequencies,
the free spectral range,
and the resonator-stability condition.
\[
f_m=\frac{mc}{2nL},
\qquad
\Delta f=\frac{c}{2nL},
\qquad
0 < g_1g_2 < 1.
\]
These formulas let you predict where the cavity resonances occur, how far apart they are, how many can fit under a gain envelope, and whether the mirror geometry is stable enough to support resonant laser operation.