Focus Stacking Steps Calculator
Macro and close-up subjects often exceed the depth of field of a single frame, so focus stacking captures a series of shots at stepped focus distances and merges the sharp parts. Planning a stack means working out how many frames to shoot and how far to move focus each time. This calculator returns the frame count and step size from the total subject depth, the depth of field of one shot, and a safety overlap that prevents soft seams.
Focus stacking formula
Step = depth of field * (1 - overlap / 100)
Frames = ceil( subject depth / step )
Covered depth = frames * step
Each frame contributes one step of sharp depth. Reducing the step by the overlap margin ensures the in-focus zones of adjacent frames overlap, so there are no soft bands in the merged result.
Worked example
A 10 mm subject with 0.5 mm depth of field per shot and 20 percent overlap: step = 0.5 * 0.80 = 0.40 mm. Frames = ceil(10 / 0.40) = ceil(25) = 25. Covered depth = 25 * 0.40 = 10.00 mm, exactly spanning the subject.
Focus stacking: frequently asked questions
How many photos do I need for a focus stack?
Divide the total subject depth you want sharp by the effective step (the depth of field of one shot reduced by an overlap margin). Round up and add one. Larger overlap means more frames but safer blending with no soft bands.
What step size should I use between focus stack frames?
Move focus by slightly less than one depth of field so consecutive frames overlap. This calculator uses step = depth of field times (1 minus overlap fraction), so a 0.5 mm depth of field with 20 percent overlap gives a 0.4 mm step.
Why does focus stacking need overlapping frames?
If frames just touched at the edges of their depth of field, small focus or alignment errors would leave soft seams. Overlapping the in-focus zones guarantees every plane of the subject is sharp in at least one frame, which the stacking software then merges.
Sources
- NIST: Office of Weights and Measures (length units).
- The step and frame-count relations follow directly from dividing a depth by an overlapped step; no external figure is required.
Reviewed by the CalculatorHub team, edited by James Graham, 19 June 2026. See our methodology.