With this tool you can calculate the required focal length to take a picture of an object at a given distance in order to generate an image fitting on your sensor size.
The circle of confusion c is the diameter of a circle on the image plane that can be considered a single point when the image is observed (the size of the film/imager is different that the size of the print/screen. For 35 mm photography c is usually 0.025 mm, but this value depends of course on the size of the final prints.
The hyperfocal distance H is the minimum distance from the front principal plane that will appear sharp when the lens is focuses at infinity (xo = infinity).
Calculator for finding the depth of field
Calculator for finding the required aperture
The maximum possible depth of field is obtained when the lens is focused one focal length f farther than the hyperfocal distance H: everything between Dn and infinity will be sharp. The value "Infinity" can be entered for Df, but since it's case sensitive it has to be typed as shown.