Depth of Field Calculator & Lens Comparison Tool

Compare multiple camera lenses side-by-side

What is depth of field?

The depth of field (DoF) is the area of an image—between the foreground and background—where objects are in acceptably sharp focus. This is commonly used to affect a photo’s aesthetics, e.g. with bokeh.

A page of text with the middle section in focus, and the foreground and background out of focus

The clear part of this image represents the depth of field

Image from Wikipedia

Depth of field is affected by the camera’s sensor size, the lens’ aperture, and the lens’ focal length (or zoom). Larger sensors, longer focal lengths (being more zoomed in), and larger apertures yield a shallower (smaller, tighter) depth of field.

A bud on a tree branch, which is the only part that's in focus, taken at f/1.8

Narrow (small) depth of field

Image from Wikipedia
A bud on a tree branch, taken at f/22; nearly everything is in focus here, so the bud doesn't stand out very much

Deep (large) depth of field

Image from Wikipedia

Using the calculator

The distance to your subject is configured above the table and it applies to all lenses.

For a given lens, enter the focal length, aperture, and the camera’s sensor size (or crop factor). The length of the depth of field is displayed within the table and updates as you change the values.

Focal length values should be in absolute size (millimeters), not the 35mm equivalent.

Screenshot of lens input

Be sure to use the actual focal length of the lens (e.g. as printed on the front of the lens)—don’t convert it to the 35mm equivalent.

Feel free to give each lens a meaningful name to keep track of them.

The depth of field calculation can be expanded to view more related statistics:

Further details about a lens’ depth of field

Comparing lenses

Click on the “Add Lens” box to add an additional lens, then enter the second lens’ characteristics.

Comparison of two lenses, with the Add Lens button and Duplicate icon button highlighted

If the lenses have similar characteristics, you may save time by selecting a lense and clicking the Duplicate button to carry over the same values to a new lens.

You can add an unlimited number of lenses.


You can also see how lenses compare at various distances from the subject. The graph will display the length of the depth of field at 1-meter (or 5-foot) intervals.

Chart comparing two lenses at various distances

Sharing and saving

At any time you can copy the address from your browser and send it to a friend. They will see the exact same lenses that you’ve entered.

You can also bookmark the page to come back to the same lens configuration later.

screenshot with the browser address bar highlighted