Thin lens and mirror equation calculator

Enter two of the focal length, object distance and image distance to get the third. The calculator also gives the magnification, the image height, whether the image is real or virtual, upright or inverted, and the optical power in dioptres.

Find
Length unit
Image distance15 cm
Magnification
-0.5 ×
Image height
-1 cm
Image
Real (can be projected on a screen)
Orientation
Inverted
Size
Reduced
Optical power
10 D

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Choose what to find: image distance, object distance or focal length.
  2. Enter the other two values in one length unit. Give a diverging lens or convex mirror a negative focal length.
  3. Optionally enter the object height.
  4. Read the result, the magnification, the image height and what kind of image forms.

Formulas

  • Image distance: dᵢ = f × dₒ ÷ (dₒ − f).
  • Object distance: dₒ = f × dᵢ ÷ (dᵢ − f).
  • Focal length: f = dₒ × dᵢ ÷ (dₒ + dᵢ).
  • Magnification: m = −dᵢ ÷ dₒ; image height = m × object height.
  • Power: P = 1 ÷ f (f in metres), in dioptres.

Worked example

A converging lens with f = 10 cm and a 2 cm object 30 cm away: 1/dᵢ = 1/10 − 1/30, so dᵢ = 15 cm. The magnification is −15 ÷ 30 = −0.5: a real, inverted, reduced image 1 cm tall. The lens has a power of 10 D.

Move the object to 5 cm, inside the focal length: dᵢ = 10 × 5 ÷ (5 − 10) = −10 cm. The image is virtual, upright and twice as large, which is how a magnifying glass works.

Tips

  • An object at the focal point sends parallel rays: the image is at infinity and there is no finite answer.
  • An object at 2f gives a real, inverted image of the same size, also at 2f.
  • A diverging lens always gives a virtual, upright, reduced image of a real object.

Frequently asked questions

What is the thin lens equation?

1/f = 1/dₒ + 1/dᵢ, where f is the focal length, dₒ the distance from the object to the lens and dᵢ the distance from the lens to the image. The same equation works for curved mirrors.

Which sign convention does the calculator use?

Real is positive. The focal length is positive for a converging (convex) lens or a concave mirror and negative for a diverging lens or a convex mirror. A positive image distance is a real image, a negative one virtual.

How is magnification calculated?

m = −dᵢ ÷ dₒ. A negative magnification means the image is inverted; a value above 1 in size means it is enlarged. The image height is the object height times m.

What are dioptres?

Optical power is 1 ÷ f with f in metres. A lens with f = 10 cm has a power of 10 D; reading glasses of +2.5 D have a focal length of 40 cm.

More in Math

All tools in this category: Math ·Updated November 4, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.