Macro Depth of Field (DoF) Calculator

How to use the Macro Depth Of Field Calculator

In macro and close-up photography, you get so close to the subject that any basic depth of field calculator will give you wrong dof values. In such shooting conditions, depth of field depends on a new variable: magnification.

Magnifications is the proportion between the size of the subject image on the camera sensor and its real size. For example, a magnification of 5:1 (5x) means that the image of the subject is 5 times its real size.

Because of the short subject distances and long focal lengths used (50mm-200mm), you’ll get a very shallow depth of field.  Assessing the order of magnitude of the DoF you’ll get will give you more control over your photography.

Another new variable that affects depth of field is pupil magnification. This is the result of dividing the diameter of the exit pupil of a lens by its entrance pupil diameter. For focal lengths around 50mm, not taking into account pupil magnification may work pretty well. 

But, when using long focal lengths, such as 105mm or 180mm, you should take into account pupil magnification to get more accurate results.

This macro depth of field calculator takes into account magnification and pupil magnification to give you a good approximation of depth of field values in macro photography. Just introduce camera model, aperture, focal length, focus distance, pupil magnification and extension tube (in the case you use one) to calculate:

  • Magnification: The proportion between the size of the subject image on the camera sensor and its real size.
  • Effective aperture: Magnification has the “effect” of closing the aperture. At 1:1 magnification, you lose about 2-stops of light. This means that an aperture of f/2.8 becomes more like f/5.6.
    • This calculator computes effective aperture as: lens aperture × (1+ Magnification). This works pretty well for focal lengths around 50mm.
    • For longer focal lengths (macro lenses), you need to take into account lens Pupil Magnification. Then, effective aperture is: (1+ Magnification/Pupil Magnification).
  • Total depth of field: The distance between the farthest and nearest points which are in acceptable focus.
  • Smallest Subject which can fill the image: the size of the smallest subject that can fit in the image. 
  • Safe step size for stacking (20% image overlapping): It's the maximum step you need to move the camera on a focus slider in order to capture the whole subject in focus when applying the focus staking technic. It is calculated as Total depth of field × 0.8.

Regarding the aperture, on the calculator, set "YES" to "Aperture is already an effective f-stop" if you're using a Nikon camera. These cameras automatically correct for the effective f-stop and show it on the LCD display.

Note: given the sensor size, the circle of confusion is calculated assuming a print size of 8''×10'' (20cm×25cm), a viewing distance of 10" (25cm) and the manufacturers standard visual acuity. 

Understanding depth of field

If you’re interested in learning more about macro depth of field, circle of confusion, hyperfocal distance, and classic depth of field, where to focus exactly and what camera settings to use to get a desired level of sharpness, make sure to take a look at the following article, it explains everything you need and more:

The Ultimage Guide to Depth of Field (DoF)

With this article you’ll learn both, how to shoot deep depth of field to get everything in focus in the image...

... and how to shoot shallow depth of field, so you get the creative control over what is sharp in your photos to tell the story you want.

Finally, If you're interested in learning how to plan the sun, moon and Milky Way, take a look at the following How-to articles:

How to embed the Macro DoF Calculator on your website

Take the power of PhotoPills’ Macro Depth of Field (DOF) Calculator with you. Just copy the following lines and paste them within the code of your website, right in the place where you want to embed it:

<div id="ppdofmacro"></div>
<script src="" async></script>

The code will run asynchronously, without penalizing the loading time of your website.