Macro Photography Calculator
Magnification ratio, DOF, and working distance.
About this calculator
This calculator works out the practical tradeoffs of shooting at high magnification, where ordinary depth-of-field and exposure rules stop applying cleanly. Magnification is estimated from how much of the frame your subject fills (sensor width divided by subject width), then adjusted upward if you've added extension tubes, since each millimeter of tube adds tube-length/focal-length to your magnification. As magnification climbs, the effective aperture reaching the sensor grows darker — the calculator multiplies your set aperture by (1 + magnification), which is also the source of the light-loss figure reported in stops (2×log2(1+M)). Depth of field is derived from a magnification-aware formula using your chosen circle of confusion, and it shrinks fast: at 1:1 life-size magnification, DOF measures only millimeters even at moderate apertures.
Working distance approximates how far the lens's front element sits from the subject at the resulting magnification. Finally, the calculator checks whether you've hit the diffraction limit by computing the Airy disk diameter from wavelength (assumed at 550nm, green light) and effective aperture, then comparing it to your circle of confusion — if the Airy disk exceeds the CoC, diffraction is already softening the image more than any focusing error would, meaning stopping down further won't buy more sharpness. The most common misunderstanding here is confusing nominal aperture with effective aperture: your lens is still physically f/8, but at high magnification it behaves like a much smaller aperture for both light and diffraction purposes.
Inputs
Results
Magnification (×)
1
Depth of field (mm)
0.96
How to Use This Calculator
- Enter the lens focal length in mm and the aperture (f/) you plan to use.
- Set the subject width in mm that you want to fill the frame, and the camera sensor width in mm (36mm for full-frame, 23.5mm for APS-C).
- Adjust the circle of confusion in mm if needed (0.03mm for full-frame, 0.02mm for APS-C).
- Enter the total extension tube length in mm, if any, added to increase magnification.
- Review the Magnification, Effective Aperture, Depth of Field, Working Distance, Light Loss, and Airy Disk diffraction outputs.
How the result changes with Subject width (mm)
| Subject width (mm) | Magnification (×) | Depth of field (mm) |
|---|---|---|
| 18 | 2 | 0.36 |
| 27 | 1.33 | 0.63 |
| 54 | 0.67 | 1.8 |
| 90 | 0.4 | 4.2 |
What each input means
- Focal length (mm)
- Macro lens focal length in mm.
- Aperture (f/)
- Set aperture f-number.
- Subject width (mm)
- Width of the subject being photographed in mm.
- Sensor width (mm)
- Camera sensor width (36mm for full-frame, 23.5mm APS-C).
- Circle of confusion (mm)
- Acceptable CoC in mm (0.03 for FF, 0.02 for APS-C).
- Extension tube (mm)
- Total extension tube length added (0 for none).
What each result means
- Magnification (×)
- Image magnification ratio (1.0 = life-size).
- Effective aperture (f/)
- Actual f-number at sensor accounting for magnification.
- Depth of field (mm)
- Total depth of field in millimeters.
- Working distance (mm)
- Approximate distance from lens front to subject.
- Light loss (stops)
- Exposure compensation needed due to magnification.
- Airy disk (µm)
- Diffraction Airy disk diameter at effective aperture.
- Diffraction limited?
- 1 = diffraction dominates sharpness, 0 = still resolving.
How this is calculated
Worked example, using the default values
- Identify Input Parameters4 parametersFocal length (mm) = 100, Aperture (f/) = 8, Subject width (mm) = 36, Sensor width (mm) = 36 = 6 input(s) provided
- Calculate MagnificationMagnification = magnification + extensionTubeMm / focalLength1 = 1
- Calculate Depth of field0.96 = 0.96
- Calculate Effective apertureEffective aperture = aperture * (1 + totalMagnification)16 = 16
- Calculate Working distance200 = 200
Engine last updated . Checked against 2 independently-derived tests — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.
Frequently Asked Questions
Why does adding extension tubes increase magnification, and how much does each tube add?
Extension tubes move the lens farther from the sensor, which increases magnification by roughly the tube length divided by the focal length (extensionTubeMm / focalLength). A 25mm tube on a 100mm macro lens therefore adds about 0.25× to whatever magnification the lens already produces on its own, which the calculator adds directly to the base magnification from your subject and sensor width.
Why does my effective aperture get 'darker' at high magnification even though I haven't changed my f-stop?
The calculator multiplies your set aperture by (1 + magnification) to get the effective aperture, since light spreads over a longer optical path as magnification increases. At 1:1 magnification an f/8 lens behaves like f/16 for both exposure and diffraction purposes — this is also where the reported light-loss-in-stops figure (2×log2(1+M)) comes from.
What does it mean when the calculator flags my setup as 'diffraction limited'?
It compares the Airy disk diameter (derived from your effective aperture and a 550nm green-light wavelength) against your chosen circle of confusion. When the Airy disk exceeds the CoC, diffraction blur is already larger than what your CoC considers acceptably sharp, meaning stopping down further to gain depth of field will actually soften the image rather than sharpen it.
Why does depth of field shrink so dramatically as I approach 1:1 magnification?
The DOF formula divides by magnification squared, so DOF collapses much faster than magnification grows — doubling magnification roughly quarters the depth of field for a given aperture and circle of confusion. That's why life-size macro shots often show depth of field measured in single millimeters even at f/8 or f/11.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Depth of Field Calculator
Calculate the depth of field, hyperfocal distance, and near/far focus limits based on lens and camera settings.
Specialized PhotographyFood Photography Setup Calculator
Lighting and styling equipment from shot type.
AstronomyTelescope Magnification
Calculate telescope magnification, true field of view, exit pupil, and resolution from focal length, eyepiece, and apparent field of view.
Specialized PhotographyArchitectural Photography Calculator
Tilt-shift settings from building height and camera position.
Specialized PhotographyAstrophotography Calculator
Star trail vs point: max exposure from focal length and declination.
More in Creative, Media & Design.