PhotoCalcs
Focus Stacking Calculator — Number of Frames
Plan focus stacking steps for macro or landscape shots with correct overlap.
How We Calculate This
DOF per Frame
Depth of field per frame is found from the standard thin-lens equations at the average focus distance: hyperfocal H = f² ÷ (N × c) + f, near limit Dn = H·s ÷ (H + (s − f)) and far limit Df = H·s ÷ (H − (s − f)), where f is focal length (mm), N the f-number, c the circle of confusion (mm) and s the focus distance. DOF per frame = Df − Dn.
Number of Frames
Frames = ⌈total depth ÷ (DOF × 0.7)⌉ + 1
The 0.7 factor leaves 30% overlap between frames for reliable blending. The focus step is then the total depth spread evenly across the frames.
Macro accuracy note
These thin-lens equations are intended for general and landscape distances. At true macro magnifications (greater than roughly 1:4) depth of field is better estimated from the magnification-based formula DOF = 2·N·c·(m + 1) ÷ m², so for 1:1 work add extra frames or use a dedicated macro DOF table (e.g. Zerene Stacker or Points in Focus).
Frequently Asked Questions
Focus stacking combines multiple images shot at different focus distances to create a single image with extended depth of field. Each frame is sharp in a different zone. Software (Photoshop, Helicon Focus, Zerene Stacker) blends the sharp regions from each frame.
It depends on the total depth to cover and the DOF per frame. Macro at 1:1 might need 20-50 frames for a few centimetres. Landscape focus stacking might need 3-5 frames from foreground to infinity. Always shoot a few extra frames for safety overlap.
Use f/5.6 to f/11 for the sharpest per-frame results. Avoid very small apertures (f/16+) where diffraction reduces sharpness. With stacking, you do not need small apertures for depth — you get depth from multiple frames. Wider apertures give sharper individual frames.
Use a tripod. Manual focus mode. Start at the nearest point and shift focus slightly for each frame. Many cameras have built-in focus stacking (focus bracketing). Alternatively, use a macro rail for precise mechanical focus steps. Keep aperture and exposure constant.
Related Calculators
Tilt-Shift Calculator
Calculate the Scheimpflug plane of focus for tilted lenses. Find hinge distance, tilt angle and sharp zone depth for tilt-shift photography. Free calculator.
DOF Calculator
Calculate near focus limit, far focus limit and total depth of field for any lens, aperture and subject distance combination. Free online calculator.
Hyperfocal Distance Calculator
Find the hyperfocal distance for maximum depth of field in landscape photography. Enter focal length, aperture and sensor size. Free online calculator.
Aperture Calculator
Find the exact aperture needed to achieve a target depth of field at any given focal length and subject distance. Free online photography calculator.
Background Blur Calculator
Calculate the amount of background blur for portraits based on focal length, aperture and subject-to-background distance. Free online photography calculator.
Was this calculator helpful?
Last updated: February 2026
All calculations are estimates based on standard optical and photographic formulas. Results may vary with specific equipment.