Skip to content
FiftyCalc Free calculators for all 50 states

Focal Length Calculator

Test cases replayed : 2 of 2 match · Methodology · No outside source listed

Enter the distance from the lens to the object and to the sharp image, in millimeters.

Result

Sample figures

Focal length, f—mm

Magnification (negative = inverted image) —

  • Lens power (diopters)—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Focal Length Calculator

Object distance, do, in mm: enter 0 or more. Prefilled example: 300.

Image distance, di, in mm: enter 0 or more. Prefilled example: 60.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Object distance, do, in mm: enter 0 or more.
  2. Image distance, di, in mm: enter 0 or more.
  3. Read the result: Focal length, f; the panel also shows Magnification (negative = inverted image) and Lens power (diopters).

How this calculator works

Thin lens equation (Gaussian form): 1/f = 1/do + 1/di, so f = do × di / (do + di), for a real object and a real image on the other side of the lens.

Magnification m = −di/do (negative: the image is upside down). Power in diopters = 1/f with f in meters = 1,000 / f (mm).

The formula

  1. F=do×dido+di
Symbols used in the formula
SymbolMeaningUnit
doObject distance, domm
diImage distance, dimm
FFocal length, fmm

Worked example

Object distance, do300 mm
Image distance, di60 mm
Magnification (negative = inverted image)-0.2
Lens power (diopters)20
  1. F=300×60300+60=50

Focal length, f 50 mm

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

What is the focal length if the object is 300 mm away and the image forms at 60 mm?

50 mm, with a magnification of −0.2 and a power of 20 diopters.

What happens when the object is very far away?

1/do approaches zero, so the image forms at the focal length: di ≈ f.

When does the image equal the object in size?

When do = di = 2f, the magnification is −1.

Related calculators