The *focus distance* **d** is the distance between the photographic object and the camera sensor. It can be expressed as the sum of the object distance **g** between object and lens and the image distance **h** between lens and sensor as

d | = | g + h | (F1) |

When the lens is focused, it is actually moved back or forth a little such that the lens equation is fulfilled. To calculate **g** and **h** for a given focus 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 common root term as

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

If we add the root term **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, we could not focus at infinity (there are actually a few lenses that can’t, such as the dedicated macro lens Canon MP-E 65 mm 2.8). Thus, we set

g | = | d / 2 + r | (F7) |

h | = | d / 2 – r | (F8) |

## Minimum focus 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 focus 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 **d**_{min} that still gives a sharp image is called the *minimum focus distance (MFD)* or *closest focus distance* 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 to have a look at the aperture of the lens.