Learn what stays sharp, what turns soft, and why it changes
Depth of field is the area in a photo that looks sharp enough to the eye. It helps you control whether only your subject stands out, or more of the scene stays in focus.
What is depth of field?
Depth of field, often called DoF, is the distance between the nearest and farthest parts of a scene that look acceptably sharp in an image.
A shallow depth of field means only a small part of the image is sharp. This is common in portraits where the person is in focus but the background looks soft or blurred.
A deep depth of field means more of the scene looks sharp. This is useful in landscapes, architecture, and travel photos where you want both the front and background to stay clear.
Imagine you are taking a portrait with a 50mm lens at f/1.8 from 6 feet away. The person may look sharp, but the wall behind them may already start to blur. If you keep the same lens and distance but change to f/8, much more of the background will stay sharp.
How is it calculated?
The calculator uses focal length, aperture, subject distance, and sensor size to work out four things: near focus, far focus, total depth of field, and hyperfocal distance.
H = (f² / (N × c)) + f
Here:
f = focal length
N = aperture or f-number
c = circle of confusion, based on sensor size
Near = (H × s) / (H + (s - f))
Far = (H × s) / (H - (s - f))
DoF = Far - Near
You do not need to calculate these manually. The simulator below does it for you. Move the sliders, try the presets, and watch how the sharp zone changes.
Try your own values
Enter your own camera settings below to quickly calculate near focus, far focus, total depth of field and hyperfocal distance.
Now you can see how depth of field really works
Depth of field is not random. It changes based on distance, aperture, focal length and sensor size. When any of these change, the sharp zone in the image also changes.
What you should remember
A wide aperture like f1.8 gives shallow depth of field. A smaller aperture like f8 or f11 increases the sharp area.
Longer lenses usually give less depth of field. Shorter lenses usually give more depth of field.
The closer the camera is to the subject, the shallower the depth of field becomes. When the camera moves farther away, more of the scene stays sharp.
These relationships are not guesswork. They come from the optical formula that uses focal length, aperture, subject distance and circle of confusion to calculate near focus, far focus and total depth of field.
Why the simulator helps
Many photographers try to remember rules, but depth of field is easier to understand when you can see it change. When you move the sliders above, the calculator applies the same equations used in real lenses.
The hyperfocal distance formula, near focus formula and far focus formula are used to find the exact range that looks sharp in the image.
This is why two photos taken with the same lens can look completely different when the distance or aperture changes.