Hyperfocal distance H is the optimal focusing distance corresponding to a depth of field defined by the interval (infinity,H/2). It is approximately equal to

H = f2/(a A.N.)

where f is the focal length, a is the diameter of the smallest image spot and A.N. is the aperture number. Thus the hyperfocal distance is greater when focal length increases, and is smaller when the aperture number increases.

When a camera is set at the hyperfocal distance, everything between H/2 and the horizon is on focus. This is normally the setting for small cameras without focusing capability.