Depth of Field (DOF) Calculator
Depth of field, near and far focus limits and hyperfocal distance from focal length, f-number, subject distance and sensor, in meters or feet. How it works
Use the Depth of Field (DOF) Calculator
About the Depth of Field (DOF) Calculator
A 50 mm lens at f/2.8 focused at 3 m on a full-frame camera has a depth of field of 0.58 m, from 2.74 m to 3.32 m, with a hyperfocal distance of 30.84 m. This depth of field calculator uses the thin-lens formulas with a circle of confusion of 0.029 mm for full frame, and 45.2% of the depth falls in front of the subject and 54.8% behind it.
Depth of field by aperture: 50 mm lens, full frame, subject at 3 m
| Aperture | Hyperfocal distance | Near limit | Far limit | Total depth | In front / behind |
|---|---|---|---|---|---|
| f/1.4 | 61.63 m | 2.86 m | 3.15 m | 0.29 m | 47.6% / 52.4% |
| f/2 | 43.15 m | 2.81 m | 3.22 m | 0.41 m | 46.6% / 53.4% |
| f/2.8 | 30.84 m | 2.74 m | 3.32 m | 0.58 m | 45.2% / 54.8% |
| f/4 | 21.60 m | 2.64 m | 3.48 m | 0.84 m | 43.2% / 56.8% |
| f/5.6 | 15.44 m | 2.52 m | 3.71 m | 1.19 m | 40.4% / 59.6% |
| f/8 | 10.83 m | 2.36 m | 4.13 m | 1.78 m | 36.3% / 63.7% |
| f/11 | 7.89 m | 2.18 m | 4.81 m | 2.63 m | 31.2% / 68.8% |
| f/16 | 5.44 m | 1.94 m | 6.63 m | 4.69 m | 22.6% / 77.4% |
Full-frame circle of confusion 0.029 mm. Opening the aperture from f/16 to f/2.8 cuts the total depth from 4.69 m to 0.58 m.
Hyperfocal distance on full frame
| Focal length | f/8 | f/11 | f/16 |
|---|---|---|---|
| 24 mm | 2.51 m | 1.83 m | 1.27 m |
| 35 mm | 5.32 m | 3.88 m | 2.68 m |
| 50 mm | 10.83 m | 7.89 m | 5.44 m |
| 85 mm | 31.23 m | 22.73 m | 15.66 m |
H = f² ÷ (N × c) + f with c = 0.029 mm. Focus at H and the far limit is infinity.
The same shot on eleven sensors: 50 mm, f/2.8, subject at 3 m
| Sensor | Circle of confusion | Hyperfocal distance | Near limit | Far limit | Total depth |
|---|---|---|---|---|---|
| Full frame | 0.029 mm | 30.84 m | 2.74 m | 3.32 m | 0.58 m |
| APS-C (Canon) | 0.018 mm | 49.65 m | 2.83 m | 3.19 m | 0.36 m |
| APS-C (Nikon, Sony) | 0.019 mm | 47.04 m | 2.82 m | 3.20 m | 0.38 m |
| Micro Four Thirds | 0.015 mm | 59.57 m | 2.86 m | 3.16 m | 0.30 m |
| Medium format | 0.043 mm | 20.81 m | 2.63 m | 3.50 m | 0.87 m |
| 1-inch | 0.011 mm | 81.22 m | 2.89 m | 3.11 m | 0.22 m |
| APS-H (Canon) | 0.022 mm | 40.63 m | 2.80 m | 3.24 m | 0.44 m |
| Super 35 | 0.021 mm | 42.57 m | 2.81 m | 3.22 m | 0.42 m |
| Medium format 645 | 0.047 mm | 19.05 m | 2.60 m | 3.55 m | 0.95 m |
| 1/1.7-inch | 0.006 mm | 148.86 m | 2.94 m | 3.06 m | 0.12 m |
| 1/2.3-inch | 0.005 mm | 178.62 m | 2.95 m | 3.05 m | 99.1 mm |
The tool keeps the lens settings and changes only the circle of confusion. A real camera swap would also change the focal length or distance needed to frame the same scene, which this table does not do.
How to use this tool
- Enter the focal length in millimeters, the aperture as an f-number and the distance to the subject, and choose meters or feet for that distance.
- Pick the camera sensor. Its circle of confusion shows under the menu; type a value from 0.001 to 0.100 mm in the override box to replace it.
- Read the total depth of field, the near and far focus limits and the hyperfocal distance. The distance diagram draws the camera, the sharp band, the subject and the hyperfocal distance on one scale, and the bars below it show how much of the depth lies in front of and behind the subject.
- Change one value at a time. A blank field shows a prompt, and a value out of range shows a message on that field and no result.
Frequently asked questions
- How much depth of field do I get at f/2.8, f/8 and f/16?
- For a 50 mm lens on full frame focused at 3 m, the total depth is 0.58 m at f/2.8, 1.78 m at f/8 and 4.69 m at f/16. The near limit moves from 2.74 m to 2.36 m to 1.94 m while the far limit moves from 3.32 m to 4.13 m to 6.63 m, so more of the depth always sits behind the subject than in front of it.
- How do I calculate the hyperfocal distance?
- H = f² ÷ (N × c) + f. For 50 mm at f/8 with c = 0.029 mm that is 10.83 m. Focus there and the sharp zone runs from 5.41 m to infinity, which is half of H. Wikipedia states the same rule: a lens focused at the hyperfocal distance holds a depth of field from H/2 to infinity.
- Why does the far limit show infinity?
- When the subject is at or beyond the hyperfocal distance, nothing behind it falls outside the acceptable sharpness. A 50 mm lens at f/8 on full frame has H = 10.83 m, so a subject at 12 m gives a near limit of 5.69 m and a far limit of ∞.
- Does a smaller sensor give more or less depth of field?
- It depends on what stays the same. With the same lens, f-number and distance, a smaller sensor gets a smaller circle of confusion and so less depth: for 50 mm at f/2.8 and 3 m, 0.58 m on full frame, 0.36 m on Canon APS-C, 0.30 m on Micro Four Thirds and 0.22 m on 1-inch, against 0.87 m on medium format. To frame the same scene, though, the smaller sensor needs a shorter lens or more distance, and that gives it more depth at the same f-number. Run the tool with the focal length or distance you would really use on each camera.
- What circle of confusion should I use?
- The sensor menu fills in 0.029 mm for full frame, 0.018 mm for Canon APS-C, 0.019 mm for Nikon and Sony APS-C, 0.015 mm for Micro Four Thirds, 0.043 mm for medium format and 0.011 mm for 1-inch. The five newer presets use the sensor diagonal ÷ 1,500, a widely used limit that also gives the 0.029 mm for full frame: 0.022 mm for Canon APS-H, 0.021 mm for Super 35, 0.047 mm for 645 medium format, 0.006 mm for 1/1.7-inch and 0.005 mm for 1/2.3-inch. The older presets do not all follow that rule: by diagonal ÷ 1,500, Micro Four Thirds would be 0.014 mm and the 43.8 × 32.9 mm medium format 0.037 mm. Type your own from 0.001 to 0.100 mm to replace any of them.
- How shallow is an 85 mm lens at f/1.4?
- Focused at 2 m on full frame it holds 43.0 mm in focus, from 1.98 m to 2.02 m, with 49.5% of that in front of the subject and 50.5% behind. Below 10 mm of total depth the tool adds a focus-stacking note, which a 100 mm macro lens at f/2.8 and 0.3 m reaches with 1.0 mm.
Related Tools
View all toolsCrop Factor Calculator
Crop factor, equivalent focal length and f-number, and horizontal, vertical and diagonal field of view for eleven sensor sizes or a custom one.
ND Filter Exposure Calculator
Find the shutter speed to use with an ND filter. Pick your base shutter speed and the filter strength in stops or ND number (ND8, ND64, ND1000).
Aspect Ratio Calculator
Find the aspect ratio of a size in pixels, such as 1920 × 1080 = 16:9, resize while keeping it, or get the missing side from a ratio like 21:9.
Golden Ratio Grid Overlay
Draw golden ratio lines at 38.2% and 61.8%, a golden spiral, diagonals or golden triangles over an image, read the positions in pixels and save a PNG.
Image Resizer
Resize an image to exact pixels, a percent, or cm, mm or inches at a DPI, with the aspect ratio locked or free, and save PNG, JPEG or WebP under a KB target.
Image Cropper
Crop an image to 1:1, 4:5, 16:9, 9:16, golden or a custom ratio, type exact pixels or rotate it, and save PNG, JPEG or WebP at full size, with no scaling.