Focal Length Calculator

Solve the thin-lens equation for focal length, object, or image distance

Frequently Asked Questions

1/f = 1/do + 1/di, where f is focal length, do is the object distance from the lens, and di is the image distance from the lens to the sensor/film. All three share the same unit.
Magnification m = -di / do. A negative sign means the image is inverted. If |m| is greater than 1, the image is enlarged; if less than 1, it's reduced.
Under 35mm is generally wide-angle, 35-70mm is standard/normal, 70-135mm is short telephoto, and beyond 300mm is super telephoto (on a full-frame sensor).
The thin-lens equation only works when do, di, and f are expressed in the same unit (usually mm). Mixing units gives an incorrect result.

The thin-lens equation

1/f = 1/do + 1/di

Here f is the focal length, do the distance from the lens to the subject and di the distance from the lens to the image (the sensor or film). All three must be in the same unit. Solving for each:

  • f = (do × di) ÷ (do + di)
  • di = 1 ÷ (1/f − 1/do)
  • do = 1 ÷ (1/f − 1/di)

Magnification is m = −di ÷ do; the minus sign means the real image is upside down. Optical power in diopters is 1000 ÷ f when f is in millimeters.

Examples

  • An object 1,500 mm away forms a sharp image 51 mm behind the lens: f = (1500 × 51) ÷ 1551 = 49.3 mm.
  • A 50 mm lens focused on a subject 2 m away needs the image plane at 51.3 mm, so the lens moves 1.3 mm forward from its infinity position. Magnification is about 0.026×.
  • At 1:1 macro (magnification 1), do = di = 2f, so a 100 mm macro lens is 200 mm from the subject, measured from the lens's optical center.

Focal length and field of view

Focal length (full frame)TypeTypical use
14 to 35 mmwide anglelandscapes, interiors
35 to 70 mmstandardstreet, everyday
70 to 135 mmshort telephotoportraits
135 to 300 mmtelephotosports, events
over 300 mmsuper telephotowildlife, birds

On a smaller sensor, multiply by the crop factor to get the full-frame equivalent field of view: about 1.5× for Nikon and Sony APS-C, 1.6× for Canon APS-C and 2× for Micro Four Thirds. A 35 mm lens on APS-C frames like a 52 to 56 mm lens on full frame.

Limits of the model

The thin-lens equation treats the lens as a single ideal element. Real camera lenses have many elements, so distances are measured from principal planes rather than the front of the lens. The results are excellent for physics problems and simple lenses and approximate for complex zooms.

For related calculations, use the aspect ratio calculator, the unit converter and the lighting calculator.