What this calculator does
The thin lens equation relates three distances: the focal length of the lens, how far the object sits from it, and where the image forms. Knowing any two gives the third, which is the basis of essentially all optical design.
The sign of the result carries the meaning. A positive image distance means a real image that could be caught on a screen; a negative one means a virtual image that only appears to exist behind the lens, which is what a magnifying glass produces.
The formula
One over the focal length equals one over the object distance plus one over the image distance. Rearranging gives the image distance, and the magnification is minus the image distance divided by the object distance, with the negative sign indicating inversion.
| Term | Meaning |
|---|---|
| Focal length (f) | The distance at which the lens brings parallel light to a point. Shorter focal lengths bend light more strongly. |
| Real image | An image formed where light actually converges, which can be projected onto a screen. |
| Virtual image | An image light only appears to come from. It cannot be projected, but it can be seen by looking through the lens. |
| Magnification (m) | The ratio of image size to object size. Negative values indicate an inverted image. |
The inputs explained
| Field | What to enter |
|---|---|
| Focal length (cm) | The focal length of the lens in centimetres. Positive for a converging lens. |
| Object distance (cm) | The distance from the lens to the object, in centimetres. |
When to use it
Working out where an image forms
For a projector or camera, the object distance and focal length together fix where the sensor or screen must sit.
Understanding a magnifying glass
Placing an object closer than the focal length produces a virtual, upright, enlarged image, which is exactly how a magnifier works.
Checking a photography setup
The relationship explains why focusing on something close moves the lens further from the sensor.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How does image distance change as the object moves away?
A fixed 10 cm lens with the object at a range of distances.
| Object distance | Image distance | Magnification |
|---|---|---|
| 15 cm | 30.000 cm | -2.000× |
| 20 cm | 20.000 cm | -1.000× |
| 25 cm | 16.667 cm | -0.6667× |
| 50 cm | 12.500 cm | -0.2500× |
Questions
Why is magnification negative?
The sign indicates orientation rather than size. A negative magnification means the image is inverted, which is what a converging lens produces for any object beyond its focal length.
What happens if the object is inside the focal length?
The image distance becomes negative, meaning a virtual image forms on the same side as the object. It is upright and enlarged, which is the magnifying glass case.
What does "thin lens" mean?
It means the lens thickness is assumed negligible compared with the distances involved, so light can be treated as bending at a single plane. Real thick lenses need a more elaborate treatment, though the approximation is good for most practical work.
Why does an object at infinity focus at the focal length?
Because light from a very distant object arrives effectively parallel, and the focal length is defined as where parallel light converges. It is the limiting case of the same equation.
For how the lens itself produces that focal length, see the lensmaker’s equation calculator. For light bending at a surface, see the Snell’s law calculator.