Focus Stacking Calculator

How many frames do you need to focus stack a landscape?

Enter your sensor, focal length, aperture and the nearest and farthest distances to cover. The calculator lists how many frames you need and the focus distance for each one.

How the tool works

Each frame has a depth of field found from the hyperfocal distance H = f squared / (N x c) + f, where f is the focal length, N the f-number and c the circle of confusion. The near limit is s(H – f) / (H + s – 2f) and the far limit is s(H – f) / (H – s), where s is the focus distance. The tool starts at your nearest distance, finds the focus distance that puts the near limit there, then repeats from the previous far limit until your far limit or infinity is covered.

Successive frames overlap by the percentage you choose, from 10 to 30 percent of each frame’s depth of field. More overlap needs more frames but leaves a safety margin for focusing error. The circle of confusion values are the same ones used in the hyperfocal distance calculator: 0.029 mm for full frame, 0.019 and 0.020 mm for APS-C, 0.015 mm for Micro Four Thirds and 0.037 mm for medium format. The list stops at 40 frames and warns you if that is reached.

This tool is for landscape scale distances. The formulas assume the subject is far from the lens compared with the focal length, so macro stacking needs different maths. In the field, use manual focus and live view, keep the exposure the same for every frame, and check the overlap on the back of the camera. Lens distance scales are rough, so treat the focus distances as a plan rather than an exact setting.

Questions

How many photos do I need for focus stacking?

It depends on the focal length, aperture and the distance range. A 24 mm lens at f/8 on full frame needs about five frames to cover 0.3 m to infinity with 20 percent overlap.

How much should focus stacking frames overlap?

Between 10 and 30 percent of each frame’s depth of field is a common range. More overlap is safer if your focusing is not precise.

Can I use this for macro focus stacking?

No. The formulas assume the subject is far from the lens compared with the focal length. Macro work needs formulas that include magnification.

More photography tools: Hyperfocal distance calculator, Focal length and field of view calculator, Exposure equivalence calculator

Back to Top
Close Zoom
© Leszek Chrzastowski. Enjoying the view? Please contact me for licensing or print options.