How the calculator works
At macro distances, depth of field gets tiny. At life size (1:1) and f/8 on a full-frame camera, only about a millimetre of your subject is sharp, and most insects are several millimetres deep. Focus stacking solves it: you shoot a series of frames, moving focus a little each time, then blend the sharp parts together in software.
The calculator uses the standard close-up depth of field formula:
- N is the aperture you set on the lens.
- c is the circle of confusion, the largest blur that still looks sharp. The calculator uses the standard values for each sensor size, such as 0.03 mm for full frame. "Critical" halves it for large prints and close inspection.
- m is magnification. 1× means the subject is life size on the sensor.
- P is pupil magnification, a property of the lens design. Telephoto-style lenses are usually below 1 and wide-angle designs above 1. If you don't know it, 1 is the usual assumption.
Frames to stack are worked out from your subject's depth. Each frame moves forward by its depth of field minus the overlap you choose, so the sharp zones always overlap a little. This close-up formula is accurate to within a few percent across the calculator's range (0.1× and up).
Does the lens matter?
Less than most people expect. At the same magnification and aperture, a 60 mm and a 100 mm macro lens give you essentially the same depth of field; any small difference comes from pupil magnification. The longer lens gives you more working distance and a narrower background, but no extra depth.
The lens matters in three ways: its pupil magnification (in the Advanced settings), how your camera reports the aperture, and how you reach your magnification. With extension tubes, the magnification you gain depends on the focal length, which on many macro lenses gets shorter as they focus closer. "Lens + tubes" gives a quick estimate; "Measure it" gives the real number.
Set aperture vs effective aperture
As you focus closer, less light reaches the sensor and the lens behaves as if it were stopped down. At 1:1, f/8 acts like about f/16. That effective aperture controls both exposure and diffraction. Nikon cameras, for example, display the effective number with Nikon macro lenses, while many other cameras show the aperture you set. Choose the matching option so the maths isn't counted twice.
Diffraction
Stopping down gives you more depth per frame, but past a point diffraction softens everything. The calculator compares the size of the diffraction blur at your effective aperture with your sharpness standard and shows the diffraction limit: the highest f-number before that blur grows larger than the standard. Diffraction builds gradually, so treat the levels as a guide. For the crispest stacks, work a stop or two wider than the limit and shoot more frames.
Focus rail or in-camera bracketing?
On a focus rail you move the camera itself, so the step size above is exactly how far to move between frames. In-camera focus bracketing moves the focus instead. It's faster and great for the field, but the step-width numbers are relative settings that differ by brand, and many cameras adjust them for the aperture. Use the frame count as a guide and add a few frames to be safe.
Tips from the field
- Cool mornings are your friend: insects sit still until the sun warms them up, and the air is usually calm.
- Start at the nearest point and work back. That's also the default direction for in-camera focus bracketing on most cameras.
- Soft, even light keeps every frame matched. A diffused flash or a cloudy sky beats harsh sun.
- Blend in Helicon Focus, Zerene Stacker or Photoshop, then retouch any halos by hand.
Results are estimates from standard optical formulas. Real lenses vary a little, so treat the numbers as a starting point and check your first stack at 100%.
