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
= Exact Depth of field
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
  1. Focal length = 50
  2. Aperture = 2.8
  3. Focus distance = 3
  4. Circle of confusion = 0.029
  5. Hyperfocal distance = 50^2 / (2.8 * 0.029) + 50 = 30 838.2
  6. d_mm = 3 * 1000 = 3000
  7. Near limit = 3000 * 30 838.2 / (30 838.2 + (3000 - 50)) = 2738.07
  8. Focused at or past hyperfocal = 3000 >= 30 838.2 ? 1 : 0 = 0
  9. Far limit = 3000 < 30 838.2 ? 3000 * 30 838.2 / (30 838.2 - (3000 - 50)) : 1e9 = 3317.34
  10. Total depth of field = 3317.34 >= 1e9 ? 1e9 : 3317.34 - 2738.07 = 579.265
  11. Depth in front of the subject = 3000 - 2738.07 = 261.926
  12. Depth behind the subject = 3317.34 >= 1e9 ? 1e9 : 3317.34 - 3000 = 317.339
  13. 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.

    Related calculators

    Settings

    Theme

    System follows your operating system and changes with it.

    Text size
    High contrast

    Maximises text and border contrast and removes the grid background.

    Graph-paper background

    Round to
    Notation
    Thousands separators
    Decimal mark
    Nearest fraction

    Shows the result as the nearest tape-measure fraction, with the error it costs.


    Accessibility & interaction
    Reduce motion Stops interface animations even when the operating system does not.
    Underline links Keeps links visually distinct without relying on colour.
    Larger touch targets Makes buttons and form controls easier to tap.
    Shorter reading lines Limits article width for easier scanning.
    Monochrome display Removes colour as an information cue.
    Always-visible focus Makes the keyboard focus ring persistent and stronger.
    Verbose screen-reader results Announces the complete conversion equation.
    Sticky action bars Keeps converter and calculator actions within reach.
    Select values on focus Replaces a value immediately when you start typing.
    Left-handed mobile layout Moves key mobile actions toward the left thumb.

    Your data

    Settings, recent conversions and favourites live in this browser only. Nothing is sent anywhere.

    Offline library