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.
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.