Focus Stacking Calculator
Work out the number of frames needed to cover a subject's full depth.
Results
- Frames needed
- 15
- Depth of field per frame
- 2.9 mm
- Focus step between frames
- 2.0 mm
The number of shots to take, moving focus forward between each one, to cover the full subject depth.
How much of the scene is in acceptable focus in a single frame at this aperture and distance.
How far to advance focus between one shot and the next. This is the per-frame depth of field minus the overlap you asked for.
How it works
Focus stacking solves the problem that depth of field at close range is measured in millimetres. Rather than stopping down until diffraction ruins the image, you shoot a series of frames at a sharp aperture, advancing focus a little each time, and blend the sharp slices together afterwards.
The frame count comes from dividing the subject's total depth by the focus step, and the step is the depth of field of a single frame minus whatever overlap you ask for. Overlap is insurance: 0% overlap means each frame's sharp zone only just meets the next, and any error leaves an unsharp band that no amount of blending will fix.
Around 30% overlap is a sensible default. Push it higher for subjects with fine detail like insect hairs or textiles, where a visible seam is unforgiving, and lower it when you are fighting a moving subject or a limited battery.
The formula
step = DoF × (1 − overlap), frames = ceil(total depth / step)
DoF is the depth of field of a single frame at your chosen aperture and distance. Higher overlap means a smaller step and more frames.
Frequently asked questions
- What aperture should I stack at?
- Somewhere near your lens's sharpest setting, usually two to three stops from wide open, and short of the diffraction limit. Stacking exists precisely so you do not have to stop down to f/22, so there is no reason to give up sharpness per frame.
- Should I move focus or move the camera?
- At high magnification a focus rail that moves the whole camera is more predictable, because turning the focus ring also changes magnification slightly and makes frames harder to align. Below about 1:2, focus bracketing in-camera is usually fine.
- Why does more overlap mean more frames?
- Overlap is the part of each frame's sharp zone that repeats in the next one. The more you repeat, the less new ground each frame covers, so the focus step shrinks and the count goes up.
Read more about this
- Hyperfocal focusing in practiceThe technique works. The way it is usually taught puts infinity right on the edge of acceptable, which is the one place you do not want it.
- The diffraction limit is not a cliffDiffraction gets talked about as a wall you hit at f/11. It is closer to a slope you have been walking down since f/4.