Depth of Field Explained: How to Calculate It (With Examples)

What depth of field is, the four things that control it, and how to get exact near, far and total DoF for any camera and lens — with worked examples on iPhone.

Depth of fieldFundamentals
DoF Mate showing a 0.57 metre depth of field with near and far limits for a Sony FX3 and 50mm lens

Depth of field is the single most important thing standing between a sharp shot and a soft one — and it’s the thing most photographers eyeball instead of measure. This guide breaks down exactly what depth of field is, the four variables that control it, and how to get the precise numbers for any setup instead of guessing.

What is depth of field?

Depth of field (DoF) is the range of distance in your scene that looks acceptably sharp. Everything between the near limit and the far limit falls inside it; everything in front of or behind that zone falls off into blur.

Two numbers define it:

  • Near limit — the closest point that’s still sharp.
  • Far limit — the farthest point that’s still sharp (this can reach infinity).

The distance between them is your total depth of field. A portrait might have a depth of field of a few centimetres; a landscape at f/16 might be sharp from two metres to infinity.

The four things that control depth of field

Every depth-of-field calculation comes down to four inputs:

VariableMake DoF shallowerMake DoF deeper
Aperture (f-stop)Open up (f/1.4)Stop down (f/11)
Focal lengthLonger (85mm)Wider (24mm)
Focus distanceMove closerMove back
Sensor / formatLarger sensorSmaller sensor

The first three are choices you make on the lens. The fourth is fixed by your camera — and it’s the one people forget. A 50mm f/2.8 shot has a very different depth of field on a full-frame Sony FX3 than it does on a Micro Four Thirds body, because the circle of confusion (the largest blur spot that still reads as “sharp”) scales with sensor size.

DoF Mate's haptic focal length, aperture and focus-distance gauges

A worked example

Take a real setup: a Sony FX3 (full-frame), a 50mm lens at f/2.8, focused at 3 metres.

Run the numbers and you get:

  • Near limit: 2.74 m
  • Far limit: 3.31 m
  • Total depth of field: 0.57 m
  • Hyperfocal distance: 31.3 m

So only about a half-metre slice around your subject is sharp. Open the lens to f/1.4 and that slice shrinks to centimetres — which is why fast primes are so unforgiving when your subject moves. Stop down to f/8 and it grows to roughly a metre and a half.

The point isn’t to memorise these numbers. It’s that they’re knowable before you shoot, not after.

How the math works (briefly)

If you like the underlying optics, depth of field is built on the hyperfocal distance — the focus distance at which everything from half that distance to infinity is sharp:

H = (focal² / (f-number × circle of confusion)) + focal

From H and your focus distance s, the near and far limits follow directly. When the far limit calculation crosses the hyperfocal distance, the far limit becomes infinity and your depth of field is effectively unlimited. Our hyperfocal guide covers this in depth.

You don’t need to do this by hand. The reason a dedicated tool matters is the circle of confusion: getting it right for your sensor (and your delivery resolution) is what separates a real answer from a rough one.

Why “acceptably sharp” depends on delivery

Here’s the subtlety pros care about: sharpness is relative to how the image will be viewed. A circle of confusion that looks crisp on a 4K timeline may look soft blown up for an 8K finish or a cinema screen. Good calculators let you pick the standard — and the depth of field number changes accordingly.

Stop guessing your focus

You can absolutely shoot by feel. But on a paid job, with a moving subject and a fast lens, “I think it’s sharp” is a gamble. Knowing your near limit is 2.74 m means you know exactly how much room your subject has to move before they go soft.

That’s the whole idea behind DoF Mate — it runs every calculation above live, on-device, for 800+ camera bodies, so the numbers are there before the camera rolls.