# Hyperfocal Distance Calculator

> Computes the hyperfocal distance H = f²/(N·c) + f for a focal length, f-number and sensor circle of confusion, the near limit obtained when focusing at H, and a table of H for the common apertures f/2.8–f/16.

- Calculator id: `hyperfocal-distance` · Category: Photography & Optics (`photography`) · Tool name: `calculate_hyperfocal_distance`
- Canonical page: https://tttkmbb.com/photography/hyperfocal-distance · This document: https://tttkmbb.com/photography/hyperfocal-distance.md · JSON definition: https://tttkmbb.com/photography/hyperfocal-distance.json

## Purpose

Computes the hyperfocal distance H = f²/(N·c) + f for a focal length, f-number and sensor circle of confusion, the near limit obtained when focusing at H, and a table of H for the common apertures f/2.8–f/16.

**Use when:** You want landscape or street settings that keep everything from a near distance to infinity acceptably sharp, or need a focus-distance table for a lens.

**Do not use when:** You need the sharp zone around an arbitrary focus distance (use depth-of-field), or you want the framing of the lens (use field-of-view).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `focal_length_mm` | number | mm | required | Actual (not equivalent) focal length of the lens in millimetres. (min 1, max 5000) |
| `aperture_f` | number |  | required | Lens f-number, e.g. 2.8 for f/2.8. (min 0.5, max 128) |
| `sensor` | enum: full_frame \| aps_c \| aps_c_canon \| micro_four_thirds \| one_inch \| medium_format_44x33 \| smartphone_1_over_2_3 |  | optional, default "full_frame" | Sensor format; selects the circle of confusion used in the formula. |
| `coc_mm` | number | mm | optional | Optional acceptable circle-of-confusion diameter; overrides the preset value (full frame 0.030, APS-C 0.020, Micro Four Thirds 0.015, 1-inch 0.011 mm). (> 0, max 1) |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `hyperfocal_m` | number | m | Focus here for sharpness from H/2 to infinity. |
| `hyperfocal_ft` | number | ft | Hyperfocal distance in feet (1 ft = 0.3048 m). |
| `near_limit_when_focused_at_hyperfocal_m` | number | m | H / 2: closest acceptably sharp distance when focusing at the hyperfocal distance. |
| `coc_used_mm` | number | mm | Circle of confusion diameter applied (preset or override). |
| `table` | object | m | Hyperfocal distance in metres for f/2.8, f/4, f/5.6, f/8, f/11 and f/16 with the same focal length and sensor. |

## Formula

`H = f² / (N·c) + f (f = focal_length_mm, N = aperture_f, c = coc_mm; result in mm ÷ 1000); near limit = H / 2`

Uses the exact definition with the '+ f' term; the common approximation H ≈ f²/(N·c) differs by one focal length. Presets use the diagonal/1500 circle of confusion convention.

## Data Sources

- Wikipedia – Hyperfocal distance — https://en.wikipedia.org/wiki/Hyperfocal_distance (reference, retrieved 2026-09-24)
- Wikipedia – Circle of confusion — https://en.wikipedia.org/wiki/Circle_of_confusion (reference, retrieved 2026-09-24)
- Cambridge in Colour – Hyperfocal distance — https://www.cambridgeincolour.com/tutorials/hyperfocal-distance.htm (reference, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/hyperfocal-distance?focal_length_mm=…&aperture_f=…`
- `POST https://tttkmbb.com/api/v1/calculate/hyperfocal-distance` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/hyperfocal-distance · OpenAPI operationId `calculate_hyperfocal_distance` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "hyperfocal-distance", "inputs": {…}}`

## Example

- 24 mm, f/8, full frame: inputs `{"focal_length_mm":24,"aperture_f":8,"sensor":"full_frame"}` → `{"hyperfocal_m":2.424,"hyperfocal_ft":7.95,"near_limit_when_focused_at_hyperfocal_m":1.212,"coc_used_mm":0.03}`
- 35 mm, f/11, APS-C: inputs `{"focal_length_mm":35,"aperture_f":11,"sensor":"aps_c"}` → `{"hyperfocal_m":5.603,"near_limit_when_focused_at_hyperfocal_m":2.802,"coc_used_mm":0.02}`

```
GET https://tttkmbb.com/api/v1/calculate/hyperfocal-distance?focal_length_mm=24&aperture_f=8&sensor=full_frame
```

## Limitations

You need the sharp zone around an arbitrary focus distance (use depth-of-field), or you want the framing of the lens (use field-of-view). Uses the exact definition with the '+ f' term; the common approximation H ≈ f²/(N·c) differs by one focal length. Presets use the diagonal/1500 circle of confusion convention. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**Should I focus exactly at the hyperfocal distance?**

Focusing slightly beyond H keeps infinity comfortably sharp at the cost of a little near-side depth; focusing short of H makes infinity soft. Lens distance scales are coarse, so err towards the far side.

**Does the crop factor change the hyperfocal distance?**

Only through the circle of confusion: for the same actual focal length and f-number, an APS-C sensor (c = 0.020 mm) has a hyperfocal distance about 1.5× longer than full frame (c = 0.030 mm).

## Related

- [Depth of Field Calculator](https://tttkmbb.com/photography/depth-of-field.md) — Near and far limits for any focus distance, not only the hyperfocal one.
- [Crop Factor Calculator](https://tttkmbb.com/photography/crop-factor.md) — Sensor diagonal and crop factor behind the circle of confusion presets.
