# Depth of Field & Hyperfocal Distance Calculator

Calculate depth of field, near and far focus limits, and hyperfocal distance for any camera, lens, and aperture setting.

---

- **Canonical URL:** https://dothecalculation.com/calculators/photography-dof-hyperfocal-calculator
- **Category:** Hobbies & Leisure Utilities
- **Publisher:** Do The Calculation (https://dothecalculation.com)
- **Cost:** Free, no account or sign-up required
- **Privacy:** Runs entirely in the browser; inputs are never sent to a server
- **Methodology:** https://dothecalculation.com/methodology

---

## Calculate Depth of Field and Hyperfocal Distance

Compute the near limit, far limit, total depth of field, and hyperfocal point based on lens focal length, aperture f-stop, and sensor size.

- Sensor crop factor templates
- Near and far limit boundary mapping
- Hyperfocal focus point solver

## Demystifying Depth of Field (DoF) in Photography

Depth of Field (DoF) is the distance range in a photograph that appears acceptably sharp and in focus. While a lens can only focus at a single precise distance, the zone of acceptable sharpness extends both in front of and behind that focus point. DoF is a critical creative tool in photography: portrait photographers use shallow DoF (blurring the background) to isolate their subject, while landscape photographers seek deep DoF to keep everything from the foreground to the distant horizon sharp.

Four variables dictate depth of field: focal length, aperture (f-stop), subject distance, and sensor size (specifically, the crop factor, which determines the Circle of Confusion). Longer focal lengths, larger apertures (smaller f-numbers), closer subject distances, and larger sensor sizes all decrease depth of field, leading to a blurrier background.

The limit of what is considered "acceptably sharp" is governed by the Circle of Confusion (CoC). This is the maximum diameter of a blurred point on the sensor that still looks like a sharp point to the human eye on a final print. For a standard 35mm full-frame sensor, the default CoC is 0.030 mm. For smaller sensors (like APS-C or Micro Four Thirds), the crop factor is applied to reduce the CoC size because the final image must be magnified more, amplifying any focus errors.

## The Mathematics of Hyperfocal Distance and Focus Limits

Hyperfocal distance is the focus distance that yields the maximum possible depth of field. When focused at the hyperfocal distance, everything from exactly half that distance to infinity will be acceptably sharp.

The formula for hyperfocal distance (H) is: \(H = \frac{f^2}{N \times c} + f\) (where f is the focal length in mm, N is the f-number, and c is the Circle of Confusion). Once H is calculated, we can solve for the near limit (Dn) and far limit (Df) of sharp focus:

Near Limit: \(D_n = \frac{d \times (H - f)}{H + d - 2f}\) and Far Limit: \(D_f = \frac{d \times (H - f)}{H - d}\) (where d is the subject distance). If the subject distance (d) is equal to or greater than the hyperfocal distance minus the focal length, the far limit reaches infinity.

## Practical Application for Landscape and Portrait Work

In landscape photography, focusing directly on the horizon leaves your foreground blurry. Focusing too close makes the background soft. By using a hyperfocal distance calculator, you can find the exact spot to focus (often a rock or tree in the middle ground) to maximize edge-to-edge sharpness.

For portraiture, you can calculate how much depth of field you have around your subject's eyes. If your DoF is only 2 inches, moving even slightly could throw the subject's ears or nose out of focus. Photographers can use [Scale Converter](/calculators/scale-converter) to convert real-world distances or layout dimensions when planning commercial photo shoots.

## How to Use This Calculator

Enter your lens focal length and aperture (f-stop), your subject distance and its unit (feet or meters), and select your camera's sensor type. The calculator returns the hyperfocal distance along with the near limit, far limit, and total depth of field for your current focus distance.

## Worked Example: A 50mm Lens at f/2.8

With the calculator's defaults — a full-frame sensor, 50mm focal length, f/2.8 aperture, and a subject 10 feet away — the hyperfocal distance comes out to 97.8 feet.

Because the subject distance (10 ft) is well short of hyperfocal, the depth of field is shallow: sharp focus runs from about 9.08 feet to 11.12 feet, a total zone of just 2.04 feet. That narrow window is why portrait photographers shooting near-wide-open apertures need to nail focus precisely on the eyes — stepping down to f/8 or f/11 at the same distance would open that zone up dramatically.

## Related Calculators

For other optics-related math, see the [Telescope Magnification & FOV Calculator](/calculators/telescope-magnification-fov-calculator) and [Telescope Dawes' Limit & Resolving Power Calculator](/calculators/telescope-resolving-power-calculator), which apply similar optical formulas to astronomical viewing instead of camera lenses.

## Frequently asked questions

### What is the Circle of Confusion?

The maximum size of a light spot on a camera sensor that is still perceived as a sharp point in the final print.

### Why does crop factor affect depth of field?

Smaller sensors crop the lens image, requiring more magnification to display at standard size. This magnifies blur, requiring a smaller Circle of Confusion.

### What is hyperfocal distance?

The focus distance that maximizes depth of field, keeping everything from half the hyperfocal distance to infinity sharp.

### Does a larger sensor give shallower depth of field?

Yes, because you must stand closer to the subject or use a longer focal length to achieve the same framing as a crop sensor.

### What f-stop gives the deepest depth of field?

Smaller apertures like f/11 or f/16 provide deep DoF, but going to f/22 or smaller can cause diffraction, which softens the entire image.

### How is focal length related to DoF?

Longer focal lengths compress perspective and decrease depth of field, creating a much stronger background blur.

### Why is the far limit sometimes infinity?

When you focus at or beyond the hyperfocal distance, the rear boundary of sharp focus extends infinitely.

### Does focus distance change hyperfocal distance?

No. Hyperfocal distance is determined solely by focal length, aperture, and sensor crop factor. Subject distance determines the near and far limits.

### Can I calculate DoF for macro photography?

Standard formulas become less accurate in extreme macro because of lens magnification factor changes, requiring macro-specific formulas.

### What is bokeh?

Bokeh refers to the aesthetic quality of the out-of-focus blur, mostly affected by the shape of the lens aperture blades.

### Does focus stacking replace deep DoF?

Yes. Focus stacking merges multiple shots at different focus distances to achieve sharp detail throughout the image.

### How do I focus at the hyperfocal distance in the field?

Find a point in your scene at the calculated distance, focus on it using manual focus or autofocus, then lock your focus.

## Related concepts

- **Circle of Confusion** — Optical tolerance threshold defining acceptable focus limits.
- **Hyperfocal point** — The focus distance yielding maximum depth of field.
- **Lens diffraction** — Softness caused by light bending through small apertures.

## Related guides

- [Understanding Calculator Formulas: How DTC Turns Inputs into Results](https://dothecalculation.com/blog/site-guides/understanding-calculator-formulas) — Understand how Do The Calculation formulas are presented, what the explanation blocks mean, and how to verify calculator logic before using a result in a real decision.

## Related calculators

- [Telescope Dawes' Limit & Resolving Power Calculator](https://dothecalculation.com/calculators/telescope-resolving-power-calculator) — Calculate telescope magnification, Dawes limit, Rayleigh criterion, and field of view based on your aperture and eyepiece.
- [Aquarium Bioload & Fish Stocking Capacity Calculator](https://dothecalculation.com/calculators/aquarium-bioload-stocking-calculator) — Estimate safe fish stocking limits, total fish length, and required filter flow rate for your healthy aquarium bioload setup.
- [Earthquake Magnitude & Energy Calculator](https://dothecalculation.com/calculators/earthquake-calculator) — Calculate earthquake energy release, estimate epicenter distance via P-S wave delays, and determine Modified Mercalli shaking intensity.
- [Geocaching Coordinates Distance & Bearing Solver](https://dothecalculation.com/calculators/geocaching-distance-bearing-calculator) — Solve the exact distance and compass bearing between two GPS coordinates, or project a new waypoint using the Haversine formula.
- [Geocaching Waypoint Projection Calculator](https://dothecalculation.com/calculators/geocaching-projector-calculator) — Project new geocaching waypoint coordinates, exact latitude and longitude, from a starting point using bearing and distance.
- [Metal Detector Target Depth Estimator](https://dothecalculation.com/calculators/metal-detector-depth-calculator) — Estimate the maximum target detection depth for your metal detector based on coil size, frequency, and soil mineral type.

---

_This calculator is for educational and planning purposes. Always verify measurements, conversions, and material requirements before making purchases or physical builds._

---

_Source: [Do The Calculation](https://dothecalculation.com/calculators/photography-dof-hyperfocal-calculator). Quote freely with attribution and a link to this page._
