Instructions
Calculate the hyperfocal distance, which is the maximum depth of field for a given lens in a specific configuration. Square the lens's focal length, and divide this value by the aperture times 0.03. This will give the hyperfocal distance in millimeters. For instance, with a lens at a focal length of 50 mm with an aperture of f/8, square 50 to arrive at 2,500, and divide that by 8 times 0.03 (or 0.24) to arrive at 10,416 mm or roughly 34 feet.
Calculate the near focus limit by multiplying the hyperfocal distance by the distance between the lens and the subject, and dividing that value by the hyperfocal distance plus the distance between the lens and the subject minus the lens focal length. This will give the near focus limit in millimeters. For instance, if the above example were the same (focal length of 50 mm, aperture of f/8) and the subject were 10 feet (3,048 mm) away, multiply 10,416 by 3,048, and divide that value by 10,416 plus 3,048 minus 50 to arrive at 2,366 mm or roughly 8 feet.
Calculate the far focus limit by multiplying the hyperfocal distance by the distance between the lens and the subject, and dividing that value by the hyperfocal distance minus the distance between the lens and the subject minus the lens focal length. This will give the far focus limit in millimeters. For instance, if the above example were still the same (focal length of 50 mm, aperture of f/8 and subject distance of 10 feet or 3,048 mm) multiply 10,416 by 3,048, and divide that value by 10,416 minus 3,048 minus 50 to arrive at 4,338 mm or roughly 14 feet.
Combine the near focus limit and the far focus limit to arrive at the total depth of field. Continuing the above example, a lens set to a 50 mm focal length and an aperture of f/8 with a subject 10 feet away would produce a depth of field that was 6.3 feet wide, which begins 7.7 feet from the camera and ends 14 feet from the camera. Everything within that plane would be in-focus.