Hyperfocal Distance Calculator
Estimate the focus distance that extends acceptable sharpness from a practical near limit to infinity, using sensor size, focal length, and aperture.
Camera settings
Preset dimensions set the circle-of-confusion criterion from the sensor diagonal.
Required only for a custom sensor; use the active imaging width.
Required only for a custom sensor; use the active imaging height.
Use the lens's actual focal length, not its full-frame-equivalent field of view.
Standard full stops use their exact geometric focal ratios internally.
This is derived from the selected f-stop; choose Custom focal ratio to enter another positive value.
Results
Hyperfocal distance
3.88 m
Focus at approximately this distance to place the far depth-of-field limit at infinity under the selected circle-of-confusion criterion.
Hyperfocal near limit
1.94 m
Circle of confusion
0.02884 mm
Sensor diagonal
43.27 mm
Effective focal ratio
22.627
Calculation details
| Quantity | Current value | How it is used |
|---|---|---|
| Sensor dimensions | 36 × 24 mm | Determine sensor diagonal and the circle-of-confusion criterion. |
| Sensor diagonal | 43.27 mm | Used to derive the circle of confusion as diagonal ÷ 1500. |
| Circle of confusion | 0.02884 mm | Defines the maximum blur-circle criterion used by this model. |
| Lens focal length | 50 mm | Appears both linearly and squared in the hyperfocal formula. |
| Focal ratio | 22.627 | A larger f-number reduces the calculated hyperfocal distance. |
| Hyperfocal near limit | 1.94 m | Modeled as one-half of the hyperfocal distance. |
| Hyperfocal distance | 3.88 m | The focus distance that places the far limit at infinity under this criterion. |
How to use this hyperfocal distance calculator
What this calculator does
This calculator estimates a camera setup's Hyperfocal distance: the focus distance that places the far edge of the modeled depth of field at infinity while bringing the near edge as close as the chosen sharpness criterion permits. It also reports the Hyperfocal near limit, the Circle of confusion, the Sensor diagonal, and the Effective focal ratio. It is a planning tool for geometrical depth of field, not a guarantee that every detail will look equally sharp. Perceived sharpness changes with capture resolution, lens quality, diffraction, display or print size, viewing distance, and eyesight. For a broader optics explanation, see the RP Photonics Encyclopedia article on depth of field and circle-of-confusion criteria.
When to use it
Use hyperfocal planning when you want substantial foreground-to-background sharpness, especially for landscapes, cityscapes, architecture, travel scenes, and some night-sky compositions with foreground detail. It is also useful for comparing how a wider lens, a smaller aperture, or a different sensor format changes the distance at which you should focus. It is less useful when a specific subject needs critical focus, when shallow depth of field is intentional, or when diffraction and lens performance matter more than maximizing geometric depth of field.
How to calculate
- The calculator opens with a ready-to-use demonstration: 35mm full-frame, a 50 mm lens, and f/22. The example results and a validated Excel workbook are available immediately.
- Choose Sensor size. For a listed format, the dimensions are filled internally. If you choose Custom sensor size, enter both Sensor width and Sensor height in millimeters.
- Enter Lens focal length (f) in millimeters. Use the physical focal length printed on the lens, not a crop-factor-equivalent focal length.
- Choose an Aperture f-stop. The calculator displays the corresponding Focal ratio (N). If you choose Custom focal ratio, the focal-ratio field becomes editable.
- Read Hyperfocal distance as the approximate focus distance, then check Hyperfocal near limit to see how close the modeled acceptable-sharpness range begins. The details table shows every intermediate value used in the calculation.
- Select Download Excel to export the current validated inputs and outputs as a real XLSX workbook. Reset clears the demonstration and all semantic input data; the export button then stays disabled until a complete valid state is entered again.
Input guide
Sensor size is required. Choose a preset format or Custom sensor size. A smaller sensor diagonal produces a smaller circle-of-confusion criterion in this model, which increases the calculated hyperfocal distance for the same lens and f-number. A common mistake is to choose a sensor format that does not match the camera's active imaging area.
Sensor width and Sensor height are required only when Custom sensor size is selected. Enter positive millimeter values using a period as the decimal separator, for example 36 and 24. Grouped thousands are accepted only when commas are used in conventional three-digit groups. Decimal-comma input such as 1,5 is rejected rather than silently reinterpreted. These values affect the sensor diagonal and therefore the circle of confusion.
Lens focal length (f) is required and accepts a positive value from 0.1 to 2000 mm; 50 mm is the startup example. Longer focal lengths raise the hyperfocal distance strongly because focal length is squared in the main formula. Do not enter a 35mm-equivalent focal length for a cropped sensor unless that is the lens's actual focal length.
Aperture f-stop is required. Standard options from f/1 through f/64 use exact geometric full-stop ratios internally, so the f/22 option corresponds to an Effective focal ratio of approximately 22.627. Nikon's explanation of aperture and depth of field explains why a higher f-number generally increases depth of field, although very small apertures can introduce diffraction.
Focal ratio (N) is required. With a standard f-stop it is read-only and derived automatically; with Custom focal ratio it accepts a positive value from 0.1 to 512. Increasing N decreases the modeled hyperfocal distance. Entering zero, a negative number, unsupported symbols, scientific notation, or an ambiguous decimal comma produces a visible validation error.
Output guide
Hyperfocal distance is the primary estimate, displayed in meters. A smaller value means you can focus closer while retaining infinity inside the modeled acceptable-sharpness range; a larger value means the required focus point is farther away. Hyperfocal near limit is displayed in meters and is modeled as half the hyperfocal distance. Circle of confusion is displayed in millimeters and represents the blur-circle threshold used for acceptable sharpness; this calculator uses sensor diagonal divided by 1500. Sensor diagonal is the Pythagorean diagonal of the active sensor dimensions. Effective focal ratio is the numerical N value used in the equation. The summary pills repeat the active sensor, lens, near limit, and hyperfocal distance so you can scan the current setup quickly. The Calculation details table lists Quantity, Current value, and How it is used; every row is generated from the same canonical model as the results and Excel export.
Worked example
The startup example uses a 36 × 24 mm full-frame sensor. Its diagonal is √(36² + 24²) = 43.2666 mm, giving a circle of confusion of 43.2666 ÷ 1500 = 0.028844 mm. With a 50 mm lens and the exact f/22 full-stop ratio N = 22.6274, the calculation is H = 50 + 50² ÷ (22.6274 × 0.028844) = 3880.39 mm, or 3.88 m. The modeled hyperfocal near limit is H ÷ 2 = 1940.20 mm, or 1.94 m. Those values match the first-open result cards, summary pills, details table, and workbook checkpoints.
Learn more
For practical background on why hyperfocal distance depends on a chosen acceptable-sharpness threshold, see Cambridge in Colour's hyperfocal distance tutorial. Its treatment is a useful reminder that circle of confusion is not an absolute property of a lens: enlargement and viewing conditions matter. For field use, consider the computed distance a disciplined starting point and verify critical foreground and background detail at the intended output size whenever possible.
Formula and interpretation
H = f + f² / (N × C), with C = sensor diagonal / 1500 and near limit = H / 2The formula uses consistent millimeter units for focal length, circle of confusion, and hyperfocal distance before converting the displayed distance to meters. Holding sensor and aperture constant, doubling focal length more than quadruples the dominant f² term, so telephoto lenses can push the hyperfocal distance dramatically farther away. Holding lens and sensor constant, increasing the f-number shortens the hyperfocal distance because N appears in the denominator.
The sensor effect comes through C. A smaller sensor diagonal produces a smaller permitted blur circle under this convention, which makes the acceptable-sharpness criterion stricter and moves the hyperfocal distance farther away for the same actual focal length and aperture. In real photography, format comparisons can become more nuanced because photographers often change focal length to maintain the same angle of view.
Common mistakes to avoid
- Using equivalent focal length instead of the lens's actual focal length.
- Assuming the near limit means everything from that point forward is equally sharp; it only marks the chosen acceptance boundary.
- Treating a single circle-of-confusion convention as universally correct for every print, display, viewing distance, and eyesight condition.
- Stopping down without considering diffraction, shutter speed, ISO, subject motion, and the lens's own optical performance.
- Focusing exactly on a calculator number without checking whether the lens distance scale, autofocus behavior, or field conditions allow that precision.