Hyperfocal and depth of field calculation

Hyperfocal and depth of field calculation

The hyperfocal distance is the distance of focus from the subject that allows us to obtain the maximum Depth of Field under certain conditions of aperture and focal length. In general at the distance Hyperfocal we are able to focus from infinity up to half the distance from the plane of focus.


If you focus on “H”, the hyperfocal distance, everything will be sharp from infinity up to H / 2. For example a 24 mm lens at f/16 has a hyperfocal distance of 1.2 meters. If you focus at 1.2 meters, all will appear sharp from infinity to 0.6m from the chamber. Let’s see how you get to the mathematical calculation of the Hyperfocal Distance.

Each lens has an optical center (in practice, the geometric center of the lens);

If we denote with:

s = the distance between the optical center and the subject in focus

p = the distance between the optical center and the film, ie, between the optical center and the plane in which the image is perfectly in focus

F = the focal length of the lens


the fundamental equation of thin lenses tells us that:



Now we consider:

f = Number of F-stop opening (expressed in f / 4 = 4)

c = circle of confusion (mm)

Ca = Front depth of field (the subject toward the goal – also called the near distance)

Cp = rear depth of field (the subject toward the infinite – also known as the far distance)

PdC= Total depth of field PdC PdC = Ca – Cp



Using these geometric formulas is easy to calculate the Hyperfocal Distance because as already mentioned at this distance the depth of field rear Cp must be infinite. And this happens when the denominator of the fraction which expresses Cp is equal to zero:

 So finally we can calculate our hyperfocal:


Now considering the fact that the ‘hyperfocal (I) will always have a value of some meters while the focal length (F) is always in millimeters for simplicity we can overlook the value of F + formula becomes:


Wanting to use on field this formula to obtain the hyperfocal distance for the goal that we are using, multiply the focal length squared and divide by 20 (considering a circle of confusion of 0.020 Canon EOS 50D 60D 7D and converting the results in meters) then use this number divided by the aperture used.

Basically if I’m using a 50 mm f / 4 will do this calculation:

50×50: 20 = 125 then divide by 4 will get a hyperfocal distance of 32 meters.

Another example goal of 200 mm at f / 8

200×200: 20 = 2000 2000:8 = 250 m

is simple then get the hyperfocal distance of the goals of our support.

Now we can obtained the Hyperfocal distance calculation of our depth of field by using the formulas already seen and simplifying them further. We can say that the depth of field front is:

Instead the rear depth of field will be:


So for example if with our 50 mm f / 4 lens which, as seen previously, has a hyperfocal distance of 32 meters we photograph a subject at 10 meters will have a depth of field

Start from: Ca = (10×32) / (32 +10) = 7.6 meters – Nearest Distance

and arrives at: Cp = (10×32) / (32-10) = 14.5 meters – Distance Away

So our PDC will be from 14.5 to 7.6 = 6.9

Focus will be at any element between 7.6 and 14.5 meters.