Depth of field calculator
Depth of field depends on focal length, aperture, distance and how sharp you insist on being — the circle of confusion.
Total depth of field
579.2647m
- Near limit
- 2738.0741
- Far limit
- 3317.3388
- Hyperfocal distance
- 30 838.1773
- Depth in front of the subject
- 261.9259
- Depth behind the subject
- 317.3388
- Focused at or past hyperfocal
- 0
- Behind-to-front ratio
- 1.212
Show the working
- Focal length = 50
- Aperture = 2.8
- Focus distance = 3
- Circle of confusion = 0.029
- Hyperfocal distance = 50^2 / (2.8 * 0.029) + 50 = 30 838.2
- d_mm = 3 * 1000 = 3000
- Near limit = 3000 * 30 838.2 / (30 838.2 + (3000 - 50)) = 2738.07
- Focused at or past hyperfocal = 3000 >= 30 838.2 ? 1 : 0 = 0
- Far limit = 3000 < 30 838.2 ? 3000 * 30 838.2 / (30 838.2 - (3000 - 50)) : 1e9 = 3317.34
- Total depth of field = 3317.34 >= 1e9 ? 1e9 : 3317.34 - 2738.07 = 579.265
- Depth in front of the subject = 3000 - 2738.07 = 261.926
- Depth behind the subject = 3317.34 >= 1e9 ? 1e9 : 3317.34 - 3000 = 317.339
- Behind-to-front ratio = 261.926 > 0 && 317.339 < 1e9 ? 317.339 / 261.926 : 0 = 1.211 56
Values are shown to six significant figures here; the arithmetic itself runs on exact fractions and is only rounded where a number is printed.
Scenarios & local history
Compare a saved scenario
Recent calculations
The formula
- hyperfocal H = f^2 / (N c) + f
- near limit = s H / (H + (s - f))
- far limit = s H / (H - (s - f)), infinite once s reaches H
The familiar one-third-in-front rule only holds at moderate distances. Close up the split is nearly even; far away almost all the depth is behind.
Focusing at the hyperfocal distance puts everything from half of it to infinity acceptably sharp.