Back to Learning Center

Depth Of Field Calculator

by Burak Arik
#Depth of field#DOF#bokeh#depth of field calculator#depth of field photography
Depth Of Field Calculator

Depth of field (DOF) refers to the area in a photograph where subjects appear sharp and in clear focus. It is the distance between the nearest and farthest points in the image that look acceptably sharp. For example, in the photo below, only the fourth, fifth, and sixth people from the left fall within the sharp focus zone, while the others appear blurred.

Depth of field can be creatively controlled depending on the style of photography you want to achieve. In portrait photography, a shallow depth of field is often preferred so that only the subject’s face is in focus and the background appears soft and blurred (bokeh). This draws attention to the subject and minimizes distractions. In landscape photography, however, a deep depth of field is ideal so that everything from the foreground to distant mountains remains sharp.

In the example below, the red lines illustrate the physical distance from the camera that falls within the focused area. Four key factors determine depth of field:

  1. Camera sensor size
  2. Aperture (f-stop) value
  3. Lens focal length
  4. Distance from the subject

By adjusting these settings, you can control where sharpness begins, where it ends, and the total depth of field. The calculator on the right estimates these values to help you plan focus and achieve the desired look in your photos.

Depth of Field Calculator

mm
Depth of field demonstration showing people at different distances from camera with only middle subjects in sharp focus
The red bracket shows the depth of field (DOF) - only subjects within this range appear sharp

Frequently Asked Questions (FAQ)

What is depth of field in photography?
Depth of field (DOF) is the distance between the closest and farthest objects in a photograph that appear acceptably sharp and in focus. It determines how much of your image is in focus versus blurred. A shallow depth of field keeps only a small portion of the image sharp (common in portrait photography), while a deep depth of field keeps most or all of the scene in focus (ideal for landscape photography).
What are the four factors that affect depth of field?
The four main factors that influence depth of field are: (1) Aperture value — wider apertures like f/1.8 create shallower depth of field, while narrower apertures like f/16 create deeper focus; (2) Focal length — longer focal lengths produce shallower depth of field; (3) Distance to subject — the closer you are to your subject, the shallower the depth of field; and (4) Camera sensor size — larger sensors (full frame) create shallower depth of field than smaller sensors (crop or micro four thirds) at the same settings.
How do I calculate depth of field?
You can calculate depth of field using a DOF calculator by entering four variables: your camera's sensor size, the aperture (f-stop) you're using, the focal length of your lens in millimeters, and the distance to your subject. The calculator will output three values: where focus begins, where focus ends, and the total depth of field range.
What aperture gives the best depth of field for portraits?
You can calculate depth of field using a DOF calculator by entering four variables: your camera's sensor size, the aperture (f-stop) you're using, the focal length of your lens in millimeters, and the distance to your subject. The calculator will output three values: where focus begins, where focus ends, and the total depth of field range.
What aperture should I use for landscape photography?
For landscape photography where you want everything from foreground to background in sharp focus, use narrow apertures between f/8 and f/16. These settings create a deep depth of field. Avoid going beyond f/16-f/22 as diffraction can reduce overall image sharpness.
Does sensor size affect depth of field?
Yes, sensor size significantly affects depth of field. Full frame sensors (35mm) produce shallower depth of field compared to crop sensors (APS-C with 1.5x or 1.6x crop factor) or micro four thirds sensors when using the same aperture, focal length, and subject distance. This is why full frame cameras are often preferred for portrait photography where background blur is desired.
What is the difference between depth of field and bokeh?
Depth of field refers to the zone of acceptable sharpness in an image, while bokeh describes the aesthetic quality of the out-of-focus blur in the background or foreground. A shallow depth of field creates more bokeh. The quality of bokeh depends on lens design, aperture blade shape, and how specular highlights render in the blurred areas.
How does focal length affect depth of field?
Longer focal lengths (telephoto lenses like 85mm, 135mm, or 200mm) produce shallower depth of field at the same aperture and subject distance compared to shorter focal lengths (wide-angle lenses like 24mm or 35mm). This is why portrait photographers often prefer 85mm or longer lenses to achieve pleasing background separation.
What is hyperfocal distance?
Hyperfocal distance is the closest focusing distance at which everything from half that distance to infinity appears acceptably sharp. When you focus at the hyperfocal distance, you maximize the depth of field in your image. This technique is especially useful in landscape photography to ensure both foreground elements and distant mountains are in focus.
Can I preview depth of field before taking a photo?
Yes, most DSLR and mirrorless cameras have a depth of field preview button that temporarily stops down the lens to your selected aperture, allowing you to see the actual depth of field through the viewfinder or on the LCD screen. Note that the preview will appear darker because less light enters through the smaller aperture.