Calculator Tools
Depth of Field Calculator
Calculate depth of field, hyperfocal distance, and near and far focus limits for any sensor, focal length, aperture, and subject distance.
Camera sensor
35 mm equivalent. The conventional reference for CoC = 0.030 mm.
35 mm equivalent at 1x crop: 50 mm
Distance from the lens (sensor plane) to the subject. Comma or period both work as the decimal separator.
Worked examples
Tap any example to load it. Each one is a common photography scenario with realistic camera settings.
Circle of confusion reference
The circle of confusion (CoC) is the largest sensor spot that still reads as a point at a standard viewing distance. Smaller sensors get smaller CoC values, which is why a tiny sensor at the same aperture and equivalent field of view shows much more depth of field than a full-frame sensor.
| Sensor | CoC (mm) | Crop factor |
|---|---|---|
| Full frame (36 x 24 mm) | 0.03 | 1x |
| APS-C Canon (22.3 x 14.9 mm) | 0.019 | 1.6x |
| APS-C Sony/Nikon/Fuji (23.6 x 15.6 mm) | 0.02 | 1.5x |
| Micro Four Thirds (17.3 x 13 mm) | 0.015 | 2x |
| 1 inch (13.2 x 8.8 mm) | 0.011 | 2.7x |
| Smartphone 1/2.3 in (6.17 x 4.55 mm) | 0.005 | 5.6x |
| Medium format 44 x 33 mm | 0.037 | 0.79x |
How the math works
- Hyperfocal distance: H = f squared divided by (N times c), plus a small focal length correction. Focusing at H gives a depth of field from H/2 to infinity, which is the maximum DOF possible at a given aperture.
- Near and far limits: the standard thin-lens formulas use the subject distance u and the hyperfocal H to give the near and far edges of the in-focus zone. The split is asymmetric: when the subject is closer than the hyperfocal, there is more sharp distance behind the subject than in front, roughly a 1/3 to 2/3 rule.
- Circle of confusion: c sets the threshold for what counts as in focus. The conventional value of 0.030 mm on full frame assumes an 8 x 10 inch print viewed at 25 cm. Critical work (large prints, 100% pixel peeping) uses a tighter CoC, which shrinks the DOF.
- Equivalent focal length: the 35 mm equivalent only adjusts the field of view. Two sensors with the same field of view, same aperture, and same subject distance produce different DOFs because their physical apertures differ. This calculator uses the true CoC of each sensor.
Practical photography notes
- For portraits with strong background blur, use long focal lengths and large apertures (small f-numbers) close to the subject. Doubling the focal length at the same aperture roughly halves the DOF.
- For landscapes, focus near the hyperfocal distance to maximize sharp depth. Focusing past it does not buy you more sharpness; it only pushes the near limit further away.
- For street zone focus, set the lens to a moderate aperture (typically f/8 to f/11) and pick a subject distance roughly equal to the hyperfocal so the typical 1.5 to 5 metre range is sharp without focus hunting.
- For macro, depth of field collapses to millimetres. Pinch the aperture (f/8 to f/16) and consider focus stacking. Diffraction starts to dominate past about f/11 on small sensors and f/16 on full frame.
- The DOF answers ignore lens optical defects and assume an ideal thin lens. Real lenses are usually sharpest one or two stops down from wide open.
How to use
- Pick a sensor preset. Each preset sets the circle of confusion used by the formulas; pick Custom to type your own in millimetres.
- Type a focal length in millimetres and pick an f-number, or tap one of the lens and aperture preset chips.
- Type the distance to the subject. Switch between metres and feet at any time; the inputs are preserved.
- Read the hyperfocal, near, and far distances, the total depth of field, and the split in front of and behind the subject in the Result panel.
- Tap any worked example to load a realistic camera setup, or copy the full summary with the Copy summary button.
About this tool
Depth of Field Calculator computes the in-focus zone for a real camera setup using the standard thin-lens model. Pick a sensor preset (full frame, APS-C Canon, APS-C Sony/Nikon/Fuji, Micro Four Thirds, 1 inch, 1/2.3 inch smartphone, medium format, or a custom circle of confusion), type a focal length in millimetres, an f-number, and the distance to the subject, and the tool returns the hyperfocal distance, the near focus limit, the far focus limit, the total depth of field, the share in front of and behind the subject, the magnification at that distance, and the approximate sensor blur diameter for a background point at infinity. The formula used is the canonical photography textbook set: hyperfocal H = f squared divided by (N times c), with a small focal length correction that keeps macro distances honest; near limit Dn = u times (H - f) divided by (H + u - 2f); far limit Df = u times (H - f) divided by (H - u); and Df becomes infinity once u meets or exceeds H. Each sensor uses its own circle of confusion (c), which is the largest sensor spot that still reads as a point at a standard 8 x 10 inch print viewed at 25 centimetres. Smaller sensors get smaller CoC values because the print enlargement is larger; the tool ships the Zeiss d/1500 reference values used by most published DOF tables, and a custom option lets you tighten the CoC for large prints or pixel-level critical work. Distances accept either a comma or a period as the decimal separator and switch between metres and feet at any time without losing the input, with feet output displayed as feet and inches up to four digits. A built-in panel of presets covers focal lengths from 14 mm to 600 mm and f-stops from f/0.95 to f/32 so common combinations are one tap away, and a row of worked examples covers a portrait at 85 mm f/1.8, a street zone-focus shot at 35 mm f/8, a landscape past the hyperfocal at 24 mm f/11, an APS-C portrait at 50 mm f/2, a Micro Four Thirds bokeh setup at 25 mm f/1.4, and a 100 mm f/5.6 macro. Useful for photographers planning portraits with strong subject separation, landscape shooters maximising sharp depth with hyperfocal focusing, street photographers setting up zone focus, macro shooters managing the millimetre-thin in-focus slice, videographers picking lens settings for a specific look, and anyone learning how aperture, focal length, and sensor size trade off against depth of field. Everything runs entirely in your browser, so the camera settings you enter never leave your device.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
Aspect Ratio Calculator
Aspect ratio finder, resizer, and fit-to-box calculator with presets.
Open tool
CalculatorDPI Calculator
Solve for DPI, pixels, or print size and see the print quality grade.
Open tool
ImageEXIF Viewer
View every EXIF tag and strip metadata, all in your browser.
Open tool
ImageImage Resizer
Resize images by exact pixels, percent, or fit-to dimensions with locked aspect ratio.
Open tool
ImageImage Color Palette Extractor
Pull a dominant color palette out of any image with HEX, RGB, HSL, and code exports.
Open tool