I'll probably be repeating things people already said, but here goes...
Prime lenses (those that don’t zoom, but have a single focal length, like 50mm or 135mm, or 200 mm) generally have both the distance scale on them, and a bunch of brackets that mark the effective DOF for that lens at different f/stops. Zoom lenses don’t.
If you go to the DOF calculator link posted by EchoingWhisper, you will see a nice diagram that shows DOF and hyperfocal distance. Playing around with the calculator, you find some of the following:
- For a given lens and focal length, DOF increases with aperture (f/22 has more DOF than does f/5.6)
So, 50mm lens on a Canon 7D, set to an aperture of f/5.6, focused at 20 ft., will have a DOF of about 11 ft. (15’11” on the near end, 27’0” at the far end). At f/22, the near point is at 9’9”, and the far point is at infinity.
- At the same distance, wider focal lengths give more DOF than do longer focal lengths, EEBE (everything else being equal).
So a 200mm lens on a Canon 7d, set to an aperture of f/5.6, focused at 20 ft., will had a DOF of about 8” (compared to 11 ft with with 50mm lens set to the same aperture and distance).
- At the same distance, with the same lens, and with the same aperture, larger sensors give more DOF than do smaller sensors EEBE.
So if we switched the Canon 7D (which has a sensor with a crop factor of 1.6x) and replace it with a Canon 5D MkII, which has a full-size sensor, the DOF is now almost 19 ft (near side at 14’2”, far side at 33’11”

at 50mm, f/5.6 and 20ft. focusing distance.
In principle, the plane of focus is exceedingly thin if you have a sensor with infinite resolving power. But in the real world, film media and sensors have limitations, beyond which you just can’t get more detail. That limitation can be expressed as a “circle of confusion” Sensors with large sensing elements have relatively “large” circles of confusion, whereas sensors with very densely packed sensing elements have very small circles of confusion. And this means that something ahead or behind the point of exact focus, will still look in focus if the corresponding out-of-focus circle is less than what the sensor can resolve.
Now how to use this information?
Suppose you have a Canon 7D with a 18-55mm zoom lens. You have a scene where you want to capture the flowers at your feet at 6 feet, and you want the horizon to also be in focus. Let’s also say that you decide that the 55mm focal length give you the most pleasing framing. Running the little DOF calculator, you find out that the hyperfocal distance at f/32 is 16’6” and the near point is 8’7”. Not enough. But if you zoom out to 40mm, the hyperfocal distance at f/32 is 8’9”, and the near point is at 4’5”. Perfect! So you find something at 8’9” away from you, set your focus on that, lock the focus, then reframe your picture with the flowers in the foreground and the horizon in the back, and Voila! You got everything in focus that you wanted.
Now wasn’t that simple?