
Depth of field is the stretch of distance in front of and behind your focus point that still looks sharp. Enter a focal length, aperture, sensor size and focus distance below and the calculator gives the near limit, the far limit, the total depth and the hyperfocal distance for that setup.
Calculate the zone of sharpness
Set the four inputs to match your camera, press the button, and read the four results. The bar under the results shows where the sharp zone sits in front of and behind your subject (the dark line is the subject).
Results
Want everything sharp from the foreground to the horizon? The hyperfocal distance calculator gives the focus distance for that, and hyperfocal distance explains how to use it.
How to read the four results
The numbers describe one idea from four angles. Everything the camera records is slightly blurred except the single distance you focused on. The calculator finds the distances where that blur has grown to the largest size a viewer will still accept as sharp. For how that blur limit is defined and why it differs by format, read circle of confusion; here is how to use the answers. If you want the idea behind them first, depth of field covers what the zone is and the focal plane shows what the camera is focused on.
- Near focus limit. The closest distance that still looks sharp. Anything nearer than this is softening toward the camera. If your subject has a nose, a hand or a flower petal that sticks out toward you, this is the number that tells you whether it makes the cut.
- Far focus limit. The farthest distance that still looks sharp. Beyond it the background softens. The word "Infinity" here means the zone runs all the way to the horizon, which only happens when you focus at or beyond the hyperfocal distance.
- Total depth of field. Far limit minus near limit. This is the number to compare between setups: how thick is the slice of the world that will be sharp? The calculator shows centimeters when the answer is under a meter.
- Hyperfocal distance. The closest focus distance at which the far limit reaches infinity. It depends only on focal length, aperture and sensor, not on where you focused. If your subject distance is greater than this number, the far limit is infinity. The hyperfocal distance calculator is built around it.
Notice that the near and far limits are rarely the same distance either side of your focus point. The zone is not centered on the subject. Close up, it is almost symmetrical; far away, much more of it lies behind the subject than in front. The old rule that one third of the depth is in front and two thirds behind is only a rough picture of a middle range, and it is wrong at both ends. Let the numbers decide.
What moves each number
Change one input at a time and the calculator shows the cause of every change you see in a photo. These examples use a full-frame setup and the calculator's own formula, so you can enter them and check.
Aperture
Take an 85mm lens focused at 2 meters. At f/1.8 the sharp zone runs from 1.97 m to 2.03 m, a total of 5.7 cm. At f/2.8 it is 8.9 cm, at f/4 it is 12.7 cm and at f/8 it is 25.5 cm. The total at f/8 is more than four times the total at f/1.8. At portrait distances, even f/8 leaves you with a zone about as thick as a ruler. Aperture is the control you reach for most often.
Distance to the subject
Keep the same 85mm at f/1.8. Focused at 1 m the zone is 1.4 cm thick. At 2 m it is 5.7 cm. At 4 m it is 23.4 cm. Double the distance and the zone becomes about four times as thick, which is the fastest way to get depth: step back. This is also why a close-up of a flower can only get a sliver of the flower sharp, even at a small aperture (a 100mm lens at f/8 focused at 30 cm gives a zone under 3 mm).
Focal length
At f/1.8 and 2 m, an 85mm lens gives 5.7 cm, a 50mm lens gives 16.9 cm and a 35mm lens gives 34.9 cm. Longer lenses give thinner zones at the same distance. There is a catch: those lenses also frame the subject differently. If you move to keep the subject the same size in the frame, the three zones come out much closer to each other, because the nearer you stand with the wider lens, the more you give back. When someone says "telephotos have shallower depth of field" they are mixing two effects. The first is true at a fixed distance, and the second is what you see when you shoot the same framing. Focal length covers what changes with the lens.

A close subject like this flower is the extreme case: the zone is so thin that the choice of which part to focus on is the whole decision.
Sensor size
The sensor choice changes the blur limit the calculator uses, and a smaller sensor has a smaller limit. With the same lens, aperture and distance, a smaller sensor gives a thinner zone (an 85mm at f/1.8 and 2 m is 5.7 cm on full frame and 2.9 cm for Micro Four Thirds). That surprises people who know that small sensors give "deeper" pictures. They do, but only because you use a shorter lens or stand farther back to get the same framing. Hold the framing and the small sensor's zone is deeper. Sensor size explains the trade, and the crop factor calculator converts the lens.
Wondering why the sensor format changes the answer? Sensor size explains what each format does to depth of field.
Two worked examples to try in the calculator
A portrait: how much of the face is sharp?
Enter 85 mm, f/1.8, full frame, 2 meters. The calculator reports a near limit of 1.97 m, a far limit of 2.03 m and a total of 5.7 cm. If you focus on the nearer eye, the far eye is a few centimeters farther back on a turned head, which is already at the edge of the zone, and the ears are well outside it. At f/4 you get 12.7 cm and both eyes and the nose are inside. The answer to "is f/1.8 too thin?" is in the number. Many portrait shooters stop down one or two stops, or turn the face square to the lens, for this reason. For more on the look, see portrait photography and bokeh.
A landscape: where should the focus go?
Enter 24 mm, f/11, full frame, 1.5 meters. The near limit is 0.81 m and the far limit is 9.72 m: the foreground rock is sharp but the horizon is not. Now change the distance to 3 m. The near limit becomes 1.11 m and the far limit is Infinity, so the horizon is sharp, but a rock 0.9 m away is soft. The hyperfocal distance at these settings is 1.77 m. Enter 1.8 m and you get a near limit of about 0.9 m and a far limit of Infinity. That is the largest zone this lens and aperture can give, and it is why landscape photographers do not focus on the horizon. The calculator treats your focus as exact, so on a real shoot leave a little margin and read hyperfocal distance for placing it. For choosing among these trade-offs by scene, see landscape settings.
See depth of field instead of reading it
The calculator gives the numbers. Here you can see them: pick an aperture and a focal length, tap a person to focus on them, and watch how much of the row stays sharp.
Can you spot the difference in a finished picture? Choose the photo with the shallower depth of field.
A wider aperture (smaller f-number) throws the background out of focus and isolates the subject. A narrower aperture keeps more of the scene sharp front to back.
The simulator lets you set the exposure and see the result. Adjust aperture and focal length against subject distance. The full camera simulator has the other challenges.
Now try it on a landscape: get the nearest rocks and the far horizon both sharp without stopping down past f/16.
Background still not soft enough at your widest aperture? Bokeh covers what shapes the blur beyond the near and far limits.
What the calculator assumes
The calculator uses the standard thin-lens equations. The hyperfocal distance is H = f squared / (N times c) + f, where f is the focal length, N the f-number and c the blur limit for the sensor, all in millimeters. The near limit is s(H - f) / (H + s - 2f) and the far limit is s(H - f) / (H - s), where s is the focus distance. When s is equal to or greater than H, the far limit is infinity. You can reproduce every number above with a pocket calculator.
A few honest limits apply to any depth of field figure:
- "Acceptably sharp" is a viewing standard, not a physical edge. The limit is based on a normal print viewed at a normal distance. A big print, or a screen with every pixel inspected at 100%, shows blur sooner than the numbers suggest. For a critical result, treat the near and far limits as a place where sharpness is already fading, and keep the subject well inside.
- The zone fades; it does not stop. The numbers are the point where the blur crosses a threshold, not the place where the sharp world turns into soft.
- Small apertures cost sharpness. Closing down grows the zone but also adds diffraction, which softens everything. The calculator does not model it, so the f/22 and f/32 entries look better on paper than in a photo.
- Real lenses are not thin lenses. Focus breathing, field curvature and the way a lens is designed shift the real zone a little. Plan with the numbers; confirm with a test frame.
- The list of sensor sizes uses typical blur limits. If your camera's sensor is not on it, pick the nearest one, or use the crop factor to compare.
Wondering what "acceptably sharp" means in these numbers? Circle of confusion explains the blur threshold the calculator is built on.
Common mistakes when using a depth of field calculator
- Measuring distance from the wrong place. The distance is from the focal plane of the camera (many bodies mark the sensor position with a small symbol), not from the front of the lens. At a macro distance that difference is a large part of the answer.
- Using the hyperfocal distance as the focus distance for a near subject. It is the right focus when you want the horizon sharp. If the near limit it gives is still beyond your foreground, use a smaller aperture, a wider lens, or move back.
- Trusting the zone at the edge. Put the important detail well inside the near and far limits, not on one of them.
- Forgetting that the lens changes the framing. Comparing a 35mm and an 85mm at the same distance is not a fair test of depth. Compare at the same framing.
- Stopping down to chase depth. Past a certain point, diffraction takes back more than the extra depth gives. If a small aperture still does not cover the scene, focus stacking is the answer, not a tinier aperture.
- Mistaking depth of field for background blur. They are related but not the same. How soft and how pleasant the background looks depends on the lens as well as on distances.
Is the depth still too shallow at the smallest aperture you trust? Focus stacking covers shooting a stack and merging it in software.
Try this: predict, then shoot
This takes about 10 minutes with any camera that lets you set the aperture (a phone in a pro or portrait mode with aperture control works too).
- Put three objects in a line on a table or on a fence: one at 1 m, one at 2 m, one at 3 m from the camera, each with a readable detail such as printed text.
- Write down the lens, aperture and a focus on the middle object. Use the calculator to predict the near and far limits for your focal length and aperture, and guess which objects will be sharp.
- Shoot at the widest aperture, at a middle aperture and at about f/11. Focus on the middle object each time.
- Zoom in on all three at 100% on a screen. For each frame, say which objects you can read. Compare with the prediction.
To judge the result, the one at 2 m should always be sharp, and the nearest and farthest objects should come into the zone as you close the aperture. If your results disagree with the calculator by a lot, check the distance you measured, and then check whether the blur limit suits the way you view the pictures.
Depth of field calculator questions
Why does the calculator say Infinity for the far limit?
Because you focused at or beyond the hyperfocal distance for those settings. Everything from the near limit out to the horizon then counts as sharp. To bring the near limit closer, use a smaller aperture or a shorter focal length.
Is the depth of field really split one third in front and two thirds behind?
No. The split depends on the distance. Close to the camera it is almost half and half, and the share behind the subject grows as the focus distance approaches the hyperfocal distance. Beyond it, the far side is unlimited. Read the near and far limits from the calculator instead of using a fixed ratio.
Do the numbers change with a different camera?
Yes, through the sensor size and the lens. A smaller sensor has a smaller blur limit, so with the same lens, aperture and distance its zone is thinner. For the same framing, the smaller sensor gives a deeper zone.
Does the calculator work in feet?
Yes. Use the feet button before you enter the subject distance and the results appear in feet and inches. The focal length stays in millimeters either way.
Are the results exact?
They are exact for the formula and the blur limit chosen, and useful as a plan. Real lenses, your viewing size and your own eyes all move the true edge a little, so keep the subject comfortably inside.
Want to check you can predict the zone of sharpness before you shoot? Try the aperture and depth of field quiz.