Macro Focus Stacking Step Calculator

Calculate focus step distance for complete depth-of-field coverage in macro stacks

Determine the focus-bracket step in mm needed to fully cover a subject's depth in macro focus stacking, from your magnification ratio, aperture, and circle of confusion. Outputs the per-frame depth of field and total frame count. Built for macro photographers. Runs 100% in your browser. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

How is depth of field calculated at macro magnification?

The calculator uses the macro DOF approximation DOF ≈ 2·c·N·(m+1) ÷ m², where c is the circle of confusion, N is the f-number, and m is the magnification. At high magnification the m² term makes DOF shrink dramatically.

The Macro Focus Stacking Step Calculator works out exactly how far to move focus between frames so your stack covers the whole subject with no soft gaps. It is built for macro photographers using a focus rail or in-camera focus bracketing.

How it works

At macro magnifications the depth of field at a single focus plane is tiny — often a fraction of a millimetre. The standard thin-lens macro approximation for total depth of field is:

DOF ≈ 2 · c · N · (m + 1) ÷ m²

where c is the circle of confusion, N is the f-number, and m is the magnification ratio. Because of the term, DOF collapses quickly as you push past 1:1.

To cover a subject of depth D you step focus by slightly less than the DOF so adjacent slices overlap:

step = DOF × (1 − overlap) and frames = ceil(D ÷ step) + 1

A 25–35% overlap keeps the sharp regions of neighbouring frames touching, which is what stacking software needs to blend cleanly.

How magnification changes everything

The m² term in the DOF formula is what makes macro stacking so demanding. Doubling the magnification cuts the per-frame DOF to roughly one-quarter, which means four times as many frames to cover the same subject depth.

For illustration, at f/5.6 with a 0.020 mm circle of confusion:

MagnificationDOF per frameFrames to cover 5 mm
0.5× (half life-size)~1.79 mm~4
1:1 (life-size)~0.45 mm~16
2:1 (2× life-size)~0.11 mm~62
4:1 (4× life-size)~0.028 mm~244

At 4:1 magnification, a subject only 5 mm deep requires over 200 frames. This is why extreme macro photographers use motorised rail systems and automated shooting to execute long stacks without fatigue-induced drift.

Choosing the circle of confusion

The circle of confusion (CoC) is the largest blur circle that still looks sharp at the final output size. Smaller CoC values give finer resolution but require more frames. Common values by sensor size:

SensorCoC (typical)
Full-frame (35mm)0.030 mm
APS-C (1.6× crop)0.019 mm
APS-C (1.5× crop, Nikon/Sony)0.020 mm
Micro Four Thirds0.015 mm

If you plan to print large or view at high magnification on screen, use a smaller CoC (0.018–0.020 mm even for full-frame) to ensure the stack looks sharp. If the output is web-only at moderate sizes, the standard 0.030 mm is fine.

Choosing aperture and overlap

Stopping down increases DOF per frame and reduces frame count, but at high magnification the effective f-number grows. The effective f-number is:

effective N = nominal N × (1 + magnification)

At 1:1 with a set aperture of f/5.6, the effective aperture is f/11.2. At f/5.6 nominal and 2:1 magnification, the effective aperture reaches f/16.8 — well into the diffraction-limited range for most sensors. This is why many macro shooters use f/4–f/8 nominal and accept more frames rather than stopping down further.

For overlap, 25–30% is a robust starting point. If your stacking software struggles to blend (showing banding or halos), increase overlap to 40%. For smoother subjects with minimal texture contrast, lower overlap can work.

Example and notes

At 1:1 (m = 1), f/5.6, with a circle of confusion of 0.020 mm, the per-frame DOF is 2 × 0.020 × 5.6 × (1 + 1) ÷ 1 = 0.448 mm. With 30% overlap the step is about 0.31 mm, so a 5 mm-deep insect needs roughly 17 frames.

For a focus rail, set step distance to 0.31 mm per frame. For in-camera focus bracketing (available on many mirrorless cameras), set the step size to fine and test against this calculation — different manufacturers encode step size differently in their UI, so bracket against this figure and verify coverage with a trial stack before shooting the real subject.

Add a frame or two of margin at the front and back of the subject to ensure the ends are fully covered even if your start or end position estimate is slightly off.