Focus Stacking Explained
How to get front-to-back sharpness that one frame can't - shooting a stack of images at different focus points and blending them in software.
Focus stacking is one of those techniques that sounds technical and turns out to be simple: instead of trying to squeeze a whole scene into focus with a single frame, you shoot several frames focused at different distances and let software blend the sharp parts of each into one fully sharp image. It’s the reliable way to get front-to-back sharpness that a single exposure can’t manage — most useful in close-up and macro work, but handy in landscapes and product photography too. This guide explains what stacking is, why you’d reach for it, how to shoot a stack, and how to blend the results, in plain terms you can use straight away.
What focus stacking actually is
At its core, focus stacking is a way to get more of a scene sharp than one photograph allows. You take a series of images of the same subject, and between each shot you move the point of focus a small step deeper into the scene — starting on the nearest part you want sharp and working back to the farthest. Frame one might have the very front of the subject crisp while everything behind it is soft; the next frame is sharp a little farther back, and so on until the last frame has the distant part in focus. On their own, each image is only partly sharp. Blended together, the sharp slices overlap and combine into a single picture that’s sharp from front to back. Think of it as building one deep, in-focus image out of many thin, in-focus layers.
Why one frame isn’t enough
The reason stacking exists is a hard limit called depth of field — the band of a scene that looks acceptably sharp in front of and behind your point of focus. The closer you focus and the more you magnify a subject, the thinner that band becomes. In macro photography it can shrink to a few millimeters even when you stop the lens down, which is why a single frame of an insect or a flower often has the eye sharp and the rest melting into blur. Our depth of field explained guide walks through why that happens without the math.
The obvious fix — use a smaller aperture — only takes you so far. Narrowing the aperture does deepen depth of field, but past roughly f/16 an effect called diffraction sets in, where light bending around the tiny opening softens fine detail across the whole frame. So a heavily stopped-down shot at f/22 buys you a bit more depth of field while making the entire image mushier. Focus stacking sidesteps the trade entirely: you shoot each frame at a sharper aperture where the lens performs its best, and you get depth of field from the stack rather than from a punishingly small opening.
Where it helps most
Macro and close-upis the home turf of focus stacking, because depth of field is thinnest there and no single aperture can rescue it. Getting a whole bug, a coin, a watch face, or an entire flower head sharp usually means stacking. If that’s your interest, pair this with our how to photograph macro guide, which covers the shooting side in more depth.
It also shows up in landscapes. When you want a rock or a cluster of flowers just inches from the lens to be as crisp as a mountain miles away, one frame often can’t hold both ends — so you shoot one focused on the foreground and one on the distance and blend them. Our how to photograph landscapes guide explains the front-to-back sharpness goal that makes stacking worthwhile in those scenes. And in product and still-life work, where a client wants every detail of an object sharp, stacking is a standard part of the process.
What you need to shoot a stack
The one non-negotiable piece of gear is a tripod. Because the blending software has to align your frames and merge their sharp regions, the camera needs to stay in exactly the same position from the first frame to the last — any drift makes alignment harder and can ruin the result. A steady tripod holds that position while you change only the focus; see our roundup of the best camera tripods for what to look for in one. Beyond that, it helps to shoot in Manualso your exposure and white balance stay locked across every frame — if brightness or color shifts partway through the stack, the blend will show it. A remote release or the self-timer keeps your hand off the camera between shots, and for macro a focus rail is a useful extra that lets you move the whole camera in tiny, precise steps.
How to shoot the stack
Start by locking your exposure. Set a moderate, sharp aperture — roughly f/5.6 to f/8 for macro and f/8 to f/11for landscapes — and keep the shutter, ISO, and white balance fixed in Manual so nothing changes between frames. Then it’s all about moving the focus in small, overlapping steps. Focus on the nearest part of the subject you want sharp and take a shot. Nudge the focus a little deeper and take the next. Keep going until the farthest part you care about is sharp.
You can move focus three ways. The simplest is to turn the focus ring a touch by hand between shots. For macro, a focus rail slides the camera forward in measured increments instead. The key is that the sharp zones of neighboring frames need to overlap— if you skip too far between shots you’ll leave a soft band that no software can fix. Higher magnification means thinner depth of field per frame, so a close macro stack might need dozens of images while a landscape may need only two or three. When in doubt, take more frames with smaller steps; extra overlap is cheap insurance.
Focus bracketing: let the camera do it
Turning the focus ring by hand for thirty frames is tedious and easy to botch, which is why many recent cameras include a focus bracketing mode that automates the whole sequence. You set the starting point of focus, tell the camera how many frames to take and how large a focus step to use, and it fires the burst on its own, advancing focus a little with each shot from near to far. It’s faster, more consistent, and far less fiddly than doing it manually, and it makes stacking practical for handheld-speed subjects you’d otherwise struggle to capture. Check your camera’s manual for the exact name and settings — the feature and its controls vary between models. Whatever moves the focus, the shooting principle is the same: overlapping steps from the nearest point to the farthest.
Blending the frames in software
Once you have your stack, software does the merging. It first aligns the frames — because focusing slightly changes how large the subject appears, the images need to be registered on top of each other — and then it examines every part of the scene, keeps the sharpest pixelsfrom whichever frame had that area in focus, and combines them into one image that’s sharp throughout. Common tools include Adobe Photoshop, which can auto-align and auto-blend a set of layers, and dedicated programs like Helicon Focus that are built specifically for stacking; Affinity Photo has a stacking feature too, and some cameras can even merge a stack in-camera and hand you the finished file. Any of them follows the same logic of align, pick the sharpest, and merge.
Pitfalls, and when you don’t need it
A few things trip people up. Movementis the big one — a subject that shifts between frames, or a breeze nudging a flower, leaves ghosting or blurred edges where the frames disagree, so stacking works best on still subjects in calm conditions. Focus steps that are too largeleave soft bands the software can’t recover, so err toward smaller steps and more frames. And parallax— slight shifts in the relationship between near and far objects — can confuse the alignment on complex scenes, which is another reason to keep the camera rock-steady on a tripod.
Just as important is knowing when to skip it. Most everyday scenes don’t need stacking at all: a single frame at around f/8already keeps a typical landscape sharp from front to back, and plenty of subjects — portraits, wildlife, anything where you want a soft background — are better with shallow depth of field on purpose. Reach for stacking only when depth of field is genuinely too thin for one frame to handle.
The short version
Focus stacking gets more of a scene sharp than one frame can by shooting several images focused at different distances and blending the sharp parts together. It beats stopping down because past about f/16 diffraction softens everything, so a few frames at a sharper aperture win. Put the camera on a tripod, shoot in Manual with a moderate aperture, and move focus in small overlapping steps from the nearest point to the farthest — by hand, on a focus rail, or with your camera’s focus bracketing mode. Then blend in Photoshop, Helicon Focus, or similar. Watch for movement, wind, and steps that are too large, and remember you only need any of this when depth of field is too thin for a single frame — mainly macro, close-up product work, and landscapes with something right up against the lens.
Frequently asked questions
What is focus stacking?
Focus stacking is a technique where you shoot several photos of the same scene, each focused at a slightly different distance from near to far, and then blend them together in software. The blending software keeps only the sharpest part of each frame and combines those sharp zones into one image where everything is in focus. It lets you get more of a scene sharp than a single frame can ever manage on its own.
Why not just use a smaller aperture instead?
Stopping down does deepen depth of field, but only up to a point. Past roughly f/16 an effect called diffraction starts to soften the whole image, so you gain a little depth of field while losing overall sharpness. In macro especially, even a very small aperture can't get a whole subject sharp. Stacking a few frames shot at a sharper aperture, around f/5.6 to f/11, beats one heavily stopped-down frame.
Do I need a tripod for focus stacking?
Yes, a tripod is essential for most focus stacking. The software has to line up your frames and merge the sharp areas, and that alignment is far more reliable when the camera stays in exactly the same spot between shots. A tripod also lets you keep the exposure and framing locked while you change only the focus. You can occasionally get away with handholding a fast burst, but a tripod makes the whole process cleaner.
What is focus bracketing?
Focus bracketing is an automatic mode built into many recent cameras that shoots a focus stack for you. You set the starting focus point, tell the camera how many frames to take and how big a focus step to use, and it fires the sequence on its own, nudging focus a little farther into the scene with each shot. It removes the fiddly job of turning the focus ring by hand between frames. You still blend the results in software unless your camera can merge them in-camera.
When do I not need focus stacking?
Most general scenes don't need it. A single frame at around f/8 already keeps a landscape sharp from foreground to horizon, and a portrait usually wants a shallow depth of field on purpose. Focus stacking earns its place when depth of field is genuinely too thin for one frame, which mostly means macro, close-up product work, and landscapes with something very close to the lens.
Keep reading
How to Photograph Macro
Where focus stacking matters most - razor-thin depth of field.
Read the guideDepth of Field Explained
The problem focus stacking solves.
Read the guideBest Camera Tripods
Aligned frames start with a steady tripod.
See tripodsHow to Photograph Flowers
Get a whole bloom sharp with stacking.
Read the guide