WikiCamera

When you buy through our links, we may earn a commission. Read the disclosure ›

Focus Stacking: Merge Sharp Images from Front to Back

Short answer: Focus stacking is a technique where you capture several images with different focus points and then combine them in software to produce a single frame with deeper depth of field. It is the most reliable way to get sharp results when working close-up or when your scene needs consistent detail from the foreground to the horizon.

What is focus stacking?

Focus stacking is a shooting and post-production method in which you take a series of images while progressively shifting the point of focus through the scene. Later, you merge those frames so that only the sharpest parts of each image remain, creating a final photograph with a greater depth of field than any single exposure could show.

The technique matters most when shallow depth of field is unavoidable, such as in close-up photography or when a strong foreground element sits very close to the lens. Instead of choosing which part of the image must be sharp, you let each frame contribute its own in-focus zone and let the software blend them together.

Why a single frame may not be enough

Depth of field depends on aperture, focal length, sensor format, and shooting distance. The first step is understanding how aperture controls light and sharpness, because that determines whether focus stacking is worth the extra effort for a particular scene.

Stopping down the aperture narrows the lens opening and increases depth of field, but at some point diffraction softens fine detail across the whole image. The hyperfocal distance approach tries to balance near and far sharpness in a single frame, but it becomes impractical at high magnification where the in-focus band is measured in millimeters. Focus stacking sidesteps that trade-off entirely by giving each part of the scene its own dedicated exposure.

Best subjects for focus stacking

Any scene with a strong depth component can benefit from focus stacking, but the technique earns its keep in a few specific situations.

In macro work, you often want a tiny subject to appear crisp from its nearest petal or shell edge to the far side. The macro reproduction ratio tells you how large a subject appears on the sensor, and with a high ratio the focus band becomes very thin. Stacking is usually the only way to get the entire subject sharp.

Landscape photography is another strong case when you want a sharp foreground rock or flower along with a distant mountain in perfect focus. Single-frame solutions force you to compromise, but a short stack of three or four images solves the problem cleanly.

A third case is product photography, especially for small objects like watches or bottles, where the front, middle, and back of the product all need to be critically sharp for the image to look natural.

  • Macro: small subjects with shallow depth of field
  • Landscape: foreground elements plus distant detail
  • Product: small objects that must look sharp edge to edge

How to shoot your focus stack

Start with a stable base. Mount the camera on a tripod or another solid support so the framing does not shift between frames, because the merge step works best when the scene aligns perfectly. See the tripod mount and stabilization guide for advice on choosing a support.

Set the lens to manual focus and begin with the nearest point you want sharp. Then slowly shift focus backward, frame by frame, until you have covered the most distant point. Keep the exposure constant and avoid changing the aperture, because that would alter depth of field between frames.

Many cameras offer a semi-automatic helper called focus bracketing, which advances the focus point automatically between frames. If your camera lacks that, you can still focus manually with the aid of focus magnification or focus peaking.

Merging your images in post

Once you have your series, the next step is combining the sharp areas. Modern image editing software commonly includes a focus stacking routine that analyzes each frame, identifies the sharpest regions, and blends them into one continuous in-focus image.

The merge works best when the source frames are aligned, so you want a solid tripod and a scene that stays still. Slight shifts between frames create halos or ghosting, which is why manual handheld stacks are more difficult to resolve in editing.

Starting from RAW rather than JPEG gives the software more tonal data and reduces the risk of banding in smooth areas after the merge.

Camera and lens considerations

You can do focus stacking with most interchangeable-lens cameras, but the results depend on how much control the body gives you over focus increments and how stable the mount is. Cameras with a smaller sensor format, such as Micro Four Thirds cameras, naturally deliver deeper depth of field for a given composition, which can reduce the number of frames you need.

Higher-resolution sensors preserve fine detail but also reveal any tiny misalignment during the merge, so a rigid support becomes even more critical when you shoot with a full-frame camera or a camera aimed at very large output sizes. APS-C models offer a good middle ground by combining a moderate sensor size with a wide selection of macro lenses, as seen in the best APS-C cameras guide.

If you plan to focus stack often, look for a body with a clean manual focus experience and a lens with a focus ring that moves predictably. Medium format bodies deliver exceptional detail but are often heavier to stabilize and have a thinner native depth of field, which makes stacking more demanding; see the best medium format cameras page if you are considering that route.

What to pick for your focus stacking workflow

If youPickBuying guide
You shoot macro plants and small objectsA Micro Four Thirds or APS-C body with deep native depth of fieldBest Micro Four Thirds Cameras in 2026: 7 Picks Compared on Specs
You photograph landscapes with foreground interestA full-frame camera with high resolution and good focus controlBest Full-Frame Cameras in 2026: 15 Picks Compared on Specs
You need a compact, lightweight setup for outdoor macroAn APS-C mirrorless model with focus bracketingBest APS-C Cameras in 2026: 15 Picks Compared on Specs
You make large prints and want maximum detailA medium format camera with a very sturdy tripodBest Medium Format Cameras in 2026: 6 Picks by Specs
You are new to the technique and want assisted controlsA mirrorless camera with focus peaking and magnificationBest Mirrorless Cameras in 2026: 15 Picks Compared on Specs

Questions

What is the difference between focus stacking and focus bracketing?

Focus bracketing is the process of taking a series of images with different focus points, often automatically. Focus stacking is the post-processing step that merges those images into one sharp final file. You need bracketed images before you can stack them.

Do I need a tripod for focus stacking?

A tripod is strongly recommended because it keeps the framing constant, which makes the merge cleaner. Handheld stacking is difficult and often leads to misaligned frames, though specialized software can partly compensate for small shifts.

How many frames should I take?

The number depends on how thick your subject is and how shallow the depth of field is at your chosen aperture. Macro work may need many frames, while a landscape scene with only a foreground and a background may be covered in just a few. Take a few extra frames when in doubt, because a missing gap in coverage ruins the final merge.

Is focus stacking only useful for macro photography?

No. It is most commonly associated with macro work, but it also helps in landscape photography when you want sharp foreground and far details, and in product photography where the entire item must be in focus.

Can I focus stack moving subjects?

This technique is not suitable for moving subjects. The subject must remain perfectly still across the whole frame series, since any movement between frames causes ghosting or misalignment in the final merge.

Are RAW files better for focus stacking?

Yes. RAW files retain more tonal data and give the merge tool a more accurate base to work from, which reduces visible seams and banding in areas of smooth tone, such as skies or out-of-focus backgrounds.

Change log

  • : First published.

Sources

Related buying guides