Depth of Field Calculator
Input Parameters
Computed Results
The depth of field calculator determines the range of acceptable sharpness in a photograph. By entering your sensor size, focal length, aperture, and focusing distance, you can estimate the exact near and far focus limits, total depth of field, and hyperfocal distance for your specific camera setup.
How to Use the Depth of Field Calculator
Follow these steps to determine your focus limits and total depth of field:
- Select Sensor Size: Choose your camera's sensor format (e.g., full frame, APS-C, Micro Four Thirds). This determines the circle of confusion used in the calculation.
- Enter Lens Focal Length (f): Input the true focal length of your lens in millimeters (mm), not the full-frame equivalent.
- Enter Aperture (f-stop): Provide the f-number you plan to use (e.g., 2.8, 5.6, 11).
- Enter Focusing Distance (u): Input the distance from the camera sensor to your subject in meters (m).
Once calculated, you can visualize the results on the Depth of Field Range and Focus Limits chart.
Formulas and Calculation Method
The calculator uses standard optical physics formulas to determine depth of field. The calculations rely on a specific Circle of Confusion (c) value, which varies by sensor size (e.g., 0.029mm for full frame, 0.018mm for Canon APS-C).
Hyperfocal Distance (H)
The hyperfocal distance is the closest focusing distance that keeps objects at infinity acceptably sharp.
Where f is focal length, N is the f-number, and c is the circle of confusion.
Near and Far Focus Limits
These formulas determine the closest and furthest points of acceptable sharpness based on the subject distance (u).
Total Depth of Field
The total depth of field is simply the difference between the far limit and the near limit.
Note: If the far limit reaches infinity, the calculator outputs 999999.
Inputs and Outputs Reference
| Field | Type | Description |
|---|---|---|
| Sensor Size | Input | The physical format of the camera sensor, which dictates the circle of confusion. |
| Lens Focal Length (f) | Input | The focal length of the lens in millimeters (mm). |
| Aperture (f-stop) | Input | The aperture ratio N (e.g., 2.8 for f/2.8). |
| Focusing Distance (u) | Input | Distance from the camera to the subject in meters (m). |
| Depth of Field (DoF) | Output | The total distance between the near and far limits of acceptable sharpness. |
| Near Limit | Output | The closest distance to the camera that appears acceptably sharp. |
| Far Limit | Output | The furthest distance from the camera that appears acceptably sharp. |
| Hyperfocal Distance | Output | The focusing distance that maximizes depth of field from half that distance to infinity. |
Verified Scenario Walkthroughs
Here are four examples demonstrating how different camera settings impact depth of field.
Macro Photography with Small Sensor
Using a 1-inch sensor with a 25mm lens at f/1.8, focused on a subject 0.5 meters away:
- Depth of Field: 0.01504 m
- Near Limit: 0.4926 m
- Far Limit: 0.5076 m
- Hyperfocal Distance: 31.5907 m
Portrait Session on Medium Format
Using a medium format sensor with an 80mm lens at f/2.0, focused on a subject 3.5 meters away:
- Depth of Field: 0.37466 m
- Near Limit: 3.3227 m
- Far Limit: 3.6973 m
- Hyperfocal Distance: 64.08 m
Wildlife Telephoto Shot
Using a Canon APS-C sensor with a 400mm lens at f/5.6, focused on a subject 25 meters away:
- Depth of Field: 0.77489 m
- Near Limit: 24.6186 m
- Far Limit: 25.3934 m
- Hyperfocal Distance: 1587.7016 m
Landscape Wide Angle Deep Focus
Using a Micro Four Thirds sensor with a 12mm lens at f/11, focused on a subject 10 meters away:
- Depth of Field: 999999 m (Infinity)
- Near Limit: 0.8137 m
- Far Limit: 999999 m (Infinity)
- Hyperfocal Distance: 0.8847 m
Practical Use Cases
Landscape Photography
Landscape photographers use the hyperfocal distance output to maximize sharpness across an entire scene. By focusing exactly at the hyperfocal distance, everything from half that distance all the way to infinity will remain acceptably sharp.
Portrait Photography
Portrait photographers often want a shallow depth of field to separate the subject from the background. By adjusting the aperture and focusing distance inputs, you can calculate exactly how much of the subject (e.g., just the eyes and nose) will be in focus before the background blurs.
Macro Photography
When shooting close-up subjects, depth of field shrinks dramatically, often to mere millimeters. The calculator helps macro photographers determine if they need to stop down their aperture further to keep an entire insect or flower petal in focus.
Frequently Asked Questions
What does a far limit of 999999 mean?
In this calculator, 999999 represents infinity. This occurs when your focusing distance is at or beyond the hyperfocal distance, meaning everything from the near limit to the horizon will be acceptably sharp.
How does sensor size affect depth of field?
Sensor size changes the circle of confusion used in the calculation. Generally, larger sensors require longer focal lengths or closer focusing distances to achieve the same framing as smaller sensors, which results in a shallower depth of field at the same aperture.
Should I use the full-frame equivalent focal length?
No. You should always enter the true, physical focal length printed on your lens. The calculator accounts for the crop factor automatically when you select your specific sensor size.