The math behind the photograph.

The numbers come from a thin-lens model. The picture explains those numbers, but is not a measured simulation of a particular lens.

Inputs and units

Internally all lengths are millimetres. Let f be focal length, N the f-number, s the focused object distance, d another object's distance, and c the acceptable sensor-plane blur diameter. Distances are measured from the ideal lens plane; real cameras usually mark distance from the sensor plane. This distinction matters more at macro distances.

Our default CoC is sensor diagonal divided by 1500. It is a viewing convention, not a sensor pixel size or a universal definition of sharpness. You can change it under Advanced controls. The guides explicitly state when they use a rounded 0.030 mm criterion instead.

Equations you can reproduce

For horizontal angle of view we use 2 × atan(sensor width / (2 × v)), reflecting finite focus in this ideal lens. The familiar formula using focal length in place of v is the infinity-focus approximation.

Worked example: 50 mm, f/8, focus at 5 m

With a 36 × 24 mm sensor and CoC 0.030 mm, H is 10.4667 m. The near limit is 3.38937 m and the far limit is 9.52744 m: total depth of field 6.13807 m. A background at 12 m has a 0.03683 mm blur diameter, just outside the chosen sharpness criterion.

Reproduce these exact inputs in the simulator →

How framing and the preview work

An object's projected height is its physical height multiplied by magnification, divided by sensor height. We use an adjustable 1.70 m reference person. Generated portrait cutouts have approximate crop calibration; they are not measured anatomical models. Both standalone and comparison previews use the same projection and retain the eye-line anchor when zooming.

Keep subject size recalculates focus distance when focal length or sensor height changes, and preserves the subject-to-background gap. An explicit focus-distance adjustment establishes a new framing reference. If a distance limit prevents the match, the lock turns off. The illustrated scenery has four discrete planes; it is not a continuous 3D reconstruction.

What remains illustrative

Surface defocus is a Gaussian approximation with sigma equal to half the calculated blur-disc radius. Designated bright points use filled aperture footprints, not sampled rings. Large blur is capped at 80 reference pixels with a notice. The Airy estimate is 2.44 × 0.00055 × N millimetres. Diffraction stars are illustrative, and the subject cutout does not model skin-surface depth or diffraction softness. Photo backgrounds contain baked-in blur and cannot be refocused.

We do not model pupil magnification, cat-eye bokeh, lens aberrations, optical stabilization, focus breathing of internal-focus lenses, exposure, or focus stacking. Use real test frames for critical focus. Catalog sources can change; report a discrepancy rather than treating a preset as a manufacturer guarantee.

Validation and references

The test suite checks numerical fixtures, blur at DOF boundaries, hyperfocal behavior, state restoration and projected size. Independent ray-cone calculations provide a cross-check rather than only comparing the calculator against itself. Passing software tests is not a calibration certificate for physical equipment.

Background reading: Edmund Optics on field of view. For a correction, see about and contact; include your settings and the number you expected.