Depth of Field Calculator

Enter your camera's sensor size, focal length, aperture, and distance to your subject. The calculator shows you exactly how much of the scene will be in sharp focus, plus your hyperfocal distance for maximum sharpness in landscapes.

mm
/
Total DoF
Near Limit
Far Limit
Hyperfocal
Focus Range
0
Near: Subject at Far:

DoF at Different Apertures

Same focal length and distance, showing how aperture changes your depth of field.

Aperture Total DoF Near Far Use Case

Understanding Depth of Field

Depth of field (DoF) is simply how much of your photo looks sharp from front to back. Sometimes you want a lot. Sometimes you want barely any.

Picture a portrait where the eyes are tack-sharp but the background melts into creamy blur. That's shallow depth of field. Now picture a landscape where everything from the rocks at your feet to the mountains on the horizon is crisp. That's deep depth of field.

Learning to control it is one of the most powerful things you can do as a photographer.

What Controls Depth of Field?

Four things. This calculator accounts for all of them.

Aperture is your biggest creative lever. Open it up wide (like f/1.8) and you get a paper-thin plane of focus. Stop it down (like f/16) and the sharp zone gets much deeper. It's why portrait shooters love fast lenses and landscape photographers stop down.

Subject distance matters more than most people think. Get closer and your depth of field shrinks. This is exactly why macro photography is so tricky. Even at f/16, a subject 15cm from your lens might have only a few millimeters in focus.

Focal length has a real but sometimes misunderstood effect. Longer lenses produce shallower depth of field at the same subject distance. But here's the thing: if you step back to keep the same framing with that longer lens, the difference is smaller than you'd expect.

Sensor size matters because larger sensors need longer focal lengths (or closer distances) to get the same field of view. So a full-frame camera at 50mm f/2.8 will give you shallower depth of field than a Micro Four Thirds camera at 25mm f/2.8 framing the same shot. Same field of view, different background blur.

What Is Hyperfocal Distance?

This is the landscape photographer's trick.

The hyperfocal distance is the closest point you can focus while still keeping infinity acceptably sharp. Focus there, and everything from half that distance to infinity falls within your depth of field.

Say your hyperfocal distance comes out to 3 metres. You focus at 3m, and now everything from 1.5m to infinity is sharp. No focus stacking needed.

In practice, it's simple. Set your aperture to f/8 or f/11, check the hyperfocal distance in this calculator, focus at that point, and shoot. Landscape photographers do this constantly.

Circle of Confusion

Behind the scenes, every depth of field calculation relies on something called the circle of confusion (CoC). It's the largest blur spot that still looks sharp to your eye in a normal-sized print at a normal viewing distance.

The CoC changes with sensor size, which is why this calculator asks for it. Full-frame cameras use a CoC of about 0.03mm, APS-C around 0.02mm, and Micro Four Thirds about 0.015mm. You don't need to memorize these. Just pick your sensor and the math takes care of itself.

Want to learn more? Our Sharp Photos guide covers everything from choosing the right aperture to nailing focus, with practical techniques you can use on your next shoot.

Frequently Asked Questions

Use a wide aperture (low f-number like f/1.8 or f/2.8), get close to your subject, and use a longer focal length. The combination of all three will give you the shallowest depth of field and the most background blur. A 50mm or 85mm lens at f/1.8 with your subject a few feet away is a classic recipe for creamy bokeh.
Most landscape photographers use f/8 to f/11 for the sharpest results across the frame. Going narrower than f/16 can actually reduce sharpness due to diffraction. Use this calculator to find your hyperfocal distance at your chosen aperture, focus there, and everything from half that distance to infinity will be in focus.
Yes, but it depends on how you measure it. At the same subject distance, a longer focal length gives shallower depth of field. But if you change your position to get the same framing (stepping back with a longer lens), the depth of field difference is much smaller. What changes more noticeably is the background compression and how out-of-focus areas look.
The circle of confusion (CoC) is the maximum size a point of light can be blurred and still appear sharp in the final image. It depends on your sensor size, print size, and viewing distance. This calculator uses standard CoC values for each sensor size. Full frame uses 0.03mm, APS-C uses 0.02mm, and Micro Four Thirds uses 0.015mm. These work well for typical print sizes and viewing distances.
Set your aperture (f/8 to f/11 is a good starting point for landscapes), check the hyperfocal distance in this calculator, then focus your lens at that distance. You can use the distance scale on your lens if it has one, or estimate it. Everything from half the hyperfocal distance to infinity will be acceptably sharp. No need for focus stacking or complicated techniques.

Tools Are Great. Knowing When to Use Them Is Better.

Every weekday morning, you'll get a short photography lesson that makes your next shoot better. Real techniques, not theory. The kind of tips that make you wonder why nobody told you sooner.

    Join a community of photographers. It's free. Unsubscribe anytime.

    Level up your photography

    Get actionable photography tips in your inbox every weekday morning. Short reads, real results.