The focus stacking calculator gives the depth of field of one shot in close-up photography, the focus step between images and the number of images to stack to cover a subject of a given depth, with the effect of diffraction at the chosen aperture.
How the calculation works
- Enter the aperture, the magnification and the circle of confusion.
- Enter the depth of the subject and the overlap between slices.
- Read the depth of field, the step, the number of images and the diffraction blur.
Example
At f/5.6 and a magnification of 1 ×, one shot has a depth of field of 0.672 mm. With an overlap of 20 %, the focus step is 0.538 mm, and a subject 0.4 in deep needs 19 images. The effective aperture is 11.2, which gives a diffraction blur of 0.0150 mm, or 50 % of the circle of confusion.
Why it matters
The calculator helps macro photographers, product photographers and microscopists who stack images to keep an insect, a flower, a coin or a component sharp from front to back, and want to set a focusing rail or an automatic bracketing correctly.
Good to know
Use a circle of confusion that fits your sensor and your final use: 0.03 mm is the classic value for a full-frame camera, and a smaller one gives a stricter result. A tripod, a still subject and a focusing rail are needed, and a few more shots than the result protect the front and the back of the subject. The formula is an approximation for a symmetrical lens, and the real depth of field depends on the lens design. Stacking software will align the frames and correct the small changes of scale.
Related tools
The field of view calculator gives the angles of a lens, the depth of field calculator covers general photography, the microscope calculator gives the magnification and the panorama calculator plans stitched images.