Laser focus calculator & ramp test generator
See how a focused beam pinches to its smallest spot and spreads again, how much each CO2 lens or fiber f-theta lens gives you, and how far off focus the material can sit. Then make a ramp test file: tilt a board, burn one marked line, and read your real focus error off the board.
1Your laser and lens
2Move the material
Lenses side by side
Same input beam, same scale. Tap a lens to use it.
3Ramp test: the board
4Ramp test: the line
The SVG is drawn in millimetres for LightBurn or xTool Creative Space. Place the drawing so its leftmost line is 10.0 mm from the low end of the board and its lowest line 1.0 mm from the board’s front edge.
G-code
The formulas
λ is the wavelength (10.6 µm for CO2, 1.064 µm for fiber), f the focal length, D the beam diameter at the lens and M² the beam quality (1 for a perfect Gaussian beam). These are the formulas Omni Calculator uses; with M² = 1 the spot formula matches Sintec Optronics’ 1.27 λ f ÷ D for an f-theta lens. Depth of focus is defined, as both sources do, as twice the Rayleigh range: the distance over which the spot stays within √2 of its smallest diameter. The ramp formula is similar triangles: a board of length L raised by h rises h over its horizontal run.
The formulas give an ideal spot. A Sandia study of focusing lenses on a CO2 laser found that measured spots grew well above the aberration-free prediction as the focal length got shorter, which it put down to spherical aberration. Diode lasers are left out: their spots are rectangular and the beam is not a single round Gaussian beam, so measure them with the ramp test.
CO2 lenses compared
| Lens | Our spot · depth of focus | Sintec chart | Thunder Laser’s suggested use |
|---|---|---|---|
| 1.5 in 38.1 mm | 0.09 mm · ±0.48 mm | 0.076 mm · ±1.91 mm | Fine engraving, small text, photos |
| 2.0 in 50.8 mm | 0.12 mm · ±0.85 mm | 0.127 mm · ±2.54 mm | General engraving and cutting; the usual starting lens |
| 2.5 in 63.5 mm | 0.15 mm · ±1.33 mm | 0.178 mm · ±3.81 mm | Cutting where more focus tolerance helps |
| 4.0 in 101.6 mm | 0.24 mm · ±3.41 mm | 0.304 mm · ±5.06 mm | Thick or low-density material, roughly over 10 mm |
Our columns assume a 7 mm beam at the lens and M² 1.2 — our own placeholder values, not maker figures; change them in the calculator. Sintec’s chart does not state its beam. It labels its depth-of-focus figures “+/-”, although its own text defines depth of focus as the full twice-Rayleigh range, and the figures are wider than the Rayleigh definition gives for the same spot, so compare the trend, not the exact numbers.
Fiber f-theta lenses
Galvo fiber lasers focus through an f-theta lens, named by focal length and marking field. Thunder Laser USA identifies the lenses on its Aurora fiber laser as F160, F210 and F290 for the 110, 150 and 200 mm fields. A longer lens covers a bigger field with a bigger spot and a deeper focus:
| Lens | Field | Our spot · depth of focus |
|---|---|---|
| F160 | 110 × 110 mm | 46 µm · ±1.06 mm |
| F210 | 150 × 150 mm | 61 µm · ±1.83 mm |
| F290 | 200 × 200 mm | 84 µm · ±3.49 mm |
Assumes a 7 mm beam and M² 1.5 (a common spec for 20 W pulsed fiber sources is M² below 1.5 and a 6–8 mm beam). Other makers sell 150 × 150 mm lenses at 210 or 225 mm, so read the focal length printed on your lens.
How to run the ramp test
- Take a flat scrap board 150–300 mm long and at least 15 mm wide (the line, marks and numbers sit within 12 mm of its front edge). Measure its length and the height of whatever you slip under one end — 5 to 12 mm is typical. Make sure the head clears the high end.
- Focus the way you normally do, on the spot you choose in the generator (the middle is best: it measures errors both ways).
- Download the SVG or the G-code. In LightBurn or xTool Creative Space, use the SVG; place the drawing so its leftmost and lowest lines sit the stated distances from the low end and the front edge. With G-code, set the work origin X0 Y0 at the front corner of the low end, and tick the confirmation box before saving.
- Burn at low power, just enough to mark. The line is thick at the ends and pinches to its thinnest point at the true focus.
- Read the mark at the thinnest point and type it into the generator: it tells you which way and how far to move.
If your laser has a motorized Z axis that LightBurn controls, LightBurn’s own Focus Test does the same job by stepping Z instead of tilting the board. Thunder Laser’s guide for its Bolt runs a coarse test, then a fine one between the two best lines, and sets the autofocus offset from the result. Once you know the spot size, the line interval & DPI calculator turns it into an engraving interval, and how thick a laser can cut shows what happens when the cut runs out of focus.
FAQ
- What is the spot size of a 2 inch CO2 laser lens?
- About 0.12 mm in theory, if the beam reaching the lens is 7 mm wide with a beam quality M² of 1.2: d = 4 M² λ f ÷ (π D) = 4 × 1.2 × 0.0106 × 50.8 ÷ (π × 7). Sintec Optronics’ chart for a typical CO2 laser gives 0.127 mm. A wider beam at the lens gives a smaller spot, and a worn tube or dirty optics a bigger one.
- Which CO2 lens focal length should I use?
- Thunder Laser’s lens guide treats 2.0 in as the general starting lens, 1.5 in for fine engraving and small text, 2.5 in for cutting where more focus tolerance helps, and 4.0 in for thick or low-density material, roughly over 10 mm, calling these starting choices rather than limits. The calculator shows why: depth of focus grows with the square of the spot size, so a longer lens trades detail for tolerance.
- How do I do a ramp test on a diode laser?
- Raise one end of a flat scrap board by a measured height, focus on the middle of the board as usual, and burn one straight line along the slope at low power. The line is thick at both ends and thinnest where the surface met the focus. Our generator adds height marks to the line, so you read the focus error directly: if the thinnest point is at +1.0, the true focus is 1.0 mm above the surface you focused on.
- Does LightBurn have a focus test?
- Yes. LightBurn’s Focus Test engraves a row of lines, each at a different Z height, and the thinnest line is the best focus. It needs a motorized Z axis that LightBurn controls, with Z control enabled in Device Settings. Without one, the tilted-board ramp test does the same job.
Sources
- Omni Calculator, Laser spot size calculator (spot size, Rayleigh range and depth of focus with M²).
- Sintec Optronics, Optical calculation in laser marking system (depth of focus as twice the Rayleigh range, the CO2 lens chart, the f-theta spot formula).
- Thunder Laser, Laser lens selection guide; Thunder Laser USA, Aurora fiber lens F160 / F210 / F290 and Thunder Bolt ramp test and autofocus height (the last two seen through search extracts; the pages refused our requests).
- LightBurn documentation, Focus Test; FSL, CO2 focus ramp test.
- OSTI (Sandia), record 218536, focusing lenses for CO2 laser welding (Welding Journal, 1996), from a search extract of its abstract (the site refused our request).
- Beam inputs: CO2 glass-tube listings give about 2.5–6 mm of beam at the tube; Raycus’ 20 W Q-switched fiber source lists M² below 1.5 and a 6–8 mm beam (both from search extracts of seller and manual pages).
Last checked 2026-11-01 · Calculated values; no laser was used to make this page.