Simple DoF tables for focus stacking Simplifies the mechanics of macro photography and explains how to make your own table.

1. Introduction

A mobility issue means I now shoot my subjects on a well lit table in a spare bedroom. They're insects after they've died, flowers, weeds and inanimate objects of all kinds.

At the start, I found much theoretical discussion but they were beyond my understanding. I just wanted a simple and reliable way to get acceptable images that'd never be exhibited nor enlarged to mural size. I'm an amateur doing this for my own enjoyment and I'm certain that this isn't the optimal method but it works for me.

I was puzzled for a while by why few people used focus stacking as much more is 'sharp' so I accepted that my shots would be pictorial, rather than artistic. My stacking usage evolved from occasionally to always as I could stack a few or all of the images to get the desired effect - the downside is that the process takes time so there's never a 'quick' shot.

1.1 Sample shots

This simple technique may not be good enough for everyone but it's met my needs for over three years. The following images, interesting rather than artistic, are examples taken using these tables so check them out to see if this can meet your needs too.

A nearly three inch piece of copper ore - 100mm macro
A two inch sea urchin shell - 100mm macro
A four inch murex shell - 100mm macro
A three-quarter inch cube of pyrite ore - 100mm macro
The inside of a four inch loofah sponge -100mm macro. One of my few 'artistic' attempts.

If you've made it this far, then there's a chance that you're curious, or maybe interested, so I'll continue.

1.2 My equipment

  • Canon T3i 18 MP camera with APS-C sensor 22.2 x 14.8 millimeters. I got it used in late 2013 after it was highly recommended for what and how I shoot. Its vari-angle display makes using live-view easy for framing and focusing so I rarely use the viewfinder.
  • Canon 100mm f2.8 non-L version macro lens.
  • Sigma 18-250mm f3.5-6.3 DC zoom lens for general purpose and some close-up work.
  • Photoshop CS5 to do the stacking and any post processing as I already had it.
  • An extreme lens: Canon 65mm f2.8 MP-E macro lens (1-5X life size) - I got mine used so it was more affordable. This isn't a normal macro lens but once you get used to its operation and capabilities, it really can open up whole new worlds. Section 4 is dedicated to it - Its table and usage are in sections 4.2 and 4.3.
  • Cognisys Stackshot motorized focusing rail. This is the 'icing on the cake' as it does the very small steps required for the MP-E and eliminates ALL of the frustrations involved with a manual device.

Lens usage: I use the 100mm macro for 95% of my shooting, the MP-E for 4% and the Sigma for the other 1%.

2. DoF tables for focus stacking

In its simplest form, the depth-of-field for any shot Is a function of focal length, aperture, subject distance and sensor size. These tables are meant for a Canon APS-C sensor camera using the same focal length lenses. There's a description of how easy it is to make your own table for other lenses and/or cameras in section 3.

I took the time to create these tables and now all I have to do is:

  • Focus on the closest required element.
  • Measure the distance to the camera's focal plane - it can be approximate.
  • Find that distance in the table for the step size.
  • Repeat the 'move and shoot' until it's done

The stacking process works best with some overlap between images so the third line, marked "Step", is the one to use as it's two-thirds of the full depth-of-field.

2.1 Canon 100mm macro

Its closest focusing distance is 12 inches where it produces a life-size image. Most things aren't that small, so I opted for 2 inch increments up to 24 inches and then 3 inches up to 48 inches - most of my shooting is in the 12-24 inch range. I did many tests when I got this lens and for me, f11 gives the best results after stacking but do your own tests and if need be make a table for your own shooting style.

2.2 Sigma 18-250 zoom

Because of my studio's layout I have to be less than five feet from the subject. If it's too big to shoot with my 100mm macro, then I use this set at 35mm, 50mm or 80mm to get closer. A prime lens also works as it's the focal length, not the construction, that determines DoF.

Its closest focusing distance is 13.8 inches where it produces a one-third life size image. I used a 4 inch increment over a distance range of 12-32 inches. I don't use it often so didn't test it as thoroughly as the other lenses and I also use it at f11.

2.3 A butterfly example using the 100mm and table

Note: Butterfly's scales don't all have clearly defined edges so there will be areas that aren't 'tack sharp' - blame mother nature, not me.

  • I turned the Blue Clipper butterfly so its wings were at about 45 degrees to the camera to ensure there was a significant depth to shoot. The width of the whole butterfly is about three and a half inches
  • I setup the shot and focused on the closest element, the bottom of the right wing by the body - excuse the clamp that holds it in place.
  • I measured the distance from there to the camera's focal plane using a yard stick marked in inches, and it was about 17 which isn't in the table. At that distance, the lens provides just over a one-third life size image.
  • The table shows the step size at 16 inches is 3.52mm and 4.69mm at 18 inches, a difference of 1.17mm. I find focus isn't linear so I add one-third of the difference or 0.40mm, not one-half, to the smaller value to get 3.92 mm and use it - that's only about one-sixth of an inch.
The closest in the series showing the right wing's scales by the body.
The furthest in the series showing the antenna on the left.
After stacking the 8 shots covering nearly an inch and a half - this is much more impressive in high quality, at full size and 100% zoom.


  • Leave some space around the subject to help the stacking program choose which areas of the images to use - some cropping of the final image will likely be required because of the small perspective changes that occur as the lens moves forward.
  • The focus stacking program rarely has a problem choosing which areas of an image to use but when it does, you'll see 'artifacts' in the final image. This can be fixed by careful masking-in with the appropriate layer(s) in post-processing.

3. Making your own DoF table

The easiest way to create one is to use a spreadsheet so it can do most of the math for you. A table should be created for each focal length that you use so yes it's tedious, but only has to be done once. Before starting, decide what aperture(s) you'll use and subject distances you'll shoot within. Each aperture needs three rows:

  • The first shows the total DoF value in inches taken from the calculator
  • The second multiplies that value by 25.4 to convert it to millimeters.
  • The third multiplies the second row value by two-thirds for the step-size in millimeters to allow enough overlap for the stacking process.
Reference copy

If you use a different measuring unit you'll have to change the second row's formula.

I use the online depth-of-field calculator at for all of my tables. I'm more comfortable using inches and this calculator can use them. After opening the page:

  1. Use the camera dropdown box to find and select your camera - sets the sensor size.
  2. Choose the measuring unit you want to use.
  3. Use the lens focal length dropdown box to find and select it.
  4. Use the f-stop dropdown box to find and select it.
  5. Enter the subject distance.
  6. The Total depth-of-field is displayed on the right of the screen so use it and ignore the Near and Far limit distances.
  7. Enter it in the first row of the spreadsheet and the other two rows should fill in.
  8. Repeat steps 5 through 7 for each additional distance.
  9. If you want to include another aperture in the table, setup three more rows, go to step 4 and again repeat steps 5 through 7 for each distance.
  10. Congratulations, you've just finished your table - save it now and use it forever.

4. Canon MP-E macro (1-5X)

This lens is different enough to warrant its own section as it starts where other macros end - at life size. The Owner's Manual is available online for free at Canon's website so you can use it to answer any questions that may arise.

Clarification: Canon calls the movable ring on the body the 'focusing ring' but it actually adjusts the magnification - there's no focusing in the normal sense and certainly no auto-focus ability. At any given magnification, there's only one distance where the subject is in focus and the camera MUST be moved to it.

4.1 Sample shots

Mosquito - 5X
Leopard Lacewing - 2X
Shoemaker - 3X
Brown Clipper - 2X

4.2 DoF table for MP-E

Its contents show just how different its characteristics are:

  • The depth-of-field values are actually printed in the owner's manual by Canon so no calculations of any kind are needed but the one-third reduction for overlap still applies.
  • The lens has a maximum aperture of f2.8 but it introduces the concept of 'effective aperture' which ranges from f5.6 to f96 depending on the magnification level and the camera's aperture setting. I don't understand the theory but the results are visible in the final image so the table has a row showing my preferred f-stop for each magnification - arrived at by my observations rather than any scientific method.
  • It's length varies from 4 inches at 1X and extends forwards to 9.25 inches at 5X. It uses 'working distance' which is the distance from the front of the lens to the subject. Canon prints the value at each magnification factor on the actual lens.

4.3 Observations:

  • At life size, I find the 100mm macro is much more convenient as it has a focusing ring.
  • At higher magnifications, the slightest movement is apparent and even floor flexing shows if you change your standing position while waiting for a series to finish - at least in my house.
  • Between 1X and 3X, finding the start and stop positions for a series is usually easy but beyond that, it can be difficult depending on the subject's size and texture.
  • The largest series I've ever stacked is fourty-one JPG images and from start to finish, the processing took just over twenty minutes on my quite respectable laptop.
  • It's easy to get carried away when using a motorized rail at higher magnifications. To cover a quarter of an inch of depth at 3X requires 40 images, at 4X it's 53 and at 5X it's 106. Be aware or be patient.
  • I usually shoot at the marked magnifications but sometimes have to change it slightly however it's never far enough that I have to pro-rate the step size.
Created By
Roy Beauvais

Report Abuse

If you feel that this video content violates the Adobe Terms of Use, you may report this content by filling out this quick form.

To report a Copyright Violation, please follow Section 17 in the Terms of Use.