Lens Equation Calculator: Thin Lens Formula and Magnification
The thin lens equation, 1/f = 1/do + 1/di, relates the focal length of a lens to the object distance and the resulting image distance. Derived from geometric optics under the paraxial (small-angle) approximation, it governs the behaviour of every optical instrument from reading glasses to space telescopes. A converging lens (positive focal length) focuses parallel light to a real focal point and can project real, inverted images onto screens. A diverging lens (negative focal length) spreads light and always produces virtual, upright, reduced images regardless of where the object is placed. Magnification, m = -di/do, tells you both the size ratio and orientation: a negative value means the image is inverted, a value whose magnitude exceeds one means it is enlarged. This calculator solves for image distance di, computes magnification m, and classifies the image as real or virtual, inverted or upright, and magnified, reduced, or the same size. Enter focal length and object distance below to get instant results.
Image distance: -- cm
JavaScript is required for live calculations.
The thin lens equation
The standard form of the thin lens (or lensmaker's) equation is:
1/f = 1/do + 1/di
Rearranging to solve for image distance:
di = (f × do) / (do - f)
Magnification is defined as:
m = -di / do
Image classification rules
| Condition | Interpretation |
|---|---|
| di > 0 | Real image (opposite side from object) |
| di < 0 | Virtual image (same side as object) |
| m < 0 | Image is inverted |
| m > 0 | Image is upright |
| |m| > 1 | Image is magnified (larger than object) |
| |m| < 1 | Image is reduced (smaller than object) |
| |m| = 1 | Image is the same size as object |
Object position effects for a converging lens
- Object beyond 2f: real, inverted, reduced image between f and 2f on far side.
- Object at 2f: real, inverted, same-size image at 2f on far side.
- Object between f and 2f: real, inverted, magnified image beyond 2f on far side.
- Object at f: no image formed (rays emerge parallel).
- Object inside f: virtual, upright, magnified image on same side as object.
Lens power in dioptres
In optics and optometry, lens power P (in dioptres) = 1/f where f is in metres. A converging lens with f = 0.25 m has P = +4.00 D. A diverging lens with f = -0.50 m has P = -2.00 D. When two thin lenses are placed in contact their powers add: P_total = P1 + P2.
Frequently asked questions
What is the difference between a converging and a diverging lens?
A converging (convex) lens has a positive focal length and bends parallel light rays inward to meet at the focal point. It can form real images on the far side of the lens. A diverging (concave) lens has a negative focal length and spreads light rays outward so they appear to diverge from a point on the same side as the object. Diverging lenses always produce virtual, upright, reduced images.
What makes an image real versus virtual?
A real image forms where light rays physically converge after passing through the lens. It can be projected onto a screen and always appears on the opposite side of the lens from the object. A virtual image forms where rays appear to diverge from when extended backward; it cannot be projected onto a screen and appears on the same side as the object. In this calculator, a positive image distance (di) indicates a real image; a negative di indicates a virtual image.
How does the magnification sign convention work?
Magnification m = -di/do. A negative magnification means the image is inverted (upside down) relative to the object, which is the case for real images from a converging lens when the object is beyond the focal point. A positive magnification means the image is upright. The absolute value tells you the size ratio: |m| greater than 1 means the image is larger than the object, while |m| less than 1 means it is smaller.
What are the practical applications of thin lens optics?
The thin lens equation underlies the design of cameras (focusing systems), corrective eyeglasses and contact lenses, telescopes, microscopes, projectors, and magnifying glasses. In ophthalmology, lens power in dioptres equals 1/f (in metres). A +2.00 D corrective lens has a focal length of 0.50 m.
What happens when the object is placed at the focal point?
When the object distance equals the focal length (do = f), the denominator (do - f) equals zero and the image distance becomes undefined (mathematically infinite). In practice this means the refracted rays emerge parallel and never converge to form an image. This configuration is used in collimating lenses to produce parallel light beams from a point source.