A big stumbling block for many new camera users is how to figure out how much depth of field a particular image will have it in given the focal length of the lens, the aperture used and the distance to the subject. Trust me on this, trying to do the algebra to figure it out is not something most people want to try to do in their heads. In this article we will cover all of the math involved and then make it real easy with an Excel spreadsheet and some links to some free applications to help you out.

The Math
Feel free to skip right over this part, this is the boring part, its so boring I thought of putting a picture of an artistic nude shot next to it just to keep people awake. Ok, so here we go. Before you can calculate the depth of field you first must know the circle of confusion for your camera.

Wikipedia: In optics, a circle of confusion, (also known as disk of confusion, circle of indistinctness, blur circle, etc.), is an optical spot caused by a cone of light rays from a lens not coming to a perfect focus when imaging a point source.

Don’t get too lost on me yet, for most of us digital SLR users this is going to be one of two numbers. For most of us with APS/APS-C sized sensors this number is going to be 0.019948, for full frame sensors (the big Pro cameras) and 35mm film the number is going to be 0.02501. This represents the sensor size. Again, don’t get all lost on me yet, just remember the number for your particular camera.

The first thing we need to calculate is the Hyperfocal distance, for this calculation you will need to know the focal length of your lens. the aperture you are using and the CoC (circle of confusion) for your camera.

Wikipedia: the hyperfocal distance is the closest distance at which a lens can be focused while keeping objects at infinity acceptably sharp; that is, the focus distance with the maximum depth of field. When the lens is focused at this distance, all objects at distances from half of the hyperfocal distance out to infinity will be acceptably sharp.

The math to calculate the hyperfocal distance is as follows:

HyperFocal = (FocalLength * FocalLength) / (Aperture * CoC)

Thus, the Hyperfocal distance of a 50mm lens at f/2.8 on an APS sensor (Canon 30D in my case) is 146.85 feet.

Next we need to calculate the near point which is going to be the closest distance that will be in focus given the distance between the camera and the subject. The math here (yes, it gets SO much worse) is as follows:

NearPoint = (HyperFocal * distance) / (HyperFocal + (distance - focal))

This is complicated somewhat because the focal length is in millimeters and those of us in the US are much better with feet and inches still so if you want the end value to be in feet you have to do some more conversions. If we are using the same 50mm lens, at f/2.8 on an APS sensor at a distance of 10 feet (3048mm) then our HyperFocal distance is 146.85 feet (44,749.23mm), giving us a near focus point of 9.37 feet (2,856.66mm). Are we following along still? Did I lose anyone?

Alrighty then, let’s now calculate the far point distance, this is almost the same as before but using slightly different math, so here we go.

FarPoint = (HyperFocal * distance) / (HyperFocal - (distance - focal))

Without changing our values that we used before, we now know that are rear point is 10.72 feet (3,266.81mm). Take note that the near point is actually closer to you than the subject is, typically the focus is 1/3 in front of the subject and 2/3 behind the subject.

The final step is to calculate the total amount of focal distance. This is one I can even do without a calculator, we simply subtract the far point distance from the near point distance.

TotalDof = FarPoint - NearPoint

Giving our example so far we have a total depth of field of 1.35 feet (411.48mm).

Let’s get practical
Why on earth would you want to know this? The simple answer is you may not, nor may you ever care to know it. When shooting portraits, weddings, events, and pretty much anything else it really isn’t going to matter much. However, if you are the type that wants to set up a shot and have it be EXACTLY what you want, there is simply no other way to know what the camera is going to do. This can be important in macro, food, and product photography. By knowing exactly where you focus points begin and end you can more accuratly design and execute precise shots.

Ok, how about the easy way?
This is kind of like taking a digital photography class and having to spend a semester cooking your own B&W film, its good to know the theory before taking on the practical application. So how can we do this much easier than having to pull an scientific calculator each time you want to setup a shot?

  • f/Calc Spreadsheet (download) - This is an Excel spreadsheet that will do all the math for you. This was development by me and it free to use.
  • f/Calc Windows and Palm App (website) If you want a simple but powerful Windows or Palm based pplication, f/Calc does Field of View, Angle of View, Magnification, Spot Meter, f Numbers, Depth of Field and Hyperfocal distance
  • PhotoCalc for iPhone (website) - This application makes me want to have an iPhone or iTouch. Not only does it do everything for DoF, it also incorporates a sunrise/sunset function, flash exposure calculator, and Exposure Reciprocation calculator

I know this has been a doozy of an article to read through just to get to some free or almmost free (PhotoCalc is $2.99) tools to make it dead simple to perform these calculation. Hopefully this will help you perfect your images help you to use depth of field to its full extent.

Author: Kerry Garrison


Share/Save/Bookmark

This entry was posted on Tuesday, September 9th, 2008 at 5:00 am.
Categories: Shooting Tips.
Other Related Articles:
  Photography Basics: Beginners Guide to Aperture
  Understanding Depth of Field
  ExpoImaging Expoaperture Discs Review
  Using your flash’s guide number
  OnOne Software’s Focal Point

Loading Comments...
  1. Bryan Says:

    This is great info! I always knew that wider apertures made for shorter dof, but now I can actually put some specific numbers behind it.

  2. Anonymous Says:

    This is great info! I always knew that wider apertures made for shorter dof, but now I can actually put some specific numbers behind it.

  3. kgarrison Says:

    When I am doing product shots I want to have exact control over my work and will even print out a shot list with all of the camera settings on it before I go out to the studio. This is like going to the grocery store with a shopping list. I make sure I get exactly what I want and end up getting a few extras. Let's say I am shooting a picture of a phone, I want to be absolutely certain that the front and rear of the item is in focus given a specific distance and lens, with these tools I can run the numbers and come up with the exact combo of settings to achieve what I want.

  4. Anonymous Says:

    When I am doing product shots I want to have exact control over my work and will even print out a shot list with all of the camera settings on it before I go out to the studio. This is like going to the grocery store with a shopping list. I make sure I get exactly what I want and end up getting a few extras. Let's say I am shooting a picture of a phone, I want to be absolutely certain that the front and rear of the item is in focus given a specific distance and lens, with these tools I can run the numbers and come up with the exact combo of settings to achieve what I want.

  5. Photo Larry Says:

    Three things determine Depth of Field:
    1) Distance from the subject (closer=less, farther=more)
    2) Focal Length (Short=Deep, Long=Shallow)
    3) Aperture (Small=Depp, Open=Shallow)
    These are over simplified but better to explain to a novice.

  6. Anonymous Says:

    Three things determine Depth of Field:
    1) Distance from the subject (closer=less, farther=more)
    2) Focal Length (Short=Deep, Long=Shallow)
    3) Aperture (Small=Depp, Open=Shallow)
    These are over simplified but better to explain to a novice.

  7. Photo Larry Says:

    Three things determine Depth of Field:
    1) Distance from the subject (Close=Deep, Far=Shallow)
    2) Focal Length (Short=Deep, Long=Shallow)
    3) Aperture (Small=Deep, Open=Shallow)
    These are over simplified but better to explain to a novice.

  8. Anonymous Says:

    Three things determine Depth of Field:
    1) Distance from the subject (Close=Deep, Far=Shallow)
    2) Focal Length (Short=Deep, Long=Shallow)
    3) Aperture (Small=Deep, Open=Shallow)
    These are over simplified but better to explain to a novice.

  9. kgarrison Says:

    Good comment Larry. We have discussed depth of field before but this article was on how to calculate it exactly. Learning the basics is very important as well.

  10. Anonymous Says:

    Good comment Larry. We have discussed depth of field before but this article was on how to calculate it exactly. Learning the basics is very important as well.

  11. Adrian Says:

    I tried to download the fcalc spreadsheet, but all I get is a text version of your homepage??

  12. Anonymous Says:

    I tried to download the fcalc spreadsheet, but all I get is a text version of your homepage??

  13. kgarrison Says:

    I changed it to be a zip file, that should work better for people.

  14. Anonymous Says:

    I changed it to be a zip file, that should work better for people.

  15. kgarrison Says:

    If you have problems still, right click on the link and save the item to disk.

  16. Anonymous Says:

    If you have problems still, right click on the link and save the item to disk.

  17. Dr Pet's Says:

    Tks. very interesting and usefull

  18. Anonymous Says:

    Tks. very interesting and usefull

  19. Terry Says:

    This is great but can you tell me what point on the camera that you measure the distance from? I believe that on film cameras it is from the film plane which is usually marked. What about digital? I'm interested in determining the f-stop necessary for the desired depth of field when doing macro work. Thanks.

  20. Anonymous Says:

    This is great but can you tell me what point on the camera that you measure the distance from? I believe that on film cameras it is from the film plane which is usually marked. What about digital? I'm interested in determining the f-stop necessary for the desired depth of field when doing macro work. Thanks.

  21. adedavies Says:

    Wow! Finding this site is like discovering gold! Thanks for your huge help, Ade

  22. Anonymous Says:

    Wow! Finding this site is like discovering gold! Thanks for your huge help, Ade

  23. adedavies Says:

    Finding this site is like discovering GOLD! Thanks, Ade

  24. Anonymous Says:

    Finding this site is like discovering GOLD! Thanks, Ade