# Thin Lens Equation Calculator

> Solve the thin lens equation 1/f = 1/do + 1/di for image distance, object distance or focal length, with magnification, image type and lens power.

Category: Science & engineering · Applies to: Worldwide · Last updated: 2026-10-29
Interactive calculator: https://calculators.geekmidst.com/calculators/optical-lens-equation-calculator

For a thin lens, 1/f = 1/do + 1/di links focal length, object distance and image distance. Enter two and get the third, plus how large the image is and whether it is real or virtual.

Also called: Lens formula calculator, Lensmaker image calculator.

## Inputs
- Find (options: Image distance, Object distance, Focal length; default image)
- Focal length f (unit cm; default 10)
- Object distance do (unit cm; default 30)
- Image distance di (unit cm; default 15)

## Results
- Image distance di
- Object distance do
- Focal length f
- Magnification m = −di/do
- Image
- Lens power

## Formula

```
1/f = 1/do + 1/di;  m = −di ÷ do;  P (dioptres) = 1 ÷ f (in metres)
```

Where:
- f: focal length (+ converging, − diverging)
- do: object distance from the lens
- di: image distance (+ real, − virtual)
- m: magnification (negative = inverted)
- P: optical power in dioptres

## Worked example
1. 1/di = 1/f − 1/do = 1/10 − 1/30 = 2/30.
2. di = 30 ÷ 2 = 15 cm.
3. m = −15 ÷ 30 = −0.5, so the image is inverted and half size.
4. P = 1 ÷ 0.10 m = 10 D.

**Result:** An object 30 cm from a 10 cm converging lens forms a real, inverted, half-size image 15 cm behind the lens.

## What the result means

A positive image distance means a real image you can project on a screen; a negative one means a virtual image seen by looking through the lens, as with a magnifying glass. All three distances must use the same unit; lens power assumes centimetres.

## Assumptions and limits
- Thin lens in air, paraxial (small-angle) rays, real-is-positive sign convention.
- Distances are in centimetres for the dioptre output.
- Thick lenses, lens systems and large-angle rays need principal planes or ray tracing.
- Virtual objects (from a preceding lens) are not handled.

## Questions

### What if the object is exactly at the focal point?

The rays leave parallel and the image is at infinity, so there is no finite answer.

### Which sign convention is this?

Real-is-positive: object distance positive on the incoming side, image distance positive on the far side, converging focal lengths positive.

## Related calculators
- [Frequency and Wavelength Calculator](https://calculators.geekmidst.com/calculators/frequency-wavelength-calculator)
- [Photon Energy Calculator](https://calculators.geekmidst.com/calculators/photon-energy-calculator)

Source: GM¹X CalcVerse — https://calculators.geekmidst.com/calculators/optical-lens-equation-calculator
