Gaussian Beam Simulator Back
Optics Simulator

Gaussian Beam Simulator — Laser Beam Propagation

Compute the beam radius w(z) at the current location, the Rayleigh range zR, the far-field divergence half-angle theta, and the beam diameter at 1 m in real time from wavelength, waist w0, distance z and beam quality M-squared. The hyperbolic beam envelope and the circular Gaussian cross-section at the current z are rendered side by side, making laser optics tangible.

Parameters
Wavelength lambda
nm
Beam waist w0
μm
Propagation distance z
mm
Beam quality M-squared

Defaults are lambda = 1064 nm (Nd:YAG), w0 = 100 μm, z = 100 mm and M-squared = 1.0 (diffraction limit). For z < zR the beam is approximately collimated; for z > zR divergence dominates.

Results
Beam radius at z
Rayleigh range zR
Divergence theta (half-angle)
Beam diameter at 1 m
Beam envelope along z

X = z (mm) 0 to 500 / Y = ±w(z) [μm] / hyperbola spreading symmetrically from the waist (z = 0) / green dashed = ±zR / yellow vertical = current z / colour gradient (blue to red) follows on-axis intensity I(z) = I0 (w0 / w(z))^2

Cross-section at current z (Gaussian intensity)

Center = peak intensity / radial decay I(r) = I0 exp(-2 r^2 / w(z)^2) / white circle = beam radius w(z) (1/e^2 intensity contour) / displayed diameter = 2 w(z)

Theory & Key Formulas

The Gaussian beam (TEM00) is the lowest-order solution of the paraxial Helmholtz equation: a Gaussian transverse intensity profile that spreads as a hyperbola in the longitudinal direction starting from the waist $w_0$.

Beam radius at distance $z$:

$$w(z) = w_0 \sqrt{1+\left(\frac{z}{z_R}\right)^{\!2}}$$

Rayleigh range and far-field divergence half-angle (with the $M^2$ factor):

$$z_R = \frac{\pi w_0^2}{M^2 \lambda},\qquad \theta_{\mathrm{div}} = \frac{M^2 \lambda}{\pi w_0}$$

On-axis intensity (from power conservation):

$$I(z) = I_0 \left(\frac{w_0}{w(z)}\right)^{\!2}$$

$w_0$ is the waist radius (where intensity drops to $1/e^2$), $\lambda$ is the vacuum wavelength, and $M^2$ is the beam quality factor ($M^2 \ge 1$, with $M^2 = 1$ for the diffraction-limited TEM00 mode). For $z \ll z_R$ the beam is essentially collimated, and for $z \gg z_R$ it asymptotes to a cone with half-angle $\theta_{\mathrm{div}}$.

What is the Gaussian Beam Simulator?

🙋
I was taught a laser pointer goes "perfectly straight", but obviously it does spread out at long distances. Is this the tool that lets me compute that?
🎓
Good instinct. A real laser is never perfectly parallel; it follows the Gaussian beam law w(z) = w0 sqrt(1 + (z/zR)^2), a hyperbola spreading from the waist. With the defaults of this tool (lambda = 1064 nm, w0 = 100 micrometres, M^2 = 1) you get zR around 29.53 mm, and at z = 100 mm the beam radius has grown to 353 micrometres. A red 650 nm laser pointer with w0 around 0.5 mm has zR around 1.2 m, so over a few metres it still looks "almost parallel".
🙋
29.53 mm sounds shorter than I expected. What exactly is this "Rayleigh range"?
🎓
The Rayleigh range zR is the distance over which the radius grows by sqrt(2), so the area doubles. Below zR the beam is essentially collimated; beyond zR divergence dominates. Quantitatively zR = pi w0^2 / (M^2 lambda), so doubling w0 multiplies zR by 4. That is exactly the depth of focus engineers care about for laser cutting and microscope objectives. Move w0 from 100 to 200 micrometres in the tool and watch zR jump from 29.53 mm to about 118 mm.
🙋
There is also an M-squared slider. What does that quantify?
🎓
M^2 measures how much worse a real beam focuses than an ideal TEM00 Gaussian. M^2 = 1 is the diffraction limit; at M^2 = 5 the divergence is five times larger and the Rayleigh range shrinks to one fifth. Typical values are about 1.05 for HeNe, 1.1 for single-mode fibre lasers, 5 to 25 for multi-mode Nd:YAG, and 1.1 to 1.5 for high-power fibre lasers. Slide M^2 from 1.0 to 5.0 here and you will see zR drop from 29.53 mm to 5.91 mm, while the divergence grows from 3.39 mrad to 16.93 mrad. That is why a laser cutter spec sheet quotes both output power and an M^2 ceiling such as M^2 less than 1.3.
🙋
In the right plot, when I push z out, the cross-section gets bigger and the colour fades. Doesn't that violate energy conservation?
🎓
Sharp eye. The total beam power P is conserved during propagation, assuming no absorption or scattering, but the on-axis intensity I(z) = I0 (w0/w(z))^2 falls off as the beam widens. At z = 1 m the radius is about 3.4 mm (diameter 6.78 mm), the area ratio (w0/w)^2 is about 0.00087, and the on-axis intensity is therefore about 1/1147 of its waist value. That is precisely why laser-safety standards quote separate maximum permissible exposures for near and far field. The blue-to-red gradient in the tool visualises this I(z) drop-off.

Frequently asked questions

The Rayleigh range zR is the distance from the waist at which the beam radius grows by a factor of sqrt(2), so the cross-sectional area doubles. It is given by zR = pi w0^2 / (M^2 lambda). For z much smaller than zR the beam is effectively collimated, and for z much larger than zR it asymptotically becomes a cone with half-angle theta = M^2 lambda / (pi w0). With the defaults of this tool (lambda = 1064 nm, w0 = 100 micrometres, M^2 = 1) the Rayleigh range is about 29.53 mm; doubling the waist to 200 micrometres extends zR fourfold to about 118 mm. Focal depth in laser cutting and depth of field in microscope objectives are both governed by this Rayleigh range.
M^2 is a dimensionless number that compares a real beam to an ideal TEM00 Gaussian: M^2 = 1 is the diffraction limit, and larger values mean a beam that is harder to focus and that diverges more. Typical values are about 1.05 for HeNe and single-mode laser diodes, 1.1 for single-mode fibre lasers, 5 to 25 for multi-mode Nd:YAG, and 1.5 to 3 for high-power disk lasers. Sliding M^2 from 1.0 to 5.0 in this tool shrinks the Rayleigh range by a factor of M^2 and grows the divergence by the same factor. For laser cutting and micromachining a small M^2 is what lets you keep both a tight focus and a long depth of focus at the same time.
The beam radius w(z) is defined where the on-axis intensity drops to 1/e^2 (about 13.5%). It is not the FWHM of the intensity profile but the conventional optical-design definition. The diameter is 2 w(z), and FWHM is roughly 1.18 times w (about 0.59 times 2w). Laser-safety standards such as IEC 60825-1 sometimes use the FWHM or 1/e diameter rather than 1/e^2 when computing the maximum permissible exposure, so always check the source definition for any beam-size specification. This tool follows the optical industry convention with 1/e^2 radii, and the 'beam diameter at 1 m' stat-card outputs 2 w(1 m).
The simulator assumes a paraxial TEM00 Gaussian and ignores (1) higher-order modes such as TEM10 and TEM11, (2) lens-based focusing or collimation (handled by ABCD matrix tools), (3) wavefront distortion from atmospheric turbulence or thermal lensing, (4) propagation through scattering or absorbing media, and (5) the polarisation dependence of the intensity profile. In real high-power lasers thermal lensing can degrade the effective M^2 by a factor of 2 to 3, and kilometre-scale atmospheric paths can spread the beam several times more than predicted because of the Cn^2 structure constant. The tool is intended for early-stage sizing and for teaching; for precise design pair it with physical-optics packages such as Zemax or VirtualLab Fusion.

Real-world applications

Laser cutting, welding and micromachining: a CO2 laser cutting steel sheets (lambda = 10.6 micrometres, w0 = 50 micrometres, M^2 around 1.2) has a Rayleigh range of only about 0.74 mm, so the optical train (collimator plus focuser) must be designed carefully to keep the depth of focus larger than the sheet thickness. A fibre laser at lambda = 1.07 micrometres, w0 = 20 micrometres and M^2 = 1.1 brings zR to about 1.07 mm under the same constraints. Vary wavelength and M^2 in this tool to see why short-wavelength, high-quality fibre lasers dominate the cutting market: a tighter focus combined with a longer depth of focus. EUV lithography (lambda = 13.5 nm) takes the same logic to sub-nanometre focal spots.

Optical communications and fibre coupling: the launch efficiency into a single-mode fibre such as SMF-28 (mode-field diameter 10.4 micrometres at 1550 nm) peaks when the incoming Gaussian matches the mode in waist, wavefront curvature and decentre. Set w0 = 5.2 micrometres (the SMF-28 mode radius), lambda = 1550 nm and M^2 = 1 in this tool and you get zR around 54.8 micrometres, meaning the coupling lens must be positioned with micrometre-level tolerance. That is why CFP and QSFP modules require active alignment during assembly.

Laser ranging and LiDAR: a typical automotive LiDAR (lambda = 905 nm, w0 = 2 mm, M^2 = 1.5) reaches a beam radius of about 22 mm (44 mm diameter) at 100 m, which sets the trade-off between point-cloud resolution and detection range. Slide w0 from 0.5 mm to 5 mm here and you can feel why short-range high-resolution use cases and long-range high-power-density use cases need very different waist designs. The same logic governs FMCW LiDAR and Geiger-mode single-photon LiDAR.

Confocal microscopy and optical traps: a confocal objective with NA = 0.9 at lambda = 488 nm focuses a beam down to w0 around 0.34 micrometres, with zR around 0.75 micrometres giving micrometre optical sectioning. Optical tweezers focus to w0 around 0.5 micrometres and trap beads, cells or nanoparticles with a stiffness proportional to P / w0^4, giving piconewton-scale forces. Sweep wavelength between 400 and 800 nm, vary w0 between 0.5 and 5 micrometres in this tool, and see how diffraction-limited resolution and trap stiffness move together.

Common misconceptions and caveats

The most common misconception is that "a laser is perfectly parallel". Every real laser diffracts, and the lower bound on its half-angle is theta_min = lambda / (pi w0) for M^2 = 1. Even a 532 nm green laser pointer with w0 = 1 mm gives theta around 0.17 mrad, a 17 cm spot at 1 km. As you make w0 smaller in this tool, theta grows in inverse proportion: this is exactly the optical version of the position-momentum uncertainty relation. That is why laser weapons and interstellar communication concepts use very large output apertures.

Next is the assumption that "beam diameter at any plane is unique". A Gaussian beam admits multiple diameter definitions: 1/e^2 (about 13.5%) radius, FWHM, D86 (the diameter enclosing 86% of the power), and so on. The 1/e^2 standard used here and the FWHM differ by about a factor of 1.7 (FWHM is around 1.18 times w). When you read a laser data sheet, always confirm the convention behind any "beam diameter (1/e^2) = 4 mm" line, and convert to the definition required by IEC 60825-1 (often 1/e) before computing the maximum permissible exposure. The 'beam diameter at 1 m' stat in this tool is 2 w(1 m), the 1/e^2 diameter.

The final pitfall is to "trust the M^2 = 1 number on the spec sheet". In practice, thermal lensing during continuous high-power operation often degrades the effective M^2 by a factor of 2 to 3. A 100 W fibre laser specified at M^2 = 1.1 may run at M^2 = 1.5 after warm-up, shifting the focus location and waist diameter and so degrading machining accuracy. Compare M^2 = 1.0 and M^2 = 2.0 in this tool: the Rayleigh range and peak focal intensity each change by a factor of four. In a production system you should measure M^2 periodically with a beam profiler and use beam expanders or spatial filters to maintain the design value.