Print

Lens focal length calculator

This calculator computes the lens focal length required to photograph an object of size yo at a distance xo, and produce an image of size yi on the film or sensor). The film or sensor plane is located at a distance xi. Distances xo and xi are measured, respectively, from the front and rear principal points of the lens. However, these points are rarely specified by lens manufacturers, and it is difficult to estimate their positions because they may be inside or outside the lens. Nevertheless, for commercial cameras with compatible lenses the distance xi is set to give perfect focus. The rear principal point is always one focal length in front of the film plane when the lens is focused at infinity.

The location of the front principal point cannot be neglected for macro photography. If its exact position is unknown, it is possible to measure it. Focus the lens at infinity and hold it in a reversed orientation while aiming the thread or bayonet end at a distant light source (not the sun). Then try to make a sharp image of the source on a piece of paper placed in front of the lens. The front principal point is one focal length ahead (towards the lens) from the paper. This usually works for telephoto lenses but many wide angles unfortunately do not generate a sharp image when reversed this way. This is because the image is formed within the lens.

Object size: yo =   mm
Image size: yi =   mm
Object distance: xo =   m
Magnification: M = 
Focal length: f =   mm
Angle of view: w =   °
Bellows factor: B = 

The formulae used assume that the lens is able to focus at the required distance (xi is not taken into account in the calculations). If this is not the case it may be possible to get a sharp image by moving the lens slightly away from the film or sensor. Focusing the lens at a closer distance than infinity will cause some light to be lost and make the aperture of the lens appear smaller. Multiply the f/number by the bellows factor to find the correct lens aperture.

Most film or sensor frames (imagers) are rectangular, so three different values result for field of view when using height, width or diagonal. The table below gives the dimensions of the most common film and sensor formats.

Imager size Height
[mm]
Width
[mm]
Diagonal
[mm]
1/4" 2.7 3.6 4.5
1/3" 3.6 4.8 6.0
1/2" 4.8 6.4 8.0
2/3" 6.6 8.8 11.0
1" 9.6 12.8 16.0
Digital SLR 14.8 22.2 26.7
24 x 36 24.0 36.0 43.3

Calculator by kind permission of Iacopo Giangrandi

.