Depth of field in camera lenses

Learn how aperture, focal length, distance, and sensor size determine depth of field in camera lenses, with formulas and practical photography tips.

What Is Depth of Field

Depth of field (DOF) refers to the range in front of and behind the exact point of focus within which objects in a scene still appear acceptably sharp on the image plane, when a lens is precisely focused on a particular point. The total span of this acceptably sharp zone — both in front of and behind the focal point — is called the depth of field.

The key to understanding depth of field lies in one concept: perfectly sharp focus only ever occurs on a single plane. However, because human visual acuity is limited, a certain amount of blur just in front of or behind that plane still looks "sharp" to the eye, as long as the blur stays below a certain threshold. The maximum blur-spot diameter that the eye will still accept as sharp is called the circle of confusion (CoC). Depth of field is, in essence, the region in object space over which the resulting blur spot diameter remains at or below this permissible circle of confusion.

Four Key Factors That Affect Depth of Field

1. Aperture (f-number)

Aperture is the most intuitive factor affecting depth of field. A larger aperture (smaller f-number, e.g., f/1.4) widens the cone angle of light passing through the lens, so even a small distance from the point of focus produces blur exceeding the permissible circle of confusion — resulting in a shallower depth of field. A smaller aperture (larger f-number, e.g., f/16) narrows the light cone angle, producing a deeper depth of field. This is why portrait photographers commonly use a wide aperture to blur the background, while landscape photographers use a narrow aperture to keep both foreground and background sharp.

2. Focal Length

At the same shooting distance and aperture, a longer focal length (telephoto lens) produces a shallower depth of field, while a shorter focal length (wide-angle lens) produces a deeper depth of field. This is why portraits shot with telephoto lenses show more pronounced background blur, while landscapes shot with wide-angle lenses tend to keep everything, near and far, in focus.

3. Subject Distance

The closer the point of focus is to the camera, the shallower the depth of field; the farther away, the deeper the depth of field. In macro photography, depth of field is often just a few millimeters, precisely because the shooting distance is extremely close.

4. Sensor Size (Format)

With the same field of view and the same f-number, a larger sensor produces a shallower depth of field. This is also why full-frame cameras achieve shallow-depth-of-field background blur more easily than smartphone cameras — smartphone sensors are very small, so even with an equivalent large aperture, their background-blurring ability remains limited.

How Depth of Field Is Calculated

The approximate formulas for depth of field are:

  • Near limit of depth of field ≈ (CoC diameter × f-number × focus distance²) / (focal length² + CoC diameter × f-number × focus distance)
  • Far limit of depth of field ≈ (CoC diameter × f-number × focus distance²) / (focal length² − CoC diameter × f-number × focus distance)

An interesting pattern emerges from these formulas: the far depth of field is usually greater than the near depth of field, an effect that becomes more pronounced with a smaller aperture and a longer focus distance. This is why landscape photographers are often advised to focus roughly one-third of the way into the scene (near the hyperfocal distance), so as to make the best use of both near and far depth of field to cover the entire scene.

The Concept of Hyperfocal Distance

Hyperfocal distance is the focus distance at which everything from half that distance out to infinity remains acceptably sharp. By making good use of hyperfocal distance, landscape photographers can shoot with a relatively wide aperture while still keeping the whole scene sharp and avoiding the diffraction-induced softness that comes with an excessively narrow aperture.

Interactive Depth of Field Calculator

Enter your focal length, aperture, focus distance, and sensor type below to calculate the near limit, far limit, total depth of field, and hyperfocal distance.

Formulas used: Hyperfocal distance H = f²/(N×c) + f. Near limit = H×s / (H + (s−f)). Far limit = H×s / (H − (s−f)), or infinity if s ≥ H. f = focal length, N = f-number, c = circle of confusion, s = focus distance. Results are approximate estimates for reference only.

Practical Applications of Depth of Field in Photography

Photography Type Common Strategy Purpose
Portrait photography Wide aperture (f/1.4–f/2.8) + telephoto lens Isolate the subject, blur the background
Landscape photography Narrow aperture (f/8–f/16) + hyperfocal focusing Keep both foreground and background sharp
Macro photography Medium aperture (f/8–f/16) + focus stacking Compensate for extremely shallow depth of field
Street / documentary photography Medium aperture (f/5.6–f/8) Balance sharp coverage with shutter speed

Frequently Asked Questions (FAQ)

What is depth of field in photography?

Depth of field is the zone in front of and behind the point of focus that still appears acceptably sharp in a photo. It is determined by the lens aperture, focal length, subject distance, and sensor size.

Does aperture affect depth of field?

Yes, aperture has the most direct effect. A wider aperture (smaller f-number, such as f/1.4) produces a shallow depth of field with a blurred background, while a narrower aperture (larger f-number, such as f/16) produces a deep depth of field with more of the scene in focus.

Why does a telephoto lens create more background blur than a wide-angle lens?

At the same shooting distance and aperture, a longer focal length narrows the depth of field, which is why telephoto lenses produce more pronounced background blur than wide-angle lenses.

What is hyperfocal distance and why does it matter?

Hyperfocal distance is the focus distance beyond which everything out to infinity remains sharp, while also keeping objects from half that distance onward in focus. Focusing at the hyperfocal distance lets landscape photographers maximize sharpness across the whole scene without needing to stop the aperture down excessively.

Why is depth of field shallower on a full-frame camera than on a smartphone?

For the same field of view and f-number, a larger sensor produces a shallower depth of field. Full-frame sensors are much larger than smartphone sensors, so full-frame cameras achieve more pronounced background blur even at moderate apertures.

Summary

Depth of field is the combined result of aperture, focal length, subject distance, and sensor size. Understanding how depth of field works not only helps photographers control the balance of sharpness and blur more precisely, but is also an important parameter in lens design and optical system evaluation. Mastering depth of field control is a key step in moving from simply "getting the shot in focus" to "shooting with intention and feeling."