What Actually Controls Depth of Field
If you have been shooting for a while, you probably already associate depth of field with aperture. Open the aperture wide and the background blurs. Stop it down and everything sharpens. That much is true, but it is only one piece of the picture. Depth of field is controlled by three factors working together, and understanding all three gives you far more control than adjusting aperture alone.

The three factors are: aperture, distance to your subject, and focal length. A wider aperture gives shallower depth of field. A closer distance to your subject gives shallower depth of field. A longer focal length gives shallower depth of field (when you maintain the same subject size in the frame). Change any one of these and the depth of field changes. Change two or three at once and the effect can be dramatic.
This is why the same aperture can give you vastly different results in different situations. Shoot a portrait at f/4 with an 85mm lens from two meters away, and the background will melt into a smooth blur. Shoot a landscape at f/4 with a 24mm lens focused on a distant mountain, and nearly everything will be sharp from foreground to horizon. The aperture is the same in both cases. The distance and focal length are doing the heavy lifting.
There is a fourth factor that affects the appearance of depth of field: sensor size. A camera with a larger sensor (full-frame) produces shallower depth of field than a camera with a smaller sensor (APS-C or Micro Four Thirds) when using the same field of view and aperture. This is because the larger sensor requires either a longer focal length or a closer distance to achieve the same framing, and both of those factors reduce depth of field. This is not a flaw in smaller sensors or a magic property of larger ones. It is simply a consequence of the geometry involved.
Why does this matter practically? Because understanding the interaction of these factors means you have multiple ways to control depth of field. If you want a shallower background blur but you are already at your widest aperture, you can move closer to your subject or use a longer lens. If you want more depth of field but cannot stop down further without losing too much light, you can step back from your subject or use a wider lens. These are creative choices, not just technical adjustments.
Shallow Depth of Field — Isolation and Intimacy
Shallow depth of field is one of the most visually appealing effects in photography. When only your subject is sharp and everything in front of and behind them dissolves into a soft blur, the image has a focus, a clarity of intent, that immediately draws the viewer’s eye to what matters. This is why shallow depth of field is so popular in portraiture, still life, and food photography. It separates the subject from everything else in the scene.
To maximize the background blur for a given situation, you want to combine all three depth-of-field factors in your favor. Use your widest aperture. Use a longer focal length. Get as close to your subject as your composition allows. And there is a bonus trick that many photographers overlook: increase the distance between your subject and the background. A person standing three feet in front of a wall will have a recognizable wall behind them even at f/1.8. Move them twenty feet in front of the same wall and it becomes an unrecognizable wash of color and light.
The quality of the blur itself matters, and photographers call this quality bokeh (from the Japanese word for blur or haze). Good bokeh is smooth, creamy, and pleasant to look at. Bad bokeh is distracting, with harsh edges, busy patterns, or a nervous quality that pulls attention away from the subject. Bokeh quality is largely determined by the lens design, specifically the shape and number of aperture blades. Lenses with more rounded aperture blades tend to produce smoother bokeh. This is one reason why portrait photographers often pay premium prices for lenses known for their bokeh rendering.
Point light sources in the background, like distant streetlights, car headlights, or sunlight filtering through leaves, become circular or hexagonal discs of light in the out-of-focus areas. These are sometimes called bokeh balls, and they can add a beautiful, almost magical quality to an image. The shape of these discs is determined by the shape of the lens aperture. More aperture blades, and more rounded blades, produce rounder discs.
There is a common misconception that shallower is always better. It is not. A portrait at f/1.4 can have such thin depth of field that one eye is sharp and the other is noticeably soft. A product photograph at f/1.8 might render the front of the product sharp while the back fades into mush, losing important details. Shallow depth of field is a tool, not a default. Use it when it serves the image. Use a moderate aperture like f/2.8 or f/4 when you need a bit more of the subject in focus while still getting background separation. The goal is intentional control, not maximum blur for its own sake.
Deep Depth of Field — Context and Clarity
While shallow depth of field isolates, deep depth of field includes. When everything in the frame is sharp, from the wildflowers at your feet to the mountains on the horizon, the viewer is invited to explore the entire scene. This is why deep depth of field is the default in landscape photography, street photography, and documentary work. These genres want the viewer to see context, to understand the relationship between elements, to absorb the whole scene.
To maximize depth of field, you reverse the factors. Use a smaller aperture (higher f-number). Use a wider focal length. Move farther from your subject if possible. For many landscape photographers, the sweet spot is somewhere between f/8 and f/11, which provides excellent depth of field while maintaining peak optical sharpness from most lenses.
This brings up an important point: diffraction. Every lens has a range of apertures where it produces its sharpest images, and stopping down beyond that range actually reduces sharpness. This is because light waves begin to spread (diffract) as they pass through very small openings. For most lenses on full-frame cameras, diffraction starts to become noticeable around f/16 and becomes significant at f/22 and beyond. The images are still usable, but they will not be as critically sharp as they would be at f/8 or f/11.
This means that f/22 is not always sharper than f/11, even though it provides more depth of field. It is a trade-off. For most situations, f/8 to f/11 gives you the best combination of depth of field and optical sharpness. Go beyond that only when you genuinely need the extra depth of field and are willing to accept the slight softening from diffraction. You can check the exact depth of field for any combination of settings using the Depth of Field Calculator.
Working distance affects depth of field more dramatically than most photographers realize. At a given aperture and focal length, a subject five meters away has far more depth of field than one at half a meter. This is why macro photographers struggle so much with depth of field (their working distances are measured in centimeters) while landscape photographers focused on distant mountains have everything sharp even at moderate apertures. If you want more depth of field in a scene, stepping back even slightly can make a noticeable difference.
Hyperfocal Distance
The hyperfocal distance is the focus distance that gives you the maximum possible depth of field for a given focal length and aperture. When you focus at the hyperfocal distance, everything from half that distance to infinity will be acceptably sharp. It is the landscape photographer’s secret weapon for getting both a close foreground and a distant background in focus in a single exposure.
Here is a concrete example. Suppose you are shooting with a 24mm lens at f/11 on a full-frame camera. The hyperfocal distance might be approximately 1.7 meters (depending on the specific calculations and what you define as “acceptably sharp”). If you focus at 1.7 meters, everything from about 0.85 meters to infinity will be in the zone of acceptable sharpness. That means a rock at your feet and a mountain on the horizon will both be sharp in the same frame.
How do you find the hyperfocal distance? There are three common approaches. First, use an app or online calculator. You enter your focal length, aperture, and sensor size, and it gives you the exact distance. Second, use a printed chart that you carry with you in the field. Third, use the rough approximation method: focus about one-third of the way into the scene. This is not precisely accurate, but it gets you close in many situations.
The one-third approximation works because depth of field extends farther behind the focus point than in front of it (roughly two-thirds behind and one-third in front, though the exact ratio varies). By focusing slightly beyond the closest important element in the scene, you maximize the chances of having both foreground and background within the depth of field.
In practice, most landscape photographers who use hyperfocal distance regularly develop an intuition for where to focus based on their preferred focal lengths and apertures. They know, for example, that with their 24mm lens at f/11, focusing at roughly arm’s length will get them front-to-back sharpness in most scenes. This kind of practical knowledge comes from experience and from checking results on a computer screen to confirm what works.
Focus Stacking
Sometimes, no single exposure can give you enough depth of field for the image you want to create. The most common scenario is macro photography, where the working distance is so small that even f/16 might give you only a few millimeters of sharp focus. But it also comes up in landscape photography when you want a flower inches from the lens and a mountain miles away both tack-sharp, and in product photography where you need every detail of a complex object in focus.
Focus stacking solves this problem by combining multiple images, each focused at a different distance, into a single final image where everything is sharp. The technique is straightforward. You mount your camera on a tripod so the framing stays identical between shots. Then you take a series of exposures, shifting the focus slightly between each one, so that the full depth of the subject is covered by the combined focus points. In post-processing software, you load all the images and the software automatically selects the sharpest portion from each frame, blending them into one seamlessly sharp composite.
The number of frames you need depends on the depth of the subject and the amount of depth of field in each individual shot. A macro photograph of a small insect might require 20 or more focus-stacked frames to get everything sharp. A landscape focus stack might need only 2 or 3 frames, one focused on the foreground, one on the middle ground, and one on the background.
When focus stacking, use a moderate aperture like f/8 or f/11 rather than stopping down to f/22. This gives you the sharpest possible individual frames (avoiding diffraction) while still providing enough overlap between focus positions. Overlap is important. Each successive focus point should share some depth of field with the previous one, so there are no gaps of softness in the final composite.
Many modern cameras have built-in focus stacking or focus bracketing modes that automate the process. You set the starting and ending focus points, the number of frames, and the camera fires a burst of images with incrementally shifting focus. This is faster and more precise than adjusting focus manually between shots.
Several software options can handle the blending step. Dedicated focus stacking programs tend to produce the cleanest results, but many general photo editing applications also include focus stacking capabilities. The key is to shoot on a stable tripod, keep your exposure consistent across frames, and ensure enough focus overlap. The software handles the rest.
Focus stacking does require more time and effort than a single exposure, and it does not work for moving subjects (the frames need to align precisely). But for the right subjects, it produces results that are simply not possible any other way. A focus-stacked macro image of an insect, with every compound eye and leg joint in crystalline detail, has a visual impact that no single-exposure approach can match.
Try This — Depth of Field Exercises
These exercises will help you move from knowing what depth of field is to controlling it instinctively. The goal is to make depth of field a conscious creative choice in every photograph you take.
Aperture Walk. Choose a scene with both near and distant elements. Photograph it at your lens’s widest aperture, then at f/5.6, f/8, f/11, and f/16. Keep everything else the same: same composition, same focus point, same camera position. Review the series on your computer and study how the depth of field expands with each step. Pay attention to how different amounts of background blur change the mood and emphasis of the image. Which version do you prefer for this scene? The answer reveals your instinct about how much context you want to include.
Background Control. Photograph a friend standing in front of a busy, cluttered background. Without moving them, find three different ways to reduce the background distraction. First, open to your widest aperture to blur the background. Second, switch to a longer focal length (or zoom in) while maintaining roughly the same subject framing. Third, ask your friend to take three large steps away from the background, increasing the subject-to-background distance. Compare all three approaches and notice how each one affects the blur differently. This exercise demonstrates that aperture is not the only tool for background control, and often, increasing subject-to-background distance is the most effective option of all.
Hyperfocal Landscape. Find a landscape scene with interesting foreground elements within arm’s reach and a distant background. Using a wide-angle lens (24-35mm) and an aperture of f/8 to f/11, practice the hyperfocal distance technique. Focus at the hyperfocal distance for your settings (use an app or the one-third-into-the-scene approximation) and take a single exposure. Review it at 100% magnification. Is the foreground sharp? Is the background sharp? Adjust and reshoot until you get front-to-back sharpness in a single frame. This exercise teaches you the practical power of hyperfocal focusing and gives you a reliable technique for sharp landscapes.
Depth of field is one of the most powerful compositional tools you have, and it is entirely under your control. Every photograph you take involves a depth of field decision, whether you make it consciously or not. The exercises above are designed to make that decision conscious and intentional. Once you can look at a scene and think “I want about this much depth of field” and then create it by choosing the right combination of aperture, distance, and focal length, you are operating at a level that separates thoughtful photographers from casual snapshot-takers. Depth of field is not just a technical setting. It is a way of telling the viewer what matters.