A better depth of field table

Traditional DoF tables apply to one focal length only.

Normal depth of field tables list the depth of field for any combination of aperture and subject distance for a single focal length. I find this a pain in the ass for several reasons: firstly, I have to carry around several charts, secondly if I'm using a zoom lens I have to guess what focal length I'm using, and finally I generally find it easier to gauge the size of the subject rather than the distance to it.

This chart is my solution.

For photos of subjects that are relatively close compared to the lens' hyperfocal distance, depth of field depends only on subject size and aperture. A portrait taken with a 35mm lens at f/2.8 lens has around the same depth of field as one taken with a 100mm lens at f/2.8, because although the 100mm lens' aperture is physically larger, you have to stand further away to get the whole subject in the frame, and the two cancel out. This is one of the natural laws of depth of field.

This chart lists the depth of field for any combination of subject size and aperture. It therefore applies to all focal lengths: you don't need to know how far away your subject is or what focal length you're using, just how big the subject is.

I have used the equation from Wikipedia:

DOF equation

This equation becomes inaccurate near the lens' hyperfocal distance, so I have marked the hyperfocal distance on the chart as four light-grey to dark-grey bands representing 24mm, 50mm, 100mm and 200mm lenses. Stay out of the grey area for your lens and this chart is accurate. If you print this chart, tell your web browser to print backgrounds so that you get the grey shades (in IE, Tools > Internet Options > Advanced > Printing > Print backgrounds).

Click here to open in a new window.

Enjoy...

Caveats:

  • The calculations in this chart only work when a subject is close relative to the lens' hyperfocal distance. This is generally the case for small subjects and long lenses. The light to dark grey shaded areas represent the boundary for 24mm, 50mm, 100mm and 200mm lenses at which inaccuracies start to become significant (more than 50%).
  • This chart uses a circle of confusion of 1/1250 of the image width to produce "acceptably sharp" images. If it is important to you to get images as sharp as your camera is capable of capturing, read the sidebar titled "super sharp shooter" on this article: www.berniecode.com/writing/photography/depth-of-field.
  • This chart implies that the depth of field is symmetrical, which it isn't: close to the hyperfocal distance there is a lot more depth of field behind the focal plane than in front of it. However, close to the hyperfocal distance this chart doesn't work anyway because focal length becomes important, so that's not really an issue.

12 thoughts on “A better depth of field table”

  1. quick question, may be a silly one: for charts that calculate the depth of field from the distance to the plane of focus, where is it measured relative to? It’s generally described as from the center the lens, but the “lens” for SLRs (and all cameras, I’m sure) is actually a case with a combination of many individual lenses, so where is it actually measured from? the front of the lens case? the aperture? the sensor? It doesn’t matter much for anything more than say, a few feet away, but I’m trying to do some up close photography where a few inches can be significant.
    Thanks! Love the site!
    -Mechanical Engineer

  2. I believe it’s from the “nodal point” of the lens, which is the point that, if you rotate the whole whole camera and lens combination around that point, the point of view of the camera remains constant (this is why people use fancy brackets like the Nodal Ninja to take indoor panorama shots – so that the POV doesn’t change as they rotate the camera)

    I recommend you do it backwards – for you macro lens, measure your observed depth of field by at a specific aperture and distance from the front of the element. You can do this by shooting a ruler and looking at it full-screen checking out how many millimetre marks are sharp). Then use the chart to figure out how far behind the front of the lens the nodal point appears to be. Once you have that, you should be able to predict the DoF at other apertures and distances using the chart.

    If you try this, let me know how well it works!

    Bernie :o)

    P.S. That said, in macro shots I tend to use a much simpler technique – just use the smallest aperture I can get away with before the shot gets softened by diffraction. f/11 to f/16 works for me.

  3. I like this table as it gives me the depth of field directly even when I’m varying my focal length, which is a constant variable in most of the other DoF tables. Here you can simply focus on how large your subject is and find the approximate depth of field. More than close enough for my use!

  4. Thank you so much for putting some practical sense to the use of DOF. One thing I do not understand is the the formula that you use for subject distance is:

    size * (focalLength / sensorSize)

    However, given
    m = f / (s – f) # from wikipedia
    m = sensor size /subject size # from bernie
    then
    sensorSize / subjectSize = f / (s – f)
    s – f = f * (subjectSize / sensorSize )
    then s (subjectDistance)
    s = (f * (subjectSize / sensorSize )) + f # is it right?

    I am just gettting into the subject of DOF, so please correct me if I am wrong. Thanks again.

    Sam

    1. Sorry you’ve lost me. Where are you getting these equations from?

      If subjectDistance = size * (focalLength / sensorSize) then operating a zoom lens (changing focal length) would either alter the distance to your subject or the size of the subject. This would be quite a remarkable effect, and I have not observed it in the field ;o)

      1. Thank you so much for the reply. Sorry for didn’t make it clear. I get the equation from this page’s inline script.

        function getDistanceForSubjectSize(size, sensorSize, focalLength) {
        return size * (focalLength / sensorSize);
        }

        I was studying your script and tried to rewrite it in python, the only language I know (with options for coc, sensor, subject sizes, unit conversion, colors and etc) to help myself understand DOF.

        At the same time I was reading the DOF page on wikipedia, gathering equations, and attempted to generate a table to compare magnification dependent dofs and focalLength dependent dofs of a given subjectSize. That’s how it all started.

        Sam

        1. OK, I think I see the issue. The difference between Wikipedia’s equations and mine is some spurious additions and/or subtractions of focal length.

          The reason for this is that Wikipedia measures subject distance from the sensor, and I measure it from the Nodal point of the lens. In a simple lens design, the nodal point will be the same distance from the sensor as the focal length.

          If the distance to the subject is large compared to the focal length of the lens, .e.g when you’re taking a picture of a person, the difference doesn’t matter. For closer subjects it starts to be important where you measure the subject distance from.

          Bernie :o)

  5. Nice! I like the approach here.

    You say not to trust the values in the grey. But for things > 2 m and apertures at f/2.8 or slower, in the region of the table bounded by these values, the table is over 90% grey! What approximations are involved in the DOF equation, and can they be done to higher precision, so as to make the table more useful?

    Also, whether intentional or not, the greys don’t seem to appear on the PDF versions of the table.

    1. You make a good point. Basically, this guide is most useful for macro photography, still life, close-up portraits and such like. With large objects a long way away, the whole scene tends to be in focus so this chart isn’t really needed anyway.

  6. This is brilliant! Thank you. If I shoot landscape, then I would measure the length of the bottom of the frame at the plane of the subject, correct? Portrait seems easier, because I can use the height of the subject to calculate the height of the frame. Any pointers for how to make the calculation for landscape? Also, could another chart be built using the height of the frame while shooting landscape? Would it be as simple as using the 1.5 height to width ratio that my canon crop sensor uses? Thanks again.

    1. > Would it be as simple as using the 1.5 height to width ratio that my canon crop sensor uses?

      It would be exactly that simple! The chart requires the length of the long edge of your frame, so width in landscape or height in portrait. If you know that the short edge of the frame (height in landscape or width in portrait) is say 2 meters, then multiply it by 1.5 and read along the 3 meter row on the chart.

      1. Great. I plan to rebuild the chart in ft. and inches, since that is what I am used to. I also will just do the middle of the chart, because I won’t use the short end and, as you have mentioned, the long end is usually all in focus anyway. Thanks for answering my question and for posting the article.

Leave a Reply

Your email address will not be published. Required fields are marked *