How to Calculate Depth of Field
A big stumbling block for many new photographers 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 the math involved and then make it real easy with an Excel spreadsheet and some links to some free applications to help you out.
Feel free to skip right over this part, this is the boring part, it’s 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Â one of two numbers. For most of us with APS/APS-C sized sensors this number is 0.019948, for full frame sensors (the big Pro cameras) and 35mm film the number is 0.02501. This represents the sensor size. Again, don’t get all lost on me yet, just remember the number for your particular camera (source ThatSweetgift.com).
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 the closest distance that will be in focus given the distance bdetween 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 somewhat Â complicated because the focal length is in millimeters and those of us in the US are 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 is important in macro, food, and product photography. By knowing exactly where you focus points begin and end you can more accurately 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 easier than having to pull a scientific calculator each time you want to set up 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 is free to use.
- f/Calc Windows and Palm App (website) If you want a simple but powerful Windows or Palm based application, f/Calc does Field of View, Angle of View, Magnification, Spot Meter, f Numbers, Depth of Field and Hyperfocal distance
- PhotoCalc for iPhone (website) – Not only does it do everything for DoF, it also incorporates a sunrise/sunset function, flash exposure calculator, and Exposure Reciprocation calculator.
- CamCalc (Market) Android App for Depth of field, field of view, focal length equivalents, flash calculations, color temp. conversion, miniatures, and sunrise, sunset.
- PhoforPho (Market) Android App with Exposure calculator, Hyperfocal calculator, DoF calculator, Timer, and Exposure compensation calculation for multiple exposures.
I know this has been a doozy of an article to read through just to get to some free or almost free (PhotoCalc is $2.99) tools to make it dead simple to do these calculation. Hopefully this will help you perfect your images help you to use depth of field to its full extent.