# Depth of Field Calculator

URL: https://speedycalculator.com/calculators/other/depth-of-field/
Last updated: 2026-10-25

> The depth of field calculator finds the near and far limits of acceptable sharpness and the hyperfocal distance from focal length, aperture, focus distance and sensor size.

## Inputs

- Focal length (mm)
- Aperture
- Focus distance (m, ft)
- Sensor

## Results

- Hyperfocal distance
- Near limit
- Far limit
- Total depth of field

## Formula

```
H = f² ÷ (N c) + f
Near = s(H − f) ÷ (H + s − 2f),  Far = s(H − f) ÷ (H − s)
```

## Explanation

Depth of field controls how much of a scene is sharp: wide apertures and long lenses give shallow focus for portraits.

### How to use the Depth of Field Calculator

- **Focal length**
- **Aperture**
- **Focus distance**
- **Sensor**

Results update as you type, and every field accepts the units shown in its menu.

### How it works

The circle of confusion depends on sensor size; the hyperfocal distance then gives the near and far limits.

### Inputs explained

FieldWhat to enterFocal lengthIn mmApertureChoose one: f/1.4, f/1.8, f/2.8, f/4 …Focus distanceUnits: m, ftSensorChoose one: Full frame (CoC 0.030 mm), APS-C (0.020 mm), Micro Four Thirds (0.015 mm), 1-inch (0.011 mm)

### What each result means

- **Hyperfocal distance** = [Focal length]^2÷([Aperture]×[Sensor]) + [Focal length]
- **Near limit** = [Focus distance]×([Hyperfocal distance] - [Focal length])÷([Hyperfocal distance] + [Focus distance] - 2×[Focal length])
- **Total depth of field** = [Far limit] - [Near limit]

### Example values

How the main result changes when **Focal length** changes and everything else stays at the example values above:

Focal length (mm)Total depth of field (m)252.85637.51.096500.60162.50.381750.2631000.146

## Worked example

Inputs — Focal length: 50 mm; Aperture: f/2.8; Focus distance: 3 m; Sensor: Full frame (CoC 0.030 mm).

Results — Hyperfocal distance = 29.81 m; Near limit = 2.729 m; Far limit = 3.33 m; **Total depth of field = 0.601 m**.

## FAQ

**What does a dash for the far limit mean?**
Focusing at or beyond the hyperfocal distance makes everything to infinity acceptably sharp.

**Does sensor size change DOF?**
At the same framing and aperture, smaller sensors give deeper depth of field.

**What formula does the Depth of Field Calculator use?**
H = f² ÷ (N c) + f.

