Connect via MCP →

Enter Calculation

Enter any two of the three values (focal length, object distance, image distance). Leave the unknown blank or 0. Use the same length unit (cm or m) for all.

Formula

Show calculation steps (2)
  1. Magnification

    Magnification: Thin Lens Equation Calculator

    m = magnification (negative means inverted image).

  2. Lens Power

    Lens Power: Thin Lens Equation Calculator

    Optical power is the reciprocal of focal length.

Advertisement

Results

Image Distance (dᵢ)
30
length units
Focal length (f) 10
Object distance (dₒ) 15
Image distance (dᵢ) 30
Magnification (M = -dᵢ/dₒ) -2
Optical power (1/f) 0.1

What is the Thin Lens Equation Calculator?

This calculator solves the classic thin lens equation, \(\frac{1}{f} = \frac{1}{d_o} + \frac{1}{d_i}\), which links the focal length of a lens (\(f\)) to the distance of an object from the lens (\(d_o\)) and the distance of the resulting image (\(d_i\)). It also computes the linear magnification \(M = -\frac{d_i}{d_o}\) and the optical power \(P = \frac{1}{f}\). It works for both converging (positive \(f\)) and diverging (negative \(f\)) lenses under the thin-lens approximation, where the lens thickness is negligible compared with the distances involved.

How to use it

Enter any two of the three quantities and leave the third blank (or zero). The calculator solves for the missing value. Always use the same length unit for all three values — centimetres or metres. Follow the sign convention: object distances are positive on the incoming-light side, real images have positive \(d_i\), and virtual images have negative \(d_i\).

The formula explained

Rearranging $$\frac{1}{f} = \frac{1}{d_o} + \frac{1}{d_i}$$ lets you isolate any term. For the image distance: \(\frac{1}{d_i} = \frac{1}{f} - \frac{1}{d_o}\), so \(d_i = \frac{1}{\frac{1}{f} - \frac{1}{d_o}}\). The magnification compares image and object size; \(|M| > 1\) means the image is enlarged, and a negative \(M\) means the image is inverted.

Advertisement
Ray diagram of a converging lens showing object distance, image distance and focal points
Ray diagram of a converging lens defining object distance d_o, image distance d_i and focal length f.

Worked example

A converging lens has \(f = 10\ \text{cm}\) and an object sits \(d_o = 15\ \text{cm}\) away. Then $$\frac{1}{d_i} = \frac{1}{10} - \frac{1}{15} = 0.1 - 0.0667 = 0.0333,$$ so \(d_i = 30\ \text{cm}\). The magnification is \(M = -\frac{30}{15} = -2\), meaning the image is real, inverted and twice the object size.

Comparison of converging and diverging lens shapes with their sign conventions
Converging (positive f) and diverging (negative f) lenses and their sign conventions.

FAQ

What does a negative focal length mean? It indicates a diverging (concave) lens, which always forms a reduced, upright, virtual image.

What if my image distance comes out negative? A negative \(d_i\) signals a virtual image formed on the same side as the object.

Does this work for mirrors too? The mirror equation has the same form, but sign conventions differ; this tool is set up for thin lenses.

Last updated: