In photography and optical engineering, “depth of field” (DOF) and “depth of focus” are often confused. However, they describe fundamentally different concepts, tied to different parts of the imaging system.
To understand the distinction, it’s helpful to first define two key terms:
- Object space: The region in front of the lens, where real-world subjects reside.
- Image space: The region behind the lens, where the image is formed — typically on a sensor or film plane.
With those definitions in mind:
- Depth of field (DOF) is an object-space concept. It refers to the range of subject distances that appear acceptably sharp in the final image. When you focus your lens at a particular distance, there’s a region in front of and behind that point where the blur remains small enough to be perceived as “in focus.” The size of this region depends on the aperture (f-stop), focal length, subject distance, and the acceptable circle of confusion, which is the maximum blur spot diameter that still appears sharp to the viewer.
- Depth of focus, on the other hand, is an image-space concept. It refers to the tolerance in the position of the sensor (or film) behind the lens. That is, even if the subject is perfectly positioned at the lens’s focused distance, the sensor can be slightly forward or backward from the nominal image plane and still record an acceptably sharp image. This matters more in high-precision imaging systems or when designing mechanical tolerances in cameras.
To put it simply:
- Depth of field answers: “How much of the scene in front of the lens will be in focus?”
- Depth of focus answers: “How much wiggle room is there behind the lens for placing the sensor, or how much tolerance there is for variations in the projected focal plane?”
Depth of focus is easier to understand than depth of field; it’s governed by a straightforward geometric relationship. If we assume a symmetric lens and paraxial rays, the total depth of focus (i.e., the allowable displacement of the image plane for acceptable sharpness) is given by:
Depth of Focus = 2*N*c
Where:
- N is the f-number (focal length divided by aperture diameter),
- c is the diameter of the acceptable circle of confusion in image space.
If you’re only interested in the defocus tolerance on one side of the image plane (front or back), that’s just N*c. Focal length or focus distance don’t enter into the calculation. It’s purely an image-space tolerance: a linear depth range within which the sensor or projected can move without exceeding a blur circle of diameter c.
Depth of field, in contrast, depends on many variables and is inherently more complex:
- Focal length f
- Aperture (f-number) N
- Subject distance s
- Circle of confusion c
The relationship is nonlinear, particularly at close focus distances. The basic geometric approximation for the near (Dn) and far (Df ) limits of DOF is:
- Near DOF limit: Dn = (s * (H – f)) / (H + s – 2f)
- Far DOF limit: Df = (s * (H – f)) / (H – s), if s < H; Df = ∞, if s ≥ H
Where H = hyperfocal distance = (f²) / (N * c) + f
Alternatively, in a more common and slightly simplified form (using H as defined above):
- Near DOF limit: Dn = (s * H) / (H + (s – f))
- Far DOF limit: Df = (s * H) / (H – (s – f))
The hyperfocal distance is a special focusing distance that maximizes the depth of field for a given aperture and circle of confusion. When the lens is focused at the hyperfocal distance, everything from half that distance to infinity appears acceptably sharp. Let’s look at hyperfocal distances for some common medium format lenses.
I’ve plotted the curves for several f-stops, using four different circle of confusion diameters. 4 um is about the pixel pitch of the 100 MP 33x44mm sensors, and should be used where maximum sharpness is demanded. 8 um is a good compromise where sharpness is quite important. 30 um is one standard that is often used for the markings on lens barrels, and is pretty sloppy if you print at all large. 15 um is a compromise between that and 8 um.
In tabular form:
We don’t need that much precision, so this table plenty good enough.
If we take the ratio of the focus distance to the hyperfocal distance and make that the x axis, and make the vertical axis the near and far limits of the depth of field, we get a graph that applies to all lenses of all focal lengths and f-stops at subject distances that are great compared to the focal length of the lens.
There’s an old rule of thumb that says that focusing a third of the way into the zone of the DOF will give you the same amount of blur at the limits of the DOF zone. Is that true? Well, it’s true in the same sense that a stopped clock is right twice a day.
As you can see from the above, the one third/two thirds rule is accurate at only one focused distance, which is about 0.15 the hyperfocal distance. If you get much closer, the ratio of front depth to back depth is about 1:1, and if you get much further away, the back depth is much larger than the front depth.
Oren Grad says
Harold Merklinger has an interesting contrarian take on the use of hyperfocal distances:
http://www.trenholm.org/hmmerk/index.html#TIAOOF
JimK says
Indeed. I am not a fan. I’ve dealt with some of the issues elsewhere in this blog.
Oren Grad says
Found your series of “object field” posts – thanks!
Jon Maxim says
Hi Jim,
For more than 50 years I have been living by the 1/3rd rule and wondering why some things didn’t turn out the way I expect. Thank you for the explanation. Now comes the hard question. How do we apply this practically in the field, especially when you do not have much time for calculations? Any tips other than carrying around the tables and carrying a laser distance measuring device?
Thanks, Jon
JimK says
If you spend some time with a laser rangfinder and a DOF app, you’ll get to the point where you’ve got a gut feel for how things wil turn out.