Hyperfocal math is old-school
The H = f²/(N·c) + f equation dates back to early 20th-century film photography and still underpins modern focus tables.
Preset circles of confusion are format-based approximations. Use custom sensor and CoC when matching a camera, print size, or stricter viewing assumption.
Tip: Try sliding focus distance slightly—if your DoF shrinks faster than you expect, you may be near the focal plane and need to stop down.
Compare the main setup with a second lens and distance using the same format, units, and circle of confusion.
| Setup | Lens | Focus | Near | Far | Total DoF | Front / Behind | Hyperfocal |
|---|
v1.1 (May 20, 2026)
Depth of field is the zone in a photo or video that appears acceptably sharp. This calculator helps you predict how much of your scene will be in focus based on your camera format, lens, aperture, and focus distance. It’s a practical tool for photographers and videographers who want to plan the look of a shot, whether that’s a creamy background blur for a portrait or wide‑open sharpness for a landscape.
The concept is simple: depth of field gets shallower when you use a longer focal length, a wider aperture (smaller f‑number), or focus closer to your subject. It gets deeper when you stop down the lens, use a shorter focal length, or focus farther away. Sensor size also matters because it changes the circle of confusion, which is the tolerance for what counts as “sharp enough.” This calculator uses commonly accepted circle‑of‑confusion values so you can compare formats like full‑frame, APS‑C, and Micro Four Thirds.
Real‑world examples help clarify how to use the results. If you’re shooting a head‑and‑shoulders portrait at 85 mm and f/1.8, you’ll see a very shallow depth of field, which is great for isolating a subject but requires precise focus on the eyes. If you’re photographing a cityscape at 24 mm and f/8, the depth of field will be much deeper, and the hyperfocal distance can guide you to keep both foreground and background sharp.
For video, this is especially useful when pulling focus or when you need consistent sharpness across a moving subject. A small shift in focus distance can dramatically change the depth of field at wide apertures, so the calculator helps you decide when to stop down or adjust framing. It is also handy for product photography, where you may need the entire object sharp without losing too much background separation.
Keep in mind that stopping down too far can introduce diffraction softness, and zoom lenses can breathe at close focus, slightly changing framing. Use the results as a guide, then confirm with a quick test shot if critical focus matters. The calculator runs entirely in your browser, so you can use it on set without needing an internet connection.
Depth of field is the range in front of and behind the exact focus distance that appears acceptably sharp in a photo or video frame. Only one plane is truly in perfect focus. Everything closer or farther away is slightly blurred, but the blur may be small enough that it still looks sharp at the final viewing size. That acceptable range is the depth of field.
Depth of field is both a technical calculation and a creative choice. A portrait photographer may want a shallow sharp zone so the eyes stand out against a soft background. A product photographer may need the entire object to read clearly. A landscape photographer often wants foreground detail and the far horizon to both look sharp. The same lens can serve all three goals, but the aperture, focus distance, framing, and acceptable-sharpness assumptions change the result.
Aperture is usually the fastest way to change depth of field. A wide aperture, such as f/1.4 or f/2, creates a shallow sharp zone and stronger background blur. A smaller aperture, such as f/8 or f/11, creates deeper depth of field because light rays form narrower cones at the sensor. In the calculator, increase the f-number and the near and far limits move farther apart.
The trade-off is exposure and fine detail. Smaller apertures need more light, higher ISO, or slower shutter speeds. Very small apertures can also soften detail through diffraction, especially on high-resolution cameras and smaller sensors. For many cameras, f/5.6 to f/11 is a practical range for general sharpness, while portraits and low-light scenes often use wider apertures for subject separation or exposure.
Longer focal lengths usually produce shallower depth of field when subject framing is similar. An 85mm portrait at f/1.8 will normally have less depth of field than a 35mm portrait at f/1.8 if you frame the subject similarly, because the longer lens either magnifies the subject more or forces a different shooting distance. This is one reason telephoto portraits can isolate a subject so strongly.
Focal length comparisons can be confusing because the result depends on what stays constant. If focal length, aperture, focus distance, and circle of confusion all stay fixed, the formula gives a direct result. If you change focal length but move the camera to keep the subject the same size, magnification and perspective change too. Use comparison mode to test the actual setup you intend to shoot instead of relying on a single rule of thumb.
Focus distance has a dramatic effect. The closer you focus, the thinner the sharp zone becomes. This is why close-up product shots, food photography, and macro images often have very little depth of field even at f/8 or f/11. Move the focus distance from 3m to 1m with the same lens and aperture, and the calculator will show the near and far limits tightening quickly.
Depth of field is not evenly distributed around the focus distance. At close distances it can be almost balanced in front of and behind the subject, but as focus distance increases, more of the acceptable sharp zone falls behind the focus point. That is why the in-front and behind-subject split is useful. It tells you whether you have enough tolerance for a subject leaning forward, walking toward camera, or moving away.
Circle of confusion, often shortened to CoC, is the maximum blur circle that still appears like a point in the final image. It is not only a sensor property. It is an assumption about acceptable sharpness based on format size, enlargement, viewing distance, display size, and eyesight. A smaller CoC is stricter and produces shallower calculated depth of field. A larger CoC is more forgiving and produces deeper calculated depth of field.
Preset calculators usually assign common CoC values by camera format. That is convenient, but it is not the only valid approach. A billboard viewed from far away can tolerate more blur than a large fine-art print viewed up close. A 4K video watched on a phone has different demands from a high-resolution still image cropped heavily. Use the custom CoC field when you need a conservative result, when matching a production standard, or when another focus table uses a known CoC.
Hyperfocal distance is the closest focus distance that keeps infinity acceptably sharp for a given focal length, aperture, and circle of confusion. When you focus at the hyperfocal distance, the far limit reaches infinity and the near limit is roughly half the hyperfocal distance, with a small correction for focal length. This is useful when you want the deepest possible range of acceptable sharpness without focusing directly at infinity.
Hyperfocal focusing is common in landscape, street, documentary, and action work. For example, a wide lens stopped down to f/8 may let you focus a few meters away and keep everything from the foreground to the horizon acceptably sharp. The one-click hyperfocal button sets the calculator focus distance to that value so you can immediately see the resulting near limit and compare it with the foreground objects in your scene.
This calculator uses the standard thin-lens depth of field formulas. Let f be focal length in millimeters, N be aperture f-number, c be circle of confusion in millimeters, and s be focus distance in millimeters.
These formulas are excellent for planning, but they are still based on assumptions. Real lenses can focus breathe, field curvature can make edges focus differently from the center, and internal focusing designs may change effective focal length at close distances. Treat the output as a strong planning estimate, then test critical shots when the margin is small.
A 35mm lens at f/1.8 focused at 2m on full frame gives a modest sharp zone around a person or object. Stop down to f/4 and that zone expands noticeably while the background still separates. Change to 50mm at f/2.8 and focus at 3m, and the subject may have similar framing but a different front/back split. These are the trade-offs comparison mode is designed to make visible.
| Use case | Settings | What to expect | Try it |
|---|---|---|---|
| Portrait | 85mm, f/1.8, 2m, full-frame | Very shallow DoF; focus carefully on the nearer eye and leave room for subject movement. | |
| Landscape | 24mm, f/8, 5m, full-frame | Deep DoF; check the hyperfocal distance and verify the nearest foreground detail is inside the near limit. | |
| Product photo | 50mm, f/5.6, 1m, APS-C | Moderate DoF; small products may need f/8, a flatter angle, or focus stacking. | |
| Macro | 100mm, f/8, 0.3m, full-frame | Extremely shallow DoF; expect millimeter-level tolerance and consider a focus stack. |
For video, compare the numbers against the movement in the shot. If an actor walks 40cm toward camera during a line, the in-front distance needs to cover that move or the focus puller needs a planned adjustment. For stills, compare the total depth of field with the physical depth of the subject rather than only the point you focused on.
For a tight headshot, depth of field can be very thin. An 85mm lens at f/1.8 focused near 1.5m may leave the nearer eye sharp while the far eye, ears, or hair soften. That can be attractive, but it leaves little room for subject movement or focus error. Stopping down to f/2.8 or f/4 often gives a more reliable portrait while still keeping the background soft, especially if the background is far behind the subject.
Group portraits need much more depth of field. If people stand in two rows, focus on a face in the front row and check whether the behind-subject distance reaches the back row. If it does not, stop down, move back, use a shorter focal length, or arrange the group on a flatter plane.
Landscape depth of field is often about foreground placement. If the nearest rock, flower, or path detail is 1m from the camera, focusing at infinity may waste too much depth of field behind the horizon. Hyperfocal focusing lets you pull the focus point closer while keeping infinity acceptably sharp. Use the hyperfocal near limit to check whether that foreground object falls inside the sharp zone.
Wide lenses make this easier. A 24mm lens at f/8 can cover a broad range, while a 70mm landscape detail may need a more careful focus choice. Do not stop down automatically to the smallest aperture; diffraction can reduce fine detail. If the foreground is extremely close and the background matters, focus stacking may be a better answer than forcing everything into one exposure.
Macro photography is the hard case for depth of field. At high magnification, the sharp zone can be only a few millimeters or less. Stopping down helps, but the exposure cost is high and diffraction can soften the whole image. Small subject movements, camera vibration, and focus breathing become more visible than they are in normal-distance photography.
For insects, jewelry, coins, electronics, and small products, use the calculator as a warning system rather than a guarantee. If the total depth of field is much smaller than the physical depth of the subject, you may need to align the subject flatter to the camera, add light so you can stop down, shoot a focus stack, or accept a selective-focus look.
Depth of field is the distance range that appears acceptably sharp in front of and behind the exact focus point. It depends on aperture, focal length, focus distance, sensor format assumptions, and circle of confusion.
Hyperfocal distance is the closest distance you can focus while keeping infinity acceptably sharp. When focused at hyperfocal distance, the near limit is roughly halfway to the camera.
Circle of confusion is the blur size that still looks like a point in the final image. Smaller CoC values are stricter and produce shallower calculated depth of field.
Use a wider aperture, longer focal length, closer focus distance, and more separation between subject and background. Keep in mind that subject movement and focus accuracy become more critical.
Stop down to a higher f-number, use a shorter focal length, move farther from the subject, or focus near the hyperfocal distance when the background needs to stay sharp.
Sensor size affects depth of field through framing and CoC assumptions. At identical focal length, aperture, focus distance, and CoC, the optical formula is fixed; in practice, larger sensors often use longer lenses or closer positions for the same framing.
No. Shutter speed does not directly affect depth of field. It can indirectly matter if a slower or faster shutter forces you to change aperture, ISO, lighting, or stabilization.
There is no single depth of field for a 50mm lens. A 50mm lens at f/1.8 focused at 1m has a much thinner sharp zone than the same lens at f/8 focused at 5m.
Differences can come from focus error, lens breathing, field curvature, diffraction, motion blur, heavy cropping, display size, viewing distance, or a different circle-of-confusion assumption.
Use the format preset for quick planning. Use a smaller custom CoC for large prints, heavy crops, critical commercial work, or production standards that demand stricter sharpness.
No. The calculator runs in your browser. Your focal length, aperture, distance, sensor size, and comparison settings are not sent to a server.
Depth of field is closely connected to field of view, crop factor, working distance, and video planning. Use the related calculators above when you need to translate a lens between formats, estimate framing, plan storage for long shoots, or set up a timelapse sequence with a consistent focus strategy.
The H = f²/(N·c) + f equation dates back to early 20th-century film photography and still underpins modern focus tables.
Smartphones use depth maps and segmentation to fake shallow DoF; the tiny sensors natively have very deep focus.
Stopping down past roughly f/11 on many sensors softens detail as diffraction spreads light wider than the pixel pitch.
Many cinema DoF charts still reference a 0.025 mm CoC from 35mm film days—even when used on digital Super35 sensors.
Focus breathing changes angle of view as you rack focus. Wider lenses tend to breathe less; cinema lenses correct it by design.
Depth of field turns technical choices into visual intent. It controls whether attention goes to one eye, an entire product, a row of people, or a landscape from foreground to horizon. It also affects practical decisions on set: how much a subject can move, whether a focus pull has enough tolerance, and whether a shot needs more light, a different lens, or focus stacking.
Use the calculator when blocking shots, planning rack-focus moves, choosing a portrait aperture, checking landscape hyperfocal focus, or deciding whether two lens setups will give comparable sharpness. The numbers update instantly, so you can test realistic combinations instead of relying on memory or generic rules.