This article is from the Photographic Lenses FAQ, by David Jacobson with numerous contributions by others.
It is convenient to think of a rear depth of field and a front depth of field. The rear depth of field is the distance from the object to the farthest point that is sharp and the front depth of field is the distance from the closest point that is sharp to the object. Sometimes the term depth of field is used for the combination of these two, i.e. the distance from the closest point that is sharp to the farthest point that is sharp.
frontdepth = So - Sclose frontdepth = Ne*c/(M^2 * (1 + (So-f)/h)) frontdepth = Ne*c/(M^2 * (1 + (N*c)/(f*M))) frontdepth = So /(hr + 1)
reardepth = Sfar - So reardepth = Ne*c/(M^2 * (1 - (So-f)/h)) reardepth = Ne*c/(M^2 * (1 - (N*c)/(f*M))) reardepth = So/(hr - 1)
In the last three, if the denominator is zero or negative, reardepth is infinity.
These formulas using hyperfocal distance can be used as follows. Suppose I know that the object distance, So, is 1/8th of the hyperfocal distance. Then the range of distances that is acceptably sharp is from 8/9 of So to 8/7 of So. The front and rear depths of field are 1/9 So and 1/7 So.