Focus Stacking Calculator
Focus stacking works when each frame overlaps the next by about 30%. This calculator turns your near and far limits into a frame count and a focus step, so you stop guessing at 20 shots and hoping.
Lens and scene
Result
How many shots does a focus stack need?
Short answer: divide the distance you must cover by about 70% of the depth of field each frame already gives you, then add one. At 50 mm and f/8 on full frame, covering 0.5 m to 2 m needs 9 frames, with a focus step of about 20 cm. The same range at 100 mm needs 33 frames.
The step is the whole trick. Each frame is sharp over a slab of depth. If the next frame starts where the last one ended, the merge has nothing to blend and small alignment errors become visible bands. Overlap the slabs by 30% and the software has room to work:
- Depth per frame comes from the depth of field formula at the middle of the range, not at the near end. Depth grows with distance, so a fixed step calculated at the near end leaves the far end under-covered.
- Frame count = ceil(range ÷ step) + 1. The extra frame covers the far limit itself, where depth runs out.
- Aperture: stopping down is not a substitute. Diffraction softens every frame in the stack, and no amount of merging removes it.
- Rail versus lens: a focusing rail moves the camera and changes perspective; turning the focus ring keeps perspective fixed. For anything within about a metre, the rail gives more even steps.
Typical stacks, full frame
| Subject | Lens and aperture | Range | Frames | Step |
|---|---|---|---|---|
| Watch face, macro | 100 mm, f/8 | 0.30 to 0.35 m | 22 | 2.5 mm |
| Flower head | 100 mm, f/8 | 0.40 to 0.52 m | 23 | 5.6 mm |
| Product shot | 50 mm, f/8 | 0.5 to 2 m | 9 | 0.20 m |
| Furniture | 35 mm, f/8 | 1 to 4 m | 3 | 2.2 m |
| Landscape foreground | 24 mm, f/5.6 | 0.5 to 3 m | 3 | 1.6 m |
Set the calculator to your own values before trusting these: the step depends on the sensor, the aperture and the distance, and a change from f/8 to f/5.6 roughly halves the depth per frame.
Common questions
How many photos do I need for focus stacking?
Between 3 and 12 for most subjects. Close macro work at 100 mm needs 20 to 40 frames, because depth per frame at half a metre is only a few millimetres. A wide landscape stack needs 2 or 3.
Can I focus stack handheld?
Yes, if you shoot a burst and let the software align the frames. Use a 50% overlap, a shutter speed fast enough to freeze movement, and expect to discard frames where the camera drifted. Static subjects on a tripod always merge better.
Does focus stacking work with a moving subject?
No. The subject must be still for the whole sequence, or the merge shows ghost edges. Wind, water and people are the usual reasons a stack fails.