Free photography tool
Depth of Field Calculator
Choose your camera, lens, aperture and focus distance to see what will be sharp, where the hyperfocal distance sits, and how much the background will blur.
Frames like 50 mm on full frame (crop factor 1.00).
Focused at 3.00 m, everything from 2.82 m to 3.20 m looks sharp. That is 38.4 cm of depth.
Background clearly blurredBlur is drawn to scale from the lens maths. The figure stands in for your subject; the photo is a Melbourne laneway.
How to use the depth of field calculator
- Pick your sensor. Full frame, APS-C (Canon is slightly smaller than Sony, Nikon and Fujifilm), Micro Four Thirds, 1-inch, a typical phone, medium format, or enter a custom size.
- Enter the real focal lengthprinted on the lens or shown in your camera's photo info. The calculator shows the full-frame equivalent underneath so you can sanity check it.
- Set the aperture and the focus distance, measured from the camera to the subject you focused on.
- Read the sentence at the top of the results. It tells you the near and far limits in plain words. Move the background distance slider to see how soft a wall, a street or a skyline behind your subject would look.
Every setting is saved in the page address, so Copy link to these settings shares the exact calculation with a friend or a student.
What changes depth of field
Aperture. A wider aperture (a smaller f-number like f/1.8) gives shallower depth of field. Closing down to f/8 or f/11 deepens it. This is the setting most people reach for first, and it is one corner of the exposure triangle, so it also changes how much light reaches the sensor.
Focus distance. The closer the subject, the thinner the zone of sharpness. Distance has a stronger effect than most people expect: halving the distance roughly quarters the depth of field.
Focal length. At the same distance, a longer lens gives shallower depth of field and enlarges the background, which makes background blur look stronger. That is why 85mm is a favourite for portraits. There is more on lens choice in the portrait photography tips.
Sensor size. With the same framing and f-number, a smaller sensor gives deeper depth of field. The field of view and crop factor calculator shows the equivalent aperture for each sensor size.
Worked example: a portrait at three metres
A 50mm lens on a full-frame camera, focused on a person 3 m away at f/1.8, is sharp from 2.82 m to 3.20 m. That is about 38 cm of depth: enough for a face and shoulders, with 18 cm in front of the focus point and 20 cm behind it.
Close down to f/8 and the same shot is sharp from 2.34 m to 4.19 m, about 1.85 m deep. Two people standing one behind the other would now both be sharp.
Frame the same portrait on an APS-C camera and you need about 33mm. At f/1.8 that gives 2.74 m to 3.32 m, about 58 cm, noticeably deeper than full frame for the same picture.
Common settings and their depth of field
| Shot | Camera and settings | Sharp from |
|---|---|---|
| Head and shoulders portrait | Full frame, 85mm, f/1.8, 2 m | 1.97 m to 2.03 m (about 6 cm) |
| Street scene | APS-C, 35mm, f/8, 3 m | 2.18 m to 4.83 m |
| Street, wide | Full frame, 35mm, f/8, 3 m | 1.90 m to 7.16 m |
| Landscape at hyperfocal | Full frame, 24mm, f/11, 1.77 m | 0.88 m to infinity |
| Close-up | Full frame, 100mm, f/8, 30 cm | About 3 mm deep |
| Phone main camera | Typical phone, 6.9mm, f/1.8, 1.5 m | 1.01 m to 2.88 m |
For night scenes and long exposures, the night photography settings guide covers why a little extra depth of field helps when you cannot see focus clearly.
Hyperfocal distance in plain English
The hyperfocal distance is the closest point you can focus while still keeping the horizon sharp. Focus there and everything from half that distance to infinity is acceptably sharp. Landscape photographers use it to keep a rock in the foreground and the mountains behind it sharp in the same frame.
Example: a 24mm lens at f/11 on full frame has a hyperfocal distance of about 1.77 m. Focus on something 1.77 m away and the photo is sharp from about 0.88 m to the horizon.
| Lens | Full frame f/8 | f/11 | f/16 | APS-C f/8 | f/11 | f/16 |
|---|---|---|---|---|---|---|
| 16mm | 1.08 m | 0.79 m | 0.55 m | 1.65 m | 1.21 m | 0.83 m |
| 24mm | 2.42 m | 1.77 m | 1.22 m | 3.70 m | 2.70 m | 1.86 m |
| 35mm | 5.14 m | 3.75 m | 2.59 m | 7.86 m | 5.73 m | 3.95 m |
| 50mm | 10.47 m | 7.62 m | 5.26 m | 16.03 m | 11.67 m | 8.04 m |
Golden hour landscapes are where this gets used most. The golden hour photography guide covers timing and light.
How it is calculated
The calculator uses the standard thin-lens depth of field formulas, with distances measured from the sensor:
- Hyperfocal distance:
H = f² / (N × c) + f - Near limit:
s × (H − f) / (H + s − 2f) - Far limit:
s × (H − f) / (H − s), or infinity when the focus distance is at or beyond H
Here f is the focal length, N is the f-number, s is the focus distance and c is the circle of confusion: the largest blur spot that still looks like a point. This calculator uses the sensor diagonal divided by 1442, which is 0.030 mm on full frame, 0.020 mm on Sony, Nikon and Fujifilm APS-C, 0.019 mm on Canon APS-C and 0.015 mm on Micro Four Thirds. A stricter value suits large prints or heavy cropping, and the custom sensor option lets you enter your own.
The background blur preview uses the size of the blur disc on the sensor for an object at the background distance, shown as a share of the frame width. Everything runs in your browser. Nothing is uploaded and there is no sign-up.
Common mistakes
- Entering the full-frame equivalent focal length on a crop camera.Use the real focal length on the lens. A phone labelled "24mm" is really about 7mm.
- Measuring to the wrong point. Focus distance is to the thing you focused on, usually the nearest eye in a portrait.
- Expecting the far limit to be a hard line. Sharpness falls away gradually. The limits mark where softness becomes noticeable at normal viewing sizes.
- Shooting wide open too close. At 85mm f/1.8 and 2 m the zone is only about 6 cm, so a slight lean can move an eye out of focus.
Frequently asked questions
What is depth of field?
Depth of field is the distance between the nearest and the furthest things in a photo that look acceptably sharp. Only one distance is ever in perfect focus. Depth of field is the zone either side of it where the softness is too small to notice at a normal viewing size.
How do I get a blurry background?
Open the aperture to a small f-number such as f/1.8 or f/2.8, move closer to your subject, use a longer focal length, and put more distance between the subject and the background. Each of these narrows the depth of field or increases the size of the background blur, and they add together.
What is hyperfocal distance?
The hyperfocal distance is the closest focus distance that still keeps the horizon acceptably sharp. Focus there and everything from half that distance to infinity looks sharp. On full frame, a 24mm lens at f/11 has a hyperfocal distance of about 1.77 m, so focusing there keeps everything from about 0.88 m to the horizon sharp.
Does sensor size change depth of field?
Yes, once you match the framing. A smaller sensor needs a shorter focal length or a greater distance to frame the same shot, and both give more depth of field. For the same framing and f-number, a 1.5x APS-C sensor gives roughly the depth of field of full frame stopped down by about 1.5 times the f-number.
Is f/8 sharper than f/2.8?
Depth of field is deeper at f/8, so more of the scene is sharp. Many lenses also resolve a little more detail in the middle of the frame when stopped down a couple of stops from wide open. Past about f/11 to f/16, diffraction starts to soften fine detail slightly, so the smallest apertures trade some crispness for depth.
How accurate is this depth of field calculator?
It uses the standard thin-lens formulas with a circle of confusion of the sensor diagonal divided by 1442, which gives 0.030 mm on full frame. Results match published depth of field tables. They are estimates: the sharpness you see depends on print or screen size, viewing distance and how closely you inspect the photo.
Do phones have the same depth of field as cameras?
No. A phone's main camera has a very short real focal length and a small sensor, so its depth of field is much deeper than a camera framing the same shot. Portrait mode creates a blurred background in software. Choose the phone preset and a real focal length of around 7 mm to see the optical result.
What aperture should I use for landscapes?
f/8 to f/11 is a common range for landscapes on full frame and APS-C because it gives deep depth of field before diffraction becomes noticeable. Use the hyperfocal distance in this calculator to decide where to focus so the foreground and the horizon both stay sharp.
Learn it with a camera in your hands
Depth of field is one of the first things the beginner course covers, choosing an aperture for each scene on the streets of Melbourne and seeing the result on the back of the camera straight away.
The beginner photography course in Melbourne is three hours on foot through the CBD, on your own camera, in full manual, with two students at most. $499.