Thin Lens Equation Calculator
Solve the thin lens equation 1/f = 1/dₒ + 1/dᵢ for any unknown. Enter two of focal length, object distance and image distance (in cm) to find the third, magnification and image type.
How to use this tool
- Enter focal length f, object distance dₒ and image distance dᵢ in the fields above.
- Results update instantly as you type — or click Calculate.
- Read your image distance dᵢ and the full breakdown beneath it.
The thin lens equation is 1/f = 1/dₒ + 1/dᵢ, where f is focal length, dₒ is object distance, and dᵢ is image distance (all in the same units). Magnification m = −dᵢ/dₒ. A real, inverted image has m < 0 and dᵢ > 0.
Formula
1/f = 1/do + 1/di ⇒ di = 1 ÷ (1/f − 1/do)
Magnification: m = −di / do
All distances in cm. Leave one value as 0 to solve for the unknown.
How it works
The thin lens equation relates the focal length f of a converging or diverging lens to the object distance do and image distance di. The calculator determines which of the three quantities is unknown (entered as 0) and algebraically rearranges the equation to solve for it.
Magnification m = −di/do: a negative value indicates a real, inverted image; a positive value indicates a virtual, upright image. The formula assumes a thin lens with negligible thickness; thick lenses and compound optical systems require more advanced models.
Worked example
Worked example
- Given: focal length f = 10 cm, object distance dₒ = 30 cm, image distance unknown (set to 0).
- Rearrange the lens equation: 1/dᵢ = 1/f − 1/dₒ = 1/10 − 1/30 = 3/30 − 1/30 = 2/30.
- dᵢ = 30/2 = 15 cm.
- Magnification: m = −dᵢ/dₒ = −15/30 = −0.5.
Image distance dᵢ = 15 cm; magnification m = −0.5 (real, inverted image, half the size of the object).
Key terms
- Focal length (f)
- The distance from the lens to the point where parallel rays converge (converging lens) or appear to diverge from (diverging lens).
- Object distance (dₒ)
- The distance from the object to the optical centre of the lens, measured in centimetres.
- Image distance (dᵢ)
- The distance from the lens to where the image forms. A positive value indicates a real image on the far side; negative indicates a virtual image on the same side as the object.
- Magnification (m)
- The ratio of image size to object size. |m| > 1 means the image is enlarged; m < 0 means the image is inverted.
- Real vs virtual image
- A real image forms where light rays actually converge and can be projected on a screen. A virtual image appears where rays seem to diverge from and cannot be projected.
Frequently asked questions
- What is the sign convention?
- Using the standard convention: distances are positive on the same side as the outgoing light (real image), negative on the same side as the incoming light (virtual image). Converging lenses have f > 0; diverging lenses f < 0.
- What happens when the object is at the focal point?
- The image distance becomes infinite (parallel outgoing rays) — no focused image forms.