The formula
Thin lens equation: 1/f = 1/dₒ + 1/dᵢ
Image distance dᵢ = 1 ÷ (1/f − 1/dₒ); focal length f = dₒdᵢ ÷ (dₒ + dᵢ)
Magnification m = −dᵢ ÷ dₒ = image height ÷ object height
Lens power (dioptres) = 1 ÷ f (in metres)
Worked example
- A 50 mm converging lens with an object 150 mm away:
- 1/dᵢ = 1/50 − 1/150 = 2/150, so dᵢ = 75 mm.
- m = −75 ÷ 150 = −0.5: the image is real, inverted and half size.
- A 20 mm tall object gives a −10 mm (inverted) image. The lens power is 1 ÷ 0.05 = 20 dioptres.
The thin lens equation
The thin lens equation links a lens's focal length to the distances of an object and its image: 1/f = 1/dₒ + 1/dᵢ. It applies to any lens whose thickness is small compared with these distances, which covers most practical problems in school physics, photography and simple optics. Given any two of the three values, you can find the third. The calculator also works out the magnification and image height and tells you what kind of image forms.
Sign conventions
Physics courses use slightly different sign conventions, so check yours. In the common real-is-positive convention used here, the focal length of a converging (convex) lens is positive and that of a diverging (concave) lens is negative. Object distances are positive for real objects. A positive image distance means a real image on the opposite side of the lens, where it can be projected on a screen; a negative image distance means a virtual image on the same side as the object, which can only be seen by looking through the lens.
Magnification and image type
Magnification is the ratio of image height to object height, and also equals −dᵢ/dₒ. A negative magnification means the image is upside down. For a converging lens, an object further away than twice the focal length gives a smaller, inverted, real image, as in a camera or the eye. Between f and 2f the real image is larger, as in a projector. Inside the focal length, the lens forms a larger, upright virtual image: this is how a magnifying glass works. Diverging lenses always form smaller, upright virtual images.
Lens power and glasses
Optometrists describe lenses by their power in dioptres, the reciprocal of the focal length in metres. A +2.00 D reading-glasses lens has a focal length of 50 cm, and a −4.00 D lens for short-sightedness has a focal length of −25 cm. Powers of thin lenses in contact add together, which makes dioptres convenient for combining lenses. The human eye's lens system has a total power of about 60 dioptres when relaxed.
Cameras and photography
In a camera, the image distance is the distance from the lens to the sensor. Focusing on a distant subject puts the image at the focal length, while focusing closer moves the lens further from the sensor. A 50 mm lens focused at 1 m must be about 52.6 mm from the sensor. Macro photography reaches magnifications of 1× or more, where image and object distances are both twice the focal length. For depth of field and focus distances, see our depth of field calculator.
A magnifying glass example
A magnifying glass with a 100 mm focal length held 80 mm from a stamp forms a virtual image at 1 ÷ (1/100 − 1/80) = −400 mm, so the image appears 40 cm away on the same side as the stamp, magnified 5× and upright. Moving the lens slightly closer to the stamp brings the image closer and reduces the magnification. Maximum comfortable magnification comes when the image is at about 25 cm, the closest distance most eyes can focus on comfortably.
Related optics tools
Telescopes and microscopes combine lenses: the objective forms an image that the eyepiece magnifies. Our telescope calculator handles magnification, field of view and exit pupil. For how light intensity falls with distance from a source, use the inverse square law calculator. To compare camera sensor sizes and equivalent focal lengths, see the aspect ratio and crop factor calculator.