This calculator computes the number of frames needed to make a focus stack with a focus shift specified in the focus step field that covers from the starting distance to the ending distance.
Please note, this calculator is still in beta and may not provide accurate results in all conditions.
|3’4”||feet and inches|
To use the calculator enter your lens’s focal length, the aperture you will be shooting at, whether or not you have the camera set to APS-C crop mode, the focus step size you’ve set, and the starting and ending distances for the stack you want to shoot.
Distances are a free form number that’s parsed by the script and can be specified in either feet, inches, feet and inches, meters, or millimeters. See the following table for examples
Assumptions and Theory
I’ve made two major assumptions in the development of this too. First relates to the size of the focus shift between images. Canon calls this “focus increment” on cameras such as the EOS R5. Nikon calls this “Focus step width” on cameras such as the Z6 II and Z7 II. My assumption at the present time is that the focus steps are equal to 1/8 of a depth of field.
I made this assumption for two reasons. First, 1/8 of a depth of field has historically been the size of the smallest AF increment available on Canon cameras. It’s what an AF micro adjustment step was, as well as the smallest shift you could make when remotely controlling the focus via Canon’s EOS Utility.
I’m fairly confident in the accuracy of this assumption, as in my testing a focus increment of 8 on my EOS R5 corresponds to a focus shift that’s approximately 1 depth of field deep.
The second assumption deal with the acceptable threshold for the depth of field. Namely I’m using the same standard that most camera manufacturer’s use when they calculate depth of field. This formula can be traced back to film photography and in some respects may be insufficient for modern high resolution digital cameras — at least in some applications.
With those assumptions in hand, I calculate the depth of field for the specified lens, aperture, crop size, and initial (close) focus distance. Then shift the focus position towards infinity by “focus step” × 1/8 of that depth of field. This process is repeated until either infinity is reached, 999 steps have been taken, or the specified far depth of field limit has been reached.