Thin Lens Equation Calculator
Enter a focal length and an object distance to get the image distance and magnification — and see whether the image is real or virtual, enlarged or shrunk, upright or inverted.
Image and magnification at once
Enter the focal length and object distance and the calculator returns the image distance dᵢ and the magnification m together.
Mind the signs
A converging (convex) lens has a positive focal length; a diverging (concave) lens has a negative one. Keep every length in the same unit.
What is the thin lens equation?
Where an image forms and how big it is
The thin-lens equation links three quantities of an ideal lens: the focal length f, the object distance dₒ, and the image distance dᵢ. They satisfy 1/f = 1/dₒ + 1/dᵢ, which rearranges to dᵢ = (f × dₒ) / (dₒ − f). Once you know where the image forms, the magnification m = −dᵢ/dₒ tells you its size relative to the object and whether it is upright or inverted. This calculator turns two measurements — the focal length and the object distance — into the image distance and the magnification, the same numbers a camera, a projector, or a magnifying glass quietly relies on.
Enter a focal length and an object distance to get the image distance in the same unit and the magnification instantly.
The image distance comes from rearranging the thin-lens equation, and the magnification is minus the ratio of image distance to object distance.
dᵢ = (f × dₒ) / (dₒ − f)The denominator (dₒ − f) carries the physics: as the object approaches the focal point the denominator shrinks, the image distance grows, and at dₒ = f the image races off to infinity. The magnification m = −dᵢ/dₒ then follows directly. Keep the focal length and object distance in the same unit and the image distance comes back in that unit, with the magnification a pure number.
Suppose a converging lens has a focal length of 10 cm and an object sits 30 cm in front of it.
Subtract to get the denominator
30 − 10 = 20 — the term (dₒ − f) that sets the image distance.
Multiply and divide
(10 × 30) / 20 = 300 / 20 = 15 cm — the image distance dᵢ. A positive value means a real image on the far side of the lens.
Find the magnification
m = −dᵢ/dₒ = −15/30 = −0.5 — the image is half the size of the object and inverted.
The two outputs answer two questions: where the image is and what it looks like. The image distance dᵢ tells you the location. A positive value (15 cm in the example) means a real image on the far side of the lens — the kind you can catch on a screen, as a projector or a camera sensor does. A negative value means a virtual image on the same side as the object; you cannot project it, but you can see it by looking through the lens, exactly what happens with a magnifying glass held close to a page. The magnification m fills in the rest. Its size, |m|, says whether the image is enlarged (|m| > 1) or shrunk (|m| < 1), and its sign says whether the image is upright (positive) or inverted (negative). So m = −0.5 means a half-size, upside-down image, while m = 2 would mean a double-size, upright one. Reading the two numbers together — sign of dᵢ for real versus virtual, sign and size of m for orientation and scale — fully describes the image the lens produces.
The equation is exact for an idealised lens, but a few practical points are worth keeping in mind.
Thin-lens idealisation and the sign convention
This calculator assumes a thin lens — one whose thickness is negligible next to its focal length — and ignores aberrations, lens thickness, and the wave nature of light. It uses the convention where a converging lens has a positive focal length and a diverging lens a negative one, with the object distance positive in front of the lens. Enter the focal length with the correct sign, keep all lengths in the same unit, and remember that dₒ = f has no finite answer because the image forms at infinity.