Focusing Distance

When the lens is focused, it is actually moved back or forth a little such that the lens equation is satisfied, i.e. the object distance g between object and lens and the image distance  h between lens and sensor are adjusted. However, the focusing distance d which you can read and set on your lens measures the full distance between object and image plane, i.e.

d = g + h (F1)

To calculate g and h for a given distance d, we solve equation (F1) for h and substitute it into the lens equation (L5)

1 / f = 1 / g + 1 / (d – g) (F2)

With some algebra, we end up with a quadratic equation

g² – g d + f d = 0 (F3)

This equation has (at most) two different real solutions, given by

g = d / 2 ± sqrt (d² / 4 – f d) (F4)

where sqrt denotes the square root. With equation (F1), we also get

h = d / 2 ± sqrt (d² / 4 – f d) (F5)

For simplicity, we define the root term as

r = sqrt (d² / 4 – f d) (F6)

If we add r in equation (F4), we must subtract it in equation (F5) and vice versa. In practice, the vast majority of lenses are constructed such that the distance g between object and lens can be (much) larger than the distance h between lens and image sensor. Otherwise, you could not focus at infinity (there are actually a few such lenses as the dedicated macro lens Canon MP-E 65mm). Thus, we set

g = d / 2 + r (F7)
h = d / 2 – r (F8)

Minimum focusing distance

Note that equations (F7) and (F8) can only be solved if the expression under the root in equation (F6) is non-negative, i.e.

d² / 4 – f d 0 (F9)

Division by d (positive for all meaningful cases) gives

d 4 f (F10)

Inequation (F10) defines a lower bound for the focusing distance d, i.e. we cannot get any closer than 4 times the focal length. How close we can actually get also depends on the mechanical construction of the lens. The closest possible distance dmin that still gives a sharp image is called the minimum focusing distance (MFD) of the lens. It is closely related to the magnification and a major characteristic of any camera lens.

This is already enough theory to calculate the magnification of a lens. For the depth of field and related concepts, we also need the aperture.