Focus Stacking Shot Count Calculator
Calculate how many photos you need for focus stacking.
Find the depth of field per shot and total shots to cover your subject from front to back.
Focus stacking is a technique where you take multiple photos at different focus distances and merge them in software to achieve sharpness across a depth that exceeds what any single lens aperture can deliver.
It is essential for macro photography (extreme close-ups of insects, flowers, coins, food) where depth of field can be less than 1 mm at high magnification.
Depth of field (DoF) per frame
The shortcut you see everywhere is DoF ≈ 2 × N × c × u² / f², and it is fine for a portrait at ten feet. It is not fine here. At 1:1 magnification it reports twice the depth of field you actually have, which means twice the step size and half the frames, and a stack with focus gaps in it.
This page uses the exact form instead, the same one the depth-of-field calculator uses:
H = f² / (N × c) + f
near = (H × u) / (H + u − f)
far = (H × u) / (H − u + f)
DoF = far − near
Where:
- N = aperture f-number
- c = circle of confusion (sensor-dependent)
- u = focus distance from the lens
- f = focal length
- H = hyperfocal distance
At macro distances the equivalent shorthand is DoF = 2 × N × c × (1 + m) / m², where m is magnification, m = f / (u − f). Both give the same answer. A 100 mm lens at f/8 focused 200 mm away is at 1:1, and the honest figure there is 0.96 mm, not the 1.92 mm the popular approximation returns.
Circle of confusion by sensor size:
- Full frame (35mm): 0.030 mm
- APS-C (Canon): 0.019 mm
- APS-C (Nikon/Sony): 0.020 mm
- Micro Four Thirds: 0.015 mm
Number of shots needed: Shots = Subject Depth / (DoF per shot × overlap factor)
Using 20–30% overlap between frames ensures no focus gap in the final merge.
Practical steps:
- Set your camera to aperture priority or manual
- Use f/5.6–f/11 for macro (avoid diffraction at f/16+)
- Use a focusing rail for precise incremental focus shifts
- Shoot in RAW for best merge quality
- Use Helicon Focus, Zerene Stacker, or Photoshop’s Auto-Blend Layers
Recommended apertures for stacking:
- Macro (1:1): f/5.6–f/8 for sharpest optical quality
- Close-up (1:3–1:5): f/8–f/11
- Product photography: f/8–f/16
- Avoid f/22 and smaller, where diffraction softens images significantly
Software options:
- Helicon Focus (paid, excellent for macro)
- Zerene Stacker (paid, great for insects)
- Adobe Photoshop (Edit → Auto-Blend Layers → Stack Images)
- Affinity Photo, which handles moderate stacks well and costs a fraction of the dedicated tools
How we build and check this calculator
This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.
SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.
More Photography Calculators
- Studio Lighting Ratio Calculator
- Long Exposure Noise Reduction Time Calculator
- Drone Flight Time Calculator
- Flash Exposure Value (EV) Calculator
- Focal Length Equivalent Calculator
- Analog Film Development Time Calculator
- Golden Hour Duration Calculator
- Memory Card Video Recording Capacity Calculator
- Print Resolution Calculator
- Timelapse Interval Calculator
- Camera Battery Life Calculator
- Photo Print Cost Calculator