Use the free tool below: your data never leaves your browser — all work happens on your device, and nothing is uploaded to any server.
Why focus stacking needs a step plan
Focus stacking blends many photos, each focused at a slightly different distance, into one image that is sharp from front to back. It exists because depth of field shrinks as you get closer. A single macro photo may hold only a millimetre in focus, while the subject is ten millimetres deep. No aperture fixes that without diffraction ruining the detail. Stacking fixes it by giving each slice of depth its own sharp frame, then merging the sharp slices. The catch is the step size: move focus too far between frames and a soft band appears in the middle of the stack. Move too little and you shoot hundreds of frames for no benefit.
The calculator above turns your depth range into a frame count. Enter the nearest focus distance, the farthest focus distance, the depth of field of a single frame, and the overlap you want between frames. It returns the focus step and the number of frames. With a range from 100 to 140 mm, a depth of field of 5 mm per frame, and 20 percent overlap, the step is 4 mm and you need 11 frames. Overlap is the safety margin: each frame shares part of its sharp zone with the next, so small errors in focus movement do not leave gaps.
How to find your depth of field per frame
The hardest input is the depth of field of one frame, because it depends on magnification, aperture, and the circle of confusion your camera can tolerate. At high magnification, a useful estimate is twice the aperture times the circle of confusion times one plus the magnification, divided by the square of the magnification. For most cameras, a circle of confusion near 0.03 mm for full frame or 0.02 mm for APS-C is a fair starting point. If that formula feels heavy, measure instead: focus on a slanted ruler, photograph it, and see how many millimetres look sharp. That measured depth is the number to enter, and it already includes your real lens behaviour.
Overlap choice is a trade between safety and time. Twenty to 30 percent suits most subjects and most stacking software. Below 10 percent, a slightly uneven focus rail can leave a soft stripe that no software can repair. Above 40 percent, you double your frame count for little gain, and long stacks risk subject movement, changing light, and battery trouble. For living insects, fewer frames shot quickly often beat a perfect plan shot slowly. For still subjects on a rail, a generous overlap costs only time, and time is cheap when the subject cannot move.
Shooting the stack well
Use manual exposure and manual white balance for the whole stack, so no frame differs in brightness or colour from its neighbours. Lock the camera down on a tripod or rail, and move focus in one direction only, from near to far or far to near, without reversing. Reversing introduces backlash in focus mechanisms, which shifts the step size without telling you. Shoot one or two frames past each end of the subject, because stacking software blends edges badly when the sharp zone ends exactly at the subject’s edge. Those extra frames are cheap insurance.
Watch for the two classic failures. The first is a gap: a soft band across the middle of the final image, which means the step was too large or the focus moved unevenly. The fix is a smaller step or more overlap next time. The second is a halo: a bright fringe around high-contrast edges, which usually comes from the software, not the step plan, and often improves with a different stacking method or a smaller aperture. Keep your step plan, your frame count, and the result together in your notes, and the next stack of a similar subject starts from a proven plan instead of a guess.
Related calculators
- Spanish version
- Macro Magnification Calculator – Reproduction Ratio and Working Distance for Close-Ups
- Lens Diffraction Limit Calculator – Aperture Where Diffraction Softens Your Sensor

Pingback: Macro Magnification Calculator - Reproduction Ratio and Working Distance for Close-Ups