Depth of field is the zone in your photo that appears sharp and in focus

Depth of field (often called DOF) is the distance between the closest and farthest objects in your image that look acceptably sharp. Everything outside that zone blurs. A shallow depth of field keeps only a thin slice in focus — useful for portraits where you want the face sharp and the background blurred. A deep depth of field keeps nearly everything sharp from foreground to background — useful for landscapes where you want the whole scene clear.

The blur itself is called bokeh. You control how much of your image stays sharp by changing three camera settings: aperture (the opening in your lens), focal length (how zoomed in you are), and distance from your subject. Understanding these three lets you decide what stays sharp and what fades to blur in every shot.

Key Takeaways

  • Aperture is the primary control: a wider opening (lower f-number like f/1.8) creates shallow depth of field; a smaller opening (higher f-number like f/16) creates deep depth of field.
  • Longer focal lengths (telephoto lenses) naturally produce shallower depth of field than wide lenses at the same aperture.
  • Moving closer to your subject reduces depth of field; moving farther away increases it.
  • Shallow depth of field isolates a subject from its background; deep depth of field keeps landscapes and group shots uniformly sharp.

How aperture controls what stays sharp

Aperture is the opening inside your lens that lets light through. It is measured in f-stops: f/1.8, f/2.8, f/5.6, f/16, and so on. The smaller the number, the wider the opening. This is backwards from what most people expect, but it is the standard across all cameras and lenses.

A wide aperture like f/1.8 or f/2.8 lets in a lot of light and creates a very shallow depth of field. Only the exact distance where you focused stays sharp; everything in front and behind it blurs quickly. This is why portrait photographers use fast lenses (wide apertures) — the subject's eyes stay sharp while the background melts into smooth blur.

A narrow aperture like f/8, f/11, or f/16 lets in less light but creates a deep depth of field. Much more of the scene from near to far stays sharp. Landscape photographers use narrow apertures so that mountains in the distance and rocks in the foreground are all in focus. The trade-off is that you need more light or a slower shutter speed to expose the image correctly.

How focal length and distance affect sharpness

Focal length is how zoomed in your lens is, measured in millimeters. A 24mm wide-angle lens shows a broad view. A 50mm standard lens shows what your eye sees. A 200mm telephoto lens zooms in tight on distant subjects. Longer focal lengths naturally produce shallower depth of field than shorter ones, even at the same aperture.

If you shoot a portrait at f/5.6 with a 50mm lens, the background will blur noticeably. If you shoot the same person at f/5.6 with a 24mm wide-angle lens, much more of the background stays sharp. Telephoto lenses compress the scene and isolate subjects more easily. Wide lenses keep more in focus.

Distance from your subject matters just as much. The closer you are to what you are focusing on, the shallower your depth of field becomes. Macro photography (extreme close-ups) has almost no depth of field — only a paper-thin slice is sharp. If you step back from the same subject, more of it comes into focus. This is why group portraits require a smaller aperture than single-subject portraits: you need enough depth of field to keep all the faces sharp.

Shallow depth of field: when and why to use it

Shallow depth of field isolates your subject from everything else. The viewer's eye goes straight to the sharp part because blur naturally draws attention away. This is the look of professional portraits, product photography, and any image where one thing matters and the rest should disappear.

To create shallow depth of field, use a wide aperture (f/1.8 to f/4), a longer focal length if possible (85mm or 135mm for portraits), and get as close as your lens allows. The combination of all three makes the blur strongest. Even a smartphone portrait mode mimics this by using software to blur the background, because shallow depth of field is so visually appealing and so hard to achieve on a phone's tiny sensor.

The downside is that shallow depth of field is unforgiving. If you focus on the tip of someone's nose instead of their eyes, the eyes blur. You have less room for error. In low light, a wide aperture helps you gather enough light, but it also forces you to be more precise about where you focus.

Deep depth of field: keeping landscapes and groups sharp

Deep depth of field keeps the entire scene sharp from close to far. This is essential for landscapes, architecture, and group photos where every part of the image matters. A mountain range, a building's facade, and a family of six all need to be in focus.

To create deep depth of field, use a narrow aperture (f/8 to f/16), a shorter focal length (wide-angle lenses like 24mm or 35mm), and step back from your subject. The combination of all three maximizes sharpness throughout the frame. Landscape photographers often use f/11 or f/16 with a 24mm lens to may support that foreground wildflowers and distant peaks are equally sharp.

The trade-off is light. A narrow aperture blocks light, so you need either bright conditions, a tripod and slow shutter speed, or a higher ISO setting (which adds grain). On a sunny day this is not a problem. In shade or at sunset, you may need to compromise by using f/5.6 or f/8 instead of f/16, accepting that the very closest and very farthest objects blur slightly.

How to preview depth of field before you shoot

Most cameras have a depth-of-field preview button (often labeled DOF or Preview). Press it and your viewfinder or screen darkens to show you what will actually be sharp at your current settings. This is the most reliable way to see whether your background will blur or stay sharp. Without it, you are guessing.

On smartphones and mirrorless cameras with live preview, you see the effect in real time as you change aperture. On older DSLR cameras, the preview button temporarily stops down the aperture so you can see the result. It takes practice to read the preview accurately because the viewfinder gets darker at narrow apertures, making it hard to see detail.

If your camera does not have a preview button, take a test shot, zoom in on the screen, and check what is sharp and what is blurred. Then adjust your aperture or distance and try again. This is slower but works on any camera.

Common depth of field mistakes and how to avoid them

The most common mistake is not realizing how much depth of field you actually have. A beginner shoots at f/5.6 expecting a blurred background and finds the whole scene sharp. This usually means they are using a wide-angle lens or standing far from their subject — both increase depth of field. The solution is to use a wider aperture, a longer lens, or move closer.

The second mistake is using too narrow an aperture for a portrait. f/8 or f/11 keeps too much of the background sharp, so it competes with the subject's face. f/2.8 to f/5.6 is usually the sweet spot for portraits with a standard or telephoto lens. f/1.8 or f/2 works if you want maximum isolation, but focus becomes critical.

The third mistake is forgetting that depth of field extends both in front of and behind your focus point. If you focus on someone's nose, their ears may blur. Focus on the eyes instead. For landscapes, focus about one-third of the way into the scene (not on the horizon) to maximize sharpness from foreground to background.

Frequently Asked Questions

What f-number should I use for a portrait?

For a single subject, f/2.8 to f/4 is a good starting point with a 50mm or 85mm lens. This blurs the background noticeably while keeping the face sharp. If you want more background blur, use f/1.8 or f/2. If you are photographing two or more people, use f/4 to f/5.6 so all the faces stay in focus.

Why does my background stay sharp even when I use a wide aperture?

You are probably using a wide-angle lens or standing far from your subject. Both increase depth of field. Try using a longer lens (85mm or 135mm instead of 50mm) or stepping closer to your subject. The combination of wide aperture, longer focal length, and closer distance creates the strongest background blur.

Can I get shallow depth of field on a smartphone?

Smartphones have tiny sensors, so their depth of field is naturally deep. Portrait mode uses software to detect the subject and blur the background artificially. It works reasonably well for faces but often fails on complex subjects like hair or transparent objects. For true shallow depth of field, you need a camera with a larger sensor and a wide-aperture lens.

What is hyperfocal distance?

Hyperfocal distance is the focus point that maximizes depth of field. When you focus at the hyperfocal distance, everything from half that distance to infinity stays sharp. For landscapes, this means focusing about one-third of the way into the scene rather than on the horizon. Many cameras and apps calculate it automatically based on your aperture and focal length.

Does depth of field change if I crop the photo later?

No. Depth of field is determined by aperture, focal length, and distance at the moment you take the shot. Cropping the image afterward does not change what was sharp or blurred. However, cropping can make blur more or less noticeable depending on how much of the blurred area you remove.