Focus Stacking Step Calculator
Plan a macro focus stack from magnification and aperture, with a programmable rail step plus frame-count and travel estimates for the measured subject.{{ summaryHeading }}
{{ summaryLine }}
{{ stageMarker }}
Schematic bands; exact positions are in Step Ledger.
| Metric | Value | Planning note | Copy |
|---|---|---|---|
| {{ row.label }} | {{ row.value }} | {{ row.note }} |
| Check | Status | Capture note | Copy |
|---|---|---|---|
| {{ row.label }} | {{ row.status }} | {{ row.note }} |
| Frame | Rail move | Focus plane | Sharp from | Sharp to | Role | Copy |
|---|---|---|---|---|---|---|
| {{ row.frame }} | {{ row.move }} | {{ row.position }} | {{ row.sharpFrom }} | {{ row.sharpTo }} | {{ row.role }} |
| Aperture | Macro DoF | Rail step | Frames | Tradeoff | Copy |
|---|---|---|---|---|---|
| {{ row.aperture }} | {{ row.dof }} | {{ row.step }} | {{ row.frames }} | {{ row.tradeoff }} |
At macro distances, a single photograph may hold only a thin slice of the subject in acceptable focus. Focus stacking extends that apparent depth by capturing overlapping sharp slices at different focus positions and blending them into one image. The capture sequence succeeds only when adjacent slices overlap and the rail can repeat the planned movement.
Magnification is the strongest influence on the spacing. At 2:1, the projected subject is twice life size on the sensor and depth of field is far smaller than at 1:1. Aperture and the accepted circle of confusion also change the estimated sharp band, while subject depth determines how many moves are needed to span the scene.
| Quantity | What it represents | Planning effect |
|---|---|---|
| Magnification | Image size on the sensor compared with subject size | Higher magnification sharply reduces depth of field. |
| Circle of confusion | The largest sensor-plane blur spot accepted as sharp | A stricter, smaller value produces shorter steps. |
| Overlap | The share of each estimated sharp band reserved for the next frame | More overlap improves coverage tolerance but increases frame count. |
| Rail resolution | The smallest movement the rail can repeat | The safe step must be rounded down to a reachable increment. |
Depth of field is not a hard wall. Sharpness fades gradually, and the accepted blur limit depends on final image size and viewing distance. Lens pupil magnification, focus breathing, rail backlash, subject motion, lighting changes, and stacking software can all make a real stack behave differently from a symmetric-lens estimate. A short calibration stack remains the best check before a long capture.
How to Use This Tool:
Start with measurements from the actual camera, subject, and rail rather than treating a preset as a finished plan.
- Choose a Setup preset, then select a Magnification source. Enter a known reproduction ratio, or use a measured subject-space frame width with the active sensor width.
- Set the Sharpness target, Nominal aperture, Overlap target, and front-to-back Subject depth. Use a custom circle of confusion only when the viewing requirement is known.
- Enter the smallest repeatable Rail increment. Add a measured Settle allowance for play or overshoot and optional guard frames only when the capture setup needs them.
- Read the programmed step and frame count first. Then inspect Capture Checks and the Coverage Path; revise the setup if the rail is too coarse, the stack is very long, or the aperture warning calls for a calibration test.
Interpreting Results:
Programmed rail step is the movement to enter on the rail. It never exceeds the usable optical step because it is rounded down to the selected rail increment. Frame count includes guard frames, while Rail travel spans every interval from the first exposure to the last.
- A rounded-down step is conservative; it slightly increases overlap and may add frames.
- An effective f-number warning signals a diffraction tradeoff, not an automatic failure.
- A continuous plotted coverage path is still an estimate. Inspect a blended test stack at the intended output size before committing to the full sequence.
Technical Details:
The optical model treats the lens as symmetric and measures distances in subject space. A preset sharpness target scales the sensor format's circle of confusion, while measured-frame mode derives magnification by dividing active sensor width by the subject width visible across that edge.
Formula Core:
Macro depth of field grows with nominal aperture and accepted blur diameter, but falls with the square of magnification.
Here, D is estimated macro depth of field in millimetres, N is nominal f-number, c is circle of confusion in millimetres, and m is image magnification as a ratio.
The overlap, settle allowance, and rail increment turn that optical band into a programmable move.
| Symbol | Meaning | Unit |
|---|---|---|
| o | Overlap entered as a decimal fraction | ratio |
| a | Settle allowance | mm |
| q | Rail increment; zero requests the unrounded mathematical step | mm |
| L | Subject depth along rail travel | mm |
| g | Guard frames added at each end | count |
| F | Total frame count | count |
Rule Core:
- The settle allowance must be smaller than the theoretical step. The rail increment must not exceed the usable step.
- Total travel is (F − 1)sp. Changing capture direction reverses sequence order without changing step, count, or travel.
- Simple effective f-number is N(1 + m). Values from f/22 trigger a watch status; values from f/32 trigger a stronger review status.
- Stacks above 80 frames receive a management cue, above 180 receive a long-stack cue, and plans above 410 frames are rejected.
For a full-frame 1:1 setup at f/8, a print sharpness target uses a 0.02175 mm circle of confusion. With 30% overlap, 6 mm subject depth, and a 0.005 mm rail increment, the 0.4872 mm theoretical step rounds down to 0.485 mm. The result is 14 frames across 6.305 mm of travel.
Accuracy Notes:
The result is a capture-planning estimate, not a lens calibration. Pupil magnification and focus breathing are excluded, and circle of confusion describes an accepted viewing blur rather than sensor resolving power. Diffraction, rail backlash, vibration, subject motion, exposure drift, and blending errors remain outside the model. Repeat the calibration whenever magnification, aperture, output size, rail behavior, or stacking software changes.
Worked Examples:
Two-to-one specimen with guard frames
At 2:1, f/5.6, a 0.015 mm custom circle of confusion, 40% overlap, and 0.5 mm subject depth, the estimated depth of field is 0.126 mm. A 0.001 mm settle allowance and 0.005 mm rail increment produce a 0.07 mm programmed step. One guard frame at each end raises the coverage count from 9 to 11 frames and total travel to 0.7 mm.
References:
- Depth of Field and Manual Focusing, ZEISS Photography.
- Focus Shift, the Basics: Stacking Focus, Nikon.