Depth of Field
Depth of Field Equations (DOFMaster)
Hyperfocal distance, near distance of acceptable sharpness, and far distance of acceptable sharpness are calculated using the following equations (from Greenleaf, Allen R., Photographic Optics, The MacMillan Company, New York, 1950, pp. 25-27):
Hyperfocal distance:
![]()
Near distance of acceptable sharpness:

Far distance of acceptable sharpness:
![]()
where:
H is the hyperfocal distance, mm
f is the lens focal length, mm
s is the focus distance
Dn is the near distance for acceptable sharpness
Df is the far distance for acceptable sharpness
N is the f-number
c is the circle of confusion, mm
f-number is calculated by the definition N = 2i/2 , where i = 1, 2, 3,... for f/1.4, f/2, f/2.8,...
Calculations using these equations must use consistent units. When focal length and circle of confusion have units of millimeters, the calculated hyperfocal distance will have units of millimeters. To convert to feet, divide H by 304.8. To convert to meters, divide H by 1000.
WikiPedia calculations:
Calculating depth of field:
t = N * c * (s - f) / f^2
The near focus distance, Dn = s/(1+t)
The far focus distance, Df = s/(1-t)
And the full depth of field is the difference between these.
Of course, the sharpness of focus is subjective, and is adjusted by changing the constant in the calculation of the circle of confusion (c). Here, I have used c = S/1440 which is a value that is commonly used. S=diagonal measure of the image sensor in mm
Comparing different cameras with the same DOF.
Here the idea is to match different cameras, with different image sensors, to the same angle of view and to calculate the f-stops which will give the same DOF. This is important in comparing cameras for noise, DR, etc.
For example, the Nikon D800E (FX), 50mm lens, f/8 has the same angle of view and DOF as a SONY NEX-7 (APS-C) with a 35mm lens, f/5.6 which has the same angle of view and DOF as a Nikon 1 V2 (CX), 18mm lens, f/3.4. I felt it would be handy to be able to calculate these differences mor precisely, solving for angle of view (focal length multiplier) and DOF.
From the equation above,
For two cameras with different/ image sensor/ lens/aperture combinations, at a fixed distance:
t1=N1*c1*(s-f1)/f1^2
t2=N2*c2*(s-f2)/f2^2
In order to match these up, set t1=t2, then each camera will have the same Dn, Df, DOF
Thus:
N2 = (N1*c1*(s-f1)*f2^2)/((c2*(s-f2))*f1^2
Aperture Value (AV):
N= √(2^AV)
AV=Log2((N^2))
