Depth of Field Calculator
Find the near and far limits of acceptable sharpness from your lens, aperture, focus distance, and sensor.
Calculator verified • Last updated: August 2026
Lens & Focus Settings
—
Everything between the near and far limits appears acceptably sharp in the photo; a far limit of infinity means everything beyond the near limit, to the horizon, is in focus.
Quick Reference
Circle of Confusion by Sensor Format
| Sensor format | Circle of confusion |
|---|---|
| Full Frame | 0.030 mm |
| APS-C | 0.020 mm |
| Micro Four Thirds | 0.015 mm |
Common Aperture (f-stop) Values
| f-stop | Typical use |
|---|---|
| f/1.4 – f/2 | Shallow depth of field — portraits, low light |
| f/2.8 – f/4 | Moderate background separation |
| f/5.6 – f/8 | Balanced sharpness — general purpose, sweet spot for most lenses |
| f/11 – f/16 | Deep depth of field — landscapes, group shots |
| f/22 | Maximum depth of field, but softer due to diffraction |
How Depth of Field Is Calculated
Depth of field starts from the hyperfocal distance — the focus distance beyond which everything up to infinity stays acceptably sharp. It depends on the focal length, the aperture, and the circle of confusion (the largest a point of light can blur on the sensor and still look like a sharp point at normal viewing size).
Once the hyperfocal distance is known, the near and far limits at any focus distance follow directly:
f: focal length, in millimeters.
N: aperture (f-number).
c: circle of confusion for the sensor size, in millimeters.
s: focus distance, in millimeters.
H: hyperfocal distance, in millimeters.
D_n, D_f: near and far limits of the depth of field, in millimeters.
If the far-limit denominator (H minus (s minus f)) is zero or negative, the far limit is effectively infinite — the focus distance is already at or beyond the hyperfocal distance, so everything from the near limit onward is in focus.
Worked Example
A 50mm lens at f/2.8 on a full-frame camera (circle of confusion 0.03mm), focused at 10 feet (3,048mm): the hyperfocal distance works out to about 29,812mm, or roughly 97.8 feet. Plugging that into the near and far limit formulas gives a near limit around 9.1 feet and a far limit around 11.1 feet — a total depth of field of about 2 feet. Note how shallow that is compared to the 97.8-foot hyperfocal distance: at typical portrait distances, wide apertures produce a noticeably narrow zone of sharpness.
What Changes Depth of Field
Aperture has the most direct effect — opening up to a wider aperture (a smaller f-number like f/1.8) narrows depth of field, useful for blurring a background behind a subject; closing down to a narrower aperture (a larger f-number like f/11) widens it, useful for landscapes where everything should be sharp. Focal length and focus distance interact too: a longer lens or a closer subject both narrow depth of field even at the same aperture, which is why a telephoto portrait lens produces much softer backgrounds than a wide-angle lens at the same f-number.
A Brief History of Depth of Field and the F-Stop
Aperture control is as old as the camera itself, but a consistent way to compare apertures across different lenses took decades to standardize. Early cameras used a variety of incompatible aperture scales specific to individual makers; the modern f-number system — aperture expressed as focal length divided by effective aperture diameter — gradually displaced these proprietary systems as photographic societies pushed for a shared standard through the late 19th and early 20th centuries, arriving at the now-familiar sequence (f/1.4, f/2, f/2.8, f/4, and so on) where each stop lets in half the light of the one before it.
Depth of field itself was well understood by working photographers long before it could be calculated on demand — many lenses through the 20th century had a printed depth-of-field scale engraved directly on the barrel, letting a photographer read off the near and far limits for a given aperture without any arithmetic. The hyperfocal-distance formula this calculator automates is the same underlying optical relationship those engraved scales were built from, just computed directly instead of read off a fixed table calibrated for one specific lens.
Common Depth of Field Mistakes
Assuming depth of field splits evenly in front of and behind the focus point is a common misconception — in most real shooting situations, roughly one-third of the depth of field falls in front of the focus point and two-thirds falls behind it, though that split shifts closer to even only very near the hyperfocal distance.
Forgetting that sensor size changes the result for the same focal length and aperture is another — a 50mm lens at f/2.8 on a full-frame body has a different depth of field than the same settings on an APS-C body, because the smaller sensor's tighter circle of confusion produces a different hyperfocal distance.
Depth of Field Terms You Should Know
Hyperfocal Distance — the focus distance beyond which everything, out to infinity, appears acceptably sharp.
Circle of Confusion — the largest a point of light can blur on the sensor while still appearing as a sharp point at normal viewing size; smaller sensors use a smaller circle of confusion.
Bokeh — the aesthetic quality of the out-of-focus areas outside the depth of field, distinct from depth of field itself (which measures the sharp zone's size, not how the blur looks).
Frequently Asked Questions
What is depth of field?
Depth of field is the range of distances in front of the camera, from the near limit to the far limit, that appear acceptably sharp in a photo. Everything closer than the near limit or farther than the far limit appears progressively blurrier.
What makes depth of field shallower or deeper?
A wider aperture (smaller f-number), a longer focal length, and a closer focus distance all make depth of field shallower. A narrower aperture (larger f-number), a shorter focal length, and a farther focus distance all make it deeper.
Why does sensor size affect depth of field?
A smaller sensor uses a smaller circle of confusion (the largest a point of light can blur and still look sharp), because its image gets enlarged more to reach the same output size. This gives smaller sensors inherently deeper depth of field at the same focal length, aperture, and distance.