Depth of Field Calculator
Free web tool: Depth of Field Calculator
Near Focus
4.31 m
Far Focus
5.95 m
Total DoF
1.64 m
Hyperfocal
31.00 m
About Depth of Field Calculator
The Depth of Field Calculator is a free, browser-based photographic optics tool that computes four key focus metrics from your camera settings: near focus limit, far focus limit, total depth of field (DoF), and hyperfocal distance. It supports three sensor formats — Full Frame (36×24 mm), APS-C (23.5×15.6 mm), and Micro 4/3 (17.3×13 mm) — and allows any focal length, aperture from f/1.4 to f/22, and subject distance.
Photographers — both professional and enthusiast — use DoF calculations to pre-visualize how much of a scene will be acceptably sharp before triggering the shutter. Landscape photographers set focus to the hyperfocal distance to maximize the area in focus from half that distance to infinity. Portrait photographers choose wide apertures to create shallow depth of field and separate subjects from busy backgrounds. This tool makes those calculations instant.
The calculator uses the standard optical formula: circle of confusion (CoC) is derived from the sensor diagonal divided by 1500; hyperfocal distance H = f² / (N × CoC) + f; near focus = s(H−f) / (H+s−2f); far focus = s(H−f) / (H−s) for s < H, or infinity otherwise. All computations run in your browser with no server and no sign-up required.
Key Features
- Supports Full Frame, APS-C, and Micro 4/3 sensor formats with correct circle-of-confusion values
- Computes near focus limit, far focus limit, total depth of field, and hyperfocal distance simultaneously
- Aperture selector from f/1.4 to f/22 covering the full standard aperture scale
- Shows infinity symbol (∞) correctly when far focus or DoF extends beyond hyperfocal distance
- Results displayed in meters or centimeters automatically depending on scale
- Focal length accepts any custom value (e.g., 35, 50, 85, 135, 200 mm)
- Instant recalculation — all four result cards update as you change any input
- 100% client-side processing — no server, no login, works offline after first load
Frequently Asked Questions
What is depth of field in photography?
Depth of field (DoF) is the range of subject distances that appear acceptably sharp in a photograph. A shallow DoF isolates the subject with blurry foreground and background (commonly used in portrait photography), while a deep DoF keeps everything from near to far in focus (common in landscape photography).
What is hyperfocal distance and why does it matter?
The hyperfocal distance is the closest focus distance at which the far focus limit reaches infinity. When you focus at the hyperfocal distance, everything from half that distance to infinity is acceptably sharp — giving you the maximum depth of field for a given focal length and aperture combination. It is the optimal focus point for landscape and street photography.
What is the circle of confusion (CoC) and how is it calculated?
The circle of confusion is the maximum diameter of a blur spot that is still perceived as a sharp point by the human eye at normal print and viewing sizes. In this calculator, CoC is derived from the sensor diagonal divided by 1500 — a standard approximation. Full Frame CoC ≈ 0.029 mm, APS-C ≈ 0.019 mm, Micro 4/3 ≈ 0.015 mm.
Why does the far focus show infinity (∞)?
When the subject distance equals or exceeds the hyperfocal distance, the far focus extends to optical infinity — meaning everything beyond the near focus limit will appear sharp. This is shown as ∞ in the far focus and DoF result cards. Focus at the hyperfocal distance or beyond to achieve this.
How does sensor size affect depth of field?
Smaller sensors have a shorter hyperfocal distance and a larger depth of field for the same field of view when compared to larger sensors. Micro 4/3 sensors produce more depth of field than APS-C, which produces more than Full Frame, at equivalent apertures and equivalent fields of view. This is because smaller sensors use shorter focal lengths for the same angle of view, and shorter focal lengths yield greater depth of field.
What aperture gives the shallowest depth of field?
The widest aperture (lowest f-number, e.g., f/1.4 or f/2) gives the shallowest depth of field, isolating subjects with a strongly blurred background (bokeh). The narrowest aperture (highest f-number, e.g., f/16 or f/22) gives the deepest depth of field, keeping near and far subjects sharp simultaneously.
How accurate is this DoF calculator?
The calculator uses the standard optical formulas for depth of field based on the thin-lens model and a fixed circle of confusion derived from the sensor diagonal / 1500. This matches the industry-standard approach used in most DoF apps and photography guides. Results are accurate for practical photographic use, though slight variations may exist for extreme macro or telephoto scenarios.
Can I use this calculator for video depth of field planning?
Yes. The same optical principles apply to video. Set the sensor format to match your video camera sensor, enter your lens focal length and taking aperture, and input the planned subject distance. The near and far focus limits will tell you how much tolerance you have while the subject remains sharp during camera or subject movement.