Depth of Field Calculator

Hyperfocal distance · Near & far limits · Total DOF — free, instant, private

Circle of confusion: 0.030 mm
mm
m
Hyperfocal Distance
—
Total Depth of Field
—
Near Limit
—
Far Limit
—
Sharpness Range
Camera
Near
Focus
Far
Out of focus Acceptably sharp Out of focus
In front of focus point —
Beyond focus point —

What Is Depth of Field?

Depth of field (DOF) is the distance range within which objects in a photograph look acceptably sharp. It is controlled by three factors: aperture, focal length, and focus distance. A wide aperture such as f/1.8 produces a shallow depth of field with creamy background bokeh — ideal for portraits — while a narrow aperture like f/11 keeps both foreground and background sharp for landscape and architecture work. Your camera sensor size matters too: smaller sensors (higher crop factor) deliver deeper depth of field at the same framing.

How to Use This Depth of Field Calculator

Select your camera sensor (or enter a custom crop factor), then set your focal length, aperture, and focus distance. Results update instantly — no button needed. The calculator shows the near limit and far limit of sharpness, the total depth of field, and a visual sharpness range so you can see exactly how much of your scene will be in focus. Switch between meters and feet at any time. Common focal lengths (24mm, 35mm, 50mm, 85mm) are one tap away.

Understanding Hyperfocal Distance

The hyperfocal distance is the focus distance at which everything from half that distance to infinity appears sharp. Focusing at the hyperfocal point maximizes depth of field — the far limit reaches infinity while the near limit drops to half the hyperfocal distance. This is the classic landscape photography technique: set a narrow aperture, focus at hyperfocal, and get foreground flowers and distant mountains sharp in one frame. When your focus distance is at or beyond hyperfocal, this calculator shows the far limit as ∞.

How the Depth of Field Formula Works

This calculator uses the standard thin-lens depth of field equations found in optical engineering references. With N = aperture (f-number), c = circle of confusion, f = focal length and s = focus distance, the hyperfocal distance is:

H = f² / (N × c) + f

The near and far limits of acceptable sharpness are:

near = H × s / (H + (s − f))
far  = H × s / (H − (s − f))

Total depth of field is simply DOF = far − near. When the focus distance reaches or passes the hyperfocal distance, the far limit becomes infinity (∞), which is why the calculator displays ∞ for landscape shots focused near or beyond hyperfocal.

The circle of confusion sets how large a blur spot may be while still looking like a sharp point. This tool uses the classic full-frame reference of 0.030 mm and divides it by the crop factor — 0.020 mm for APS-C (1.5×), 0.015 mm for Micro Four Thirds (2×) and 0.038 mm for medium format (0.79×). You can also enter any custom crop factor, for example for a compact camera or smartphone.

Depth of Field Tips for Photographers

Portraits: at f/1.4–f/2.8 the depth of field at eye-level focusing distance can be only a few centimetres deep. Focus on the nearest eye — if it is soft, nothing else in the frame matters.

Landscapes: f/8–f/11 combined with hyperfocal focusing usually gives all the front-to-back sharpness you need. Stopping down to f/22 rarely improves anything because diffraction softens the whole image.

Groups and events: focus roughly one-third of the way into the row of people. Depth of field always extends farther behind the focus plane than in front of it.

Macro work: at 1:1 magnification even f/16 leaves a slice of focus measured in millimetres. Focus stacking — blending multiple frames at slightly different distances — is the standard solution.

Frequently Asked Questions

What is depth of field in photography?
Depth of field (DOF) is the range of distances, in front of and behind your focus point, that appears acceptably sharp in the final image. A shallow depth of field blurs the background and isolates the subject, while a deep depth of field keeps near and far elements sharp at the same time. This calculator shows the exact near limit, far limit and total depth of field for your camera and settings.
Which camera settings affect depth of field the most?
Aperture, focal length and focus distance are the three big levers. A wider aperture (smaller f-number), a longer lens or focusing closer all make the depth of field shallower; stopping down, zooming wider or focusing farther makes it deeper. Sensor size also matters when you match framing between cameras, because a smaller sensor needs a shorter focal length or greater camera distance, both of which increase depth of field.
Does an APS-C or Micro Four Thirds camera give more depth of field?
At the same f-number, focal length and focus distance the optical depth of field is identical — the crop sensor only records a narrower angle of view. In practice, to get the same framing as full frame you use a shorter lens or step back, and either change increases depth of field. Choosing your sensor in this calculator applies the correct smaller circle of confusion (0.020 mm for 1.5× APS-C, 0.015 mm for Micro Four Thirds), so the predicted limits match the files you actually capture.
What is hyperfocal distance and how do I use it?
The hyperfocal distance is the focus distance at which everything from half that distance to infinity is acceptably sharp. It is the classic landscape and street-photography technique: stop down, focus at the hyperfocal distance (reported directly in the results), and you can shoot without refocusing. Your far limit reaches infinity while your near limit sits at half the hyperfocal distance, maximising the sharp zone in a single frame.
Why is my background not as blurry as the calculator suggests?
Depth of field numbers describe formal optical limits; perceived background blur (bokeh) also depends on subject-to-background distance. Even with a shallow calculated DOF, a wall directly behind your subject stays sharp because it is nearly at the focus plane. Move your subject farther from the background, use a longer focal length and get closer to the subject for stronger separation.
How accurate is this online depth of field calculator?
It runs the standard thin-lens equations with the same circle of confusion values used by lens depth-of-field markings and photographic reference tables, so results match those sources closely. Real perceived sharpness also varies with final image size, viewing distance, lens aberrations and diffraction, so treat the near and far limits as a precise guide rather than a hard wall between sharp and blurred.

More Free Photography Tools

More browser-based calculators for photographers — every one is free, private and works without an account.