Physics calculators

Depth of Field Calculator

Updated Sep 22, 2026 By Infinity Calculator
Rate Formulas
Calculator Detail Level
Unit System
Calculation Direction
Camera & Sensor
Pick a manufacturer to filter the model list. Optional — you can also choose a sensor format directly below.
Choosing a model automatically sets the sensor format, crop factor and circle of confusion.
Sensor size sets the default circle of confusion (diagonal ÷ 1500) and the crop factor relative to full-frame 35mm.
Video framing
Crops the active sensor area to a 16:9 frame, which shrinks the diagonal, the circle of confusion and the field of view.
 
Lens & Exposure
35mm equivalent: —
Enter the real focal length engraved on the lens, not the 35mm-equivalent number. The equivalent is shown for you underneath.
35mm equivalent: —
Stored values are exact powers of √2 (f/1.4 = 1.41421…). The equivalent aperture shows the full-frame f-number giving the same depth of field.
Changes the granularity of the f-stop list.
Teleconverters multiply both focal length and f-number. Anamorphic adapters squeeze the horizontal field of view but leave the f-number unchanged.
 
Distances
= —
Distance from the sensor/film plane to the subject you focused on. Measured from the camera, not from the front of the lens.
= —
Locked: the wall stays put while you step toward the subject. Scaled: the background moves with you, keeping the same subject-to-background ratio.
A secondary conversion is shown in parentheses for every distance.
Used only in Inverse mode: the calculator solves for the f-number that produces this near-to-far span at your chosen focal length and distance.
Circle of Confusion (CoC)
The CoC is the largest blur circle still seen as a point. Smaller CoC = stricter sharpness standard = shallower calculated depth of field.
Allowed range 0.001 – 0.300 mm.
CoC = sensor diagonal ÷ N. 1500 is the common standard; 1730 is stricter.
CoC = 2 × pixel pitch (two pixels per blur circle).
Width × height of the final print.
Acceptable print blur = 1 dot = 25.4 ÷ DPI mm.
Assumes the eye resolves a 2.75 arc-minute blur.
 
Framing Presets & Field of View Lock
One-click framing presets (set distance + focal length)
 
Diffraction Analysis
Airy disk = 2.44 × λ × N with λ = 0.00055 mm (green light).

Depth of Field Results

Near Limit of Acceptable Focus 
Far Limit of Acceptable Focus 
Total Depth of Field 
DoF In Front of Subject 
DoF Behind Subject 
Hyperfocal Distance 
Hyperfocal Near Limit (H ÷ 2) 
Circle of Confusion Used 
Active Focal Length 
Active Aperture 
Background Blur Diameter 
Field of View (H / Diagonal) 
Front / Rear Split — depth of field is not symmetrical
In front: Behind:
Diffraction & Optimal Aperture
Parameterf-numberBlur (mm)Resolution (lp/mm)Equivalent Mpix
 
Diagram 1 — Subject Focus Zone

Diagram 2 — Hyperfocal Focus Zone

Step-by-Step Solution
Depth of Field vs. Aperture
 

Introduction

This depth of field calculator shows you how much of your photo will look sharp. You pick your camera, lens, f-stop, and focus distance. It then tells you the near limit, the far limit, and the total depth of field.

Depth of field is the zone in front of and behind your subject that still looks in focus. A wide aperture like f/1.8 makes that zone thin, so the background goes soft. A small aperture like f/16 makes it deep, so more of the scene stays sharp. Your sensor size, focal length, and how close you stand change it too.

The tool also gives you the hyperfocal distance, which is the best spot to focus when you want everything from halfway out to the horizon to be sharp. That is handy for landscapes, real estate, and street photos.

The calculator draws a diagram of your sharp zone, shows the math step by step, and plots a chart of depth of field at every f-stop. In Advanced mode you can set your own circle of confusion, add a teleconverter, check background blur, and see when diffraction starts to soften your image. You can also work backward and ask which f-stop gives you the depth of field you want.

How to use our Depth of Field Calculator

Tell the calculator about your camera, lens, aperture and focus distance. It gives you the near and far limits of sharp focus, the total depth of field, the hyperfocal distance, background blur, field of view and diffraction limits, plus diagrams and step-by-step math.

Calculator Detail Level: Pick Basic for the main inputs only. Pick Advanced to unlock background blur, circle of confusion options, framing tools and diffraction.

Unit System: Choose Metric or Imperial. This switches your distance boxes to meters or feet.

Calculation Direction: Use Standard to find depth of field from your f-stop. Use Inverse to find the f-stop that gives the depth of field you want.

Camera Make: Pick your camera brand. This filters the model list. You can skip it and pick a sensor instead.

Camera Model: Pick your camera. The sensor size, crop factor and circle of confusion are set for you.

Sensor / Film Format: Pick your sensor or film size if your camera is not listed. Bigger sensors give shallower depth of field at the same framing.

Crop sensor to 16:9 (video): Tick this if you shoot video in a 16:9 frame. It trims the sensor area and changes the field of view.

Focal Length: Type the real focal length printed on your lens in mm, not the 35mm equivalent. Longer lenses give less depth of field.

Aperture (f-number): Pick the f-stop you are shooting at. Low numbers like f/1.4 blur the background more.

Aperture Steps: Choose whole, half or third stops to match the clicks on your lens or camera dial.

Lens Converter: Pick a teleconverter, focal reducer or anamorphic adapter if you use one. Or choose Custom and type your own multiplier.

Focus / Subject Distance: Type how far your subject is from the camera, then pick the unit. This is measured from the sensor, not the front of the lens.

Background Distance: Type how far the background is from the camera. The tool uses this to work out the blur circle size behind your subject.

Lock background distance: Tick this to keep the background in the same spot when you change your subject distance.

Scale background with subject distance: Tick this to move the background with you and keep the same subject-to-background ratio.

Display Results In: Pick the unit for all your results. A second unit is shown in brackets.

Desired Total Depth of Field: Only used in Inverse mode. Type the sharp zone size you want and the tool finds the f-stop you need.

CoC Method: Choose how strict the sharpness standard is. Auto uses your sensor preset; you can also enter a value in mm, a diagonal divisor, pixel or megapixel counts, print size and DPI, or display size and viewing distance.

Framing Presets: Click a preset like Portrait or Full body to set a matching focal length and distance in one tap.

Lock field of view: Tick this to keep your framing the same. Then choose whether the distance or the focal length adjusts when you change the other.

Diffraction Analysis: Tick this to see the Airy disk size, the sharpest aperture and the smallest f-stop you can use before blur creeps in.

Calculate, Reset and Print Summary: Results update as you type, but click Calculate to refresh. Reset returns every field to the default. Print Summary lays the results out as a table you can print.

What Is Depth of Field?

Depth of field (DoF) is the zone in your photo that looks sharp. It starts at the near limit, runs through the point you focused on, and ends at the far limit. Things closer than the near limit or farther than the far limit look blurry.

A shallow depth of field makes a small sharp zone. That is great for portraits, where you want a soft, blurry background. A deep depth of field makes a big sharp zone. That is great for landscapes, where you want the rocks up front and the hills far away to both look clear.

What Changes Depth of Field

  • Aperture (f-number). A big f-number like f/16 means a small hole in the lens, so more of the scene is sharp. A small f-number like f/1.4 means a wide hole and a thin sharp zone.
  • Focal length. Long lenses (200mm) give a thin sharp zone. Wide lenses (16mm) give a deep one.
  • Focus distance. The closer you stand to your subject, the thinner the sharp zone gets. Macro work has a razor-thin zone, often just a few millimeters.
  • Sensor or film size. A big sensor, like full frame or medium format, gives a shallower look than a small phone sensor when the framing matches.

Circle of Confusion

Only one plane in a photo is truly sharp. Everything else is a tiny blur dot. The circle of confusion (CoC) is the biggest blur dot your eye still reads as a sharp point. If the dot is smaller than the CoC, the spot counts as "in focus."

The usual rule is the sensor diagonal divided by 1500. A full-frame camera lands near 0.029mm. You can also set the CoC from your pixel size, your print size and DPI, or how far away people will stand when they view the picture. A smaller CoC is a stricter test, so the sharp zone gets smaller.

Hyperfocal Distance

The hyperfocal distance is a special focus point. Focus there and everything from half that distance out to infinity looks sharp. It is the trick landscape shooters use to get the most depth from one shot. The math is:

H = (f × f) ÷ (N × c) + f

Here f is focal length in mm, N is the f-number, and c is the circle of confusion in mm.

The Sharp Zone Is Not Even

Depth of field does not split evenly around your subject. More of it falls behind the subject than in front. At normal distances the split is close to one third in front and two thirds behind. Up close it moves toward 50/50, and far away almost all of it sits behind the subject. So when you focus for a group of people, aim at the front row, not the middle.

Background Blur and Bokeh

Blur strength depends on how far the background sits behind your subject, plus your focal length and aperture. A longer lens, a wider aperture, and a far-away background all make blur bigger. Blur is measured as the size of the blur disc in millimeters on the sensor.

Diffraction: Why f/22 Is Not Always Best

Closing the aperture adds depth of field, but it also bends light at the edges of the blades. This is diffraction, and it spreads each point of light into a small ring called an Airy disk. Its size is about 2.44 × λ × N, using green light at 0.00055mm.

Past a point, diffraction blur costs you more sharpness than the extra depth of field gains. Small sensors hit that wall sooner than big ones. Most cameras do their best work a few stops down from wide open, often around f/5.6 to f/8 on full frame.

Crop Factor and Equivalent Settings

Crop factor compares a sensor to full-frame 35mm. Multiply your focal length by the crop factor to get the 35mm equivalent view. Multiply the f-number by the same crop factor to get the aperture that would give the same depth of field on full frame. A 25mm f/1.8 lens on Micro Four Thirds (2× crop) frames and blurs like a 50mm f/3.6 lens on full frame.

Quick Tips

  • Want a blurry background? Open the aperture, use a longer lens, get closer, and move your subject away from the wall.
  • Want everything sharp? Close the aperture, use a wider lens, back up, and focus at the hyperfocal distance.
  • Measure focus distance from the sensor plane, not the front of the lens.
  • For macro shots, the plain formula gets loose. Use the close-focus correction, since magnification makes your real aperture darker and the sharp zone thinner.

Formulas used

Hyperfocal distance
H = \frac{f^2}{N \cdot c} + f
Near limit of acceptable focus
D_{near} = \frac{d\,(H - f)}{H + d - 2f}
Far limit of acceptable focus
D_{far} = \frac{d\,(H - f)}{H - d}, \quad D_{far} = \infty \ \text{ if } d \ge H
Total depth of field and front / rear split
DoF = D_{far} - D_{near}, \quad DoF_{front} = d - D_{near}, \quad DoF_{rear} = D_{far} - d
Circle of confusion from sensor diagonal
c = \frac{\sqrt{w^2 + h^2}}{N_{div}}, \quad N_{div} = 1500 \ \text{(default)}
Background blur disc diameter
b = \frac{f^2}{N} \cdot \frac{\left| D_{bg} - d \right|}{D_{bg}\,(d - f)}
Diffraction: Airy disk diameter and maximum usable f-number
\varnothing_{Airy} = 2.44\,\lambda N, \quad \lambda = 0.00055\ \text{mm}, \quad N_{max} = \frac{c}{2.44\,\lambda}
Angle of view (horizontal / vertical / diagonal)
\theta = 2\arctan\!\left(\frac{s}{2f}\right), \quad s \in \{w,\ h,\ \sqrt{w^2+h^2}\}

Frequently asked questions

Does ISO or shutter speed affect depth of field?

No. Only aperture, focal length, focus distance, and sensor size change the sharp zone. ISO and shutter speed only change brightness and motion blur.

They matter in an indirect way. If you raise your ISO or slow your shutter, you can close the aperture down and get a deeper sharp zone at the same brightness.

What aperture is best for portraits?

For one person, f/1.8 to f/2.8 gives a soft background while keeping the face sharp.

  • f/1.4 to f/2 (head and shoulders, very soft background)
  • f/2.8 to f/4 (half body, safer focus)
  • f/4 to f/5.6 (full body, keeps hands and feet sharp)

Shorter lenses need wider apertures to blur the same amount. A 50mm at f/2 blurs much less than an 85mm at f/2 from the same framing.

What f-stop should I use for a group photo?

Use f/5.6 to f/8 for most groups. That is deep enough to keep two or three rows sharp without hurting your shutter speed too much.

Focus about one third into the group, not on the back row. More of the sharp zone falls behind your focus point than in front of it. For big groups, line people up shoulder to shoulder so they sit on the same plane.

What is the difference between depth of field and depth of focus?

Depth of field is in front of the camera. It is the zone in the scene that looks sharp.

Depth of focus is inside the camera. It is how far the sensor or film can sit off the perfect spot and still look sharp. It is tiny, about 2 × N × c, so roughly 0.23mm at f/4 on full frame.

Depth of focus matters to camera repair and lens mounts. Depth of field matters to your picture.

Why is everything in focus in my phone photos?

Phone cameras use a very small sensor and a very short real focal length, often 5 to 7mm. Short lenses have a huge sharp zone.

A 6mm lens at f/1.8 focused at 2 meters keeps almost everything from about 1 meter to infinity sharp. The f/1.8 number sounds fast, but on that tiny sensor it acts like about f/11 on full frame.

That is why phones fake background blur with software portrait modes.

How far should my subject stand from the background for a blurry background?

The farther back the background is, the blurrier it gets. A good rule is to put the background at least three times your subject distance.

If your subject is 2 meters away, aim for a background 6 meters or more behind the camera line. Moving a subject from 1 meter in front of a wall to 5 meters in front of it blurs the wall far more than opening your aperture one stop.

Does zooming in reduce depth of field?

Yes, if you stay in the same spot. Doubling the focal length from 50mm to 100mm cuts the sharp zone to roughly a quarter of its size at the same aperture and distance.

If you zoom in and then walk back so your subject fills the frame the same way, the sharp zone stays close to the same depth. The background just looks bigger and softer with the longer lens.

What is the formula for the near and far limits of depth of field?

First find the hyperfocal distance H = (f × f) ÷ (N × c) + f. Then:

  • Near limit: Dn = s(H − f) ÷ (H + s − 2f)
  • Far limit: Df = s(H − f) ÷ (H − s)

Here s is focus distance, f is focal length, N is the f-number and c is the circle of confusion. Keep every length in millimeters. If s is equal to or bigger than H, the far limit is infinity.

What aperture should I use for macro photography?

Most macro shooters use f/8 to f/16. At 1:1 magnification the sharp zone at f/11 is only about 1 to 2mm deep, so you need the small aperture.

Watch two things. Up close your real aperture gets darker: at 1:1 an f/8 setting acts like f/16, costing you two stops of light. And past about f/16 on a crop sensor, diffraction starts to soften the whole frame.

What is focus stacking and when do I need it?

Focus stacking means taking several photos of the same scene, each focused a little farther back, then blending the sharp parts in software.

You need it when no single aperture can cover the whole subject. That is common in macro work, product photos, and landscapes with something very close in the frame. It lets you shoot at the lens's sharpest aperture instead of stopping down to f/22 and losing detail to diffraction.

Does a teleconverter change depth of field?

Yes. A 2× teleconverter doubles the focal length and doubles the f-number. A 100mm f/4 becomes a 200mm f/8.

From the same spot, that makes the sharp zone about half as deep, because the longer lens matters more than the slower aperture. You also lose two stops of light with a 2×, or one stop with a 1.4×.

Why is only one eye sharp in my portrait?

Your sharp zone is thinner than the person's head. An 85mm lens at f/1.4 focused at 1.5 meters gives a sharp zone of only about 2.4cm, or one inch. A head turned even slightly puts the far eye outside that zone.

Fix it by closing down to f/2.8 or f/4, backing up a bit, or turning the face more square to the camera. Always focus on the eye nearest the lens.