Skip to content
DeviceCheckHub

Thin Lens Calculator

Where a lens or a curved mirror forms an image, how big it is and which way up, or the focal length from two distances, from a power in diopters or from the shape and material of a lens.

1/f = 1/dₒ + 1/dᵢ

Distances are measured from the lens or mirror. A real image has a positive distance, a virtual image a negative one.

Examples:
A converging lens with f = 10 cm and the object 30 cm away gives a real image 15 cm beyond the lens, magnification −0.5×.

dᵢ = 15 cm

Focal length f
10 cm (converging)
Optical power
10 D
Object distance dₒ
30 cm
Image distance dᵢ
15 cm
Image
real, inverted, reduced
Where the image is
on the far side of the lens
Magnification m
−0.5×
Area magnification
0.25×
Image height
−1 cm (upside down)
Object to image
45 cm
Object position
beyond 2f
Images from this lens (f = 10 cm)
Object atImage atMagnification
5 cm−10 cm2×
7.5 cm−30 cm4×
10 cminfinity—
15 cm30 cm−2×
20 cm20 cm−1×
30 cm15 cm−0.5×
50 cm12.5 cm−0.25×
100 cm11.111 cm−0.11111×

Steps

  1. 1/dᵢ = 1/f − 1/dₒ = 1/10 − 1/30 = 0.066667.
  2. dᵢ = 1 ÷ 0.066667 = 15 cm.
  3. m = −dᵢ ÷ dₒ = −15 ÷ 30 = −0.5.
  4. hᵢ = m × hₒ = (−0.5) × 2 = −1 cm.
  • A real image can be caught on a screen behind the lens, as in a camera or projector.
  • Signs: distances to real objects and images are positive, to virtual images negative; f is positive for a converging lens and negative for a diverging lens.

How to use the thin lens calculator

  1. Choose a lens, a curved mirror, or the lensmaker’s option to get a focal length from the shape of a lens.
  2. Choose what to solve for: the image distance, the object distance or the focal length.
  3. Give the lens or mirror by its focal length or its power in diopters, or a mirror by its radius of curvature, and enter the distances you know. Add the object’s height to get the image’s height.
  4. Read where the image is, whether it is real or virtual, upright or inverted, larger or smaller, the magnification, the steps, and a table of images for objects from half the focal length to ten times it.

The thin lens equation

A lens bends light by refraction at its two curved surfaces. For a thin lens, one much thinner than the radii of its surfaces, the distance of the object dₒ, the distance of the image dᵢ and the focal length f are linked by the Gaussian thin lens equation, 1/f = 1/dₒ + 1/dᵢ. In the usual sign convention a real object and a real image have positive distances, a virtual image a negative distance, and the focal length is positive for a converging (convex) lens and negative for a diverging (concave) one. The magnification is m = −dᵢ ÷ dₒ, and the height of the image is m times the height of the object; a negative m means the image is upside down.

For example, a converging lens with f = 10 cm and an object 30 cm away gives 1/dᵢ = 1/10 − 1/30, so the image is 15 cm behind the lens, with m = −0.5×: real, inverted and half the size. If you know both distances instead, the focal length follows directly: an object at 30 cm and its image at 15 cm mean f = 10 cm.

Where a converging lens puts the image

As an object comes closer to a converging lens, its image moves away from the lens and grows. At twice the focal length the image is the same size, at 2f on the other side; at the focal point the rays leave parallel and no image forms; closer than the focal point the image becomes virtual, upright and enlarged, which is how a magnifying glass works. A diverging lens always gives a smaller, upright, virtual image, wherever the object is.

A converging lens with f = 10 cm
ObjectImage atImage
Beyond 2f15 cmreal, inverted, reduced
At 2f20 cmreal, inverted, same size
Between f and 2f30 cmreal, inverted, enlarged
Inside f−10 cmvirtual, upright, enlarged
At finfinitynone

Everyday examples

A magnifying glass with f = 10 cm held 5 cm from a page gives a virtual image 10 cm away on the same side, magnified 2×. A 50 mm camera lens focused on something 1 m away has to sit 52.632 mm from the sensor, a little more than its focal length: that is why a lens moves forward to focus on close subjects. A −2 diopter eyeglass lens for a nearsighted person is a diverging lens with f = −50 cm; an object 30 cm away appears 18.75 cm away and smaller, at 0.625×.

Curved mirrors

The same equation works for spherical mirrors, with a focal length of half the radius of curvature, f = R ÷ 2. A concave mirror behaves like a converging lens: it is used in reflecting telescopes, to gather light from a small bulb into a beam in flashlights, headlamps and spotlights, and to give a magnified view of the face for shaving or makeup. A makeup mirror with f = 20 cm, 10 cm from your face, shows an upright image magnified 2×, 20 cm behind the mirror.

A convex mirror, like a diverging lens, always gives an upright, smaller, virtual image, but over a wider field of view, which is why the passenger-side mirror of a car is convex. Some countries add the warning “Objects in mirror are closer than they appear.” A convex mirror with a radius of 1 m shows a car 5 m away as an image only 45.455 cm behind the glass, at 0.090909× its size.

Diopters

Opticians give the strength of a lens as its optical power in diopters (D), 1 divided by the focal length in meters: a +10 D lens has a focal length of 10 cm and a −2 D lens one of −50 cm. Powers of thin lenses close together roughly add up, which is why an eye care professional can prescribe glasses as a simple correction to the eye’s own power. Nearsighted people get negative, diverging lenses; farsighted people get positive, converging ones, and over-the-counter reading glasses are rated from +1 to +4 D. The relaxed human eye itself has a power of about 60 D, about two-thirds of it from the cornea and the rest from the crystalline lens.

The lensmaker’s equation

The focal length of a thin lens comes from its shape and material: 1/f = (n ÷ n_medium − 1) × (1/R₁ − 1/R₂), where n is the refractive index of the lens, n_medium that of the medium around it, and R₁ and R₂ the radii of the front and back faces. A face that bulges toward the light coming in has a positive R₁; on the back face the sign is reversed. A biconvex window glass lens with both radii 10 cm has f = 9.6236 cm in air, but the same lens in water has a focal length of 35.642 cm, because water has a refractive index much closer to that of glass. A plano-convex acrylic lens with a 20 cm curved face has f = 40.936 cm. Lenses with one convex and one concave face, meniscus lenses, are the usual shape for eyeglasses because the shape reduces some aberrations.

History

The Nimrud lens, a piece of rock crystal from the 7th century BC, may or may not have been used as a magnifying glass or a burning glass. The Roman writer Seneca noted that letters, however small, look larger and clearer through a glass sphere filled with water. Eyeglasses were invented in northern Italy in the second half of the 13th century as an improvement on medieval reading stones, and lens grinding grew into an industry in Venice and Florence and later in the Netherlands and Germany.

Limits of the thin lens model

The equations assume a thin lens and rays close to the axis. A thick lens, light far from the axis and the different refractive index for each color (chromatic aberration) all move the image a little. Spherical mirrors also blur the image of distant objects, which is why telescopes use parabolic mirrors.

Your values stay on your device

Everything is worked out in your browser. Nothing you type is sent anywhere or stored. For how light bends at a single surface, see the Snell’s law calculator.

Frequently asked questions

What is the thin lens equation?

1/f = 1/dₒ + 1/dᵢ, where f is the focal length, dₒ the distance from the object to the lens and dᵢ the distance from the lens to the image. With f = 10 cm and the object 30 cm away, 1/dᵢ = 1/10 − 1/30, so the image forms 15 cm behind the lens.

How do I find the magnification?

m = −dᵢ ÷ dₒ, and the image height is m times the object height. A negative m means the image is upside down. In the example above m is −0.5×: half the size and inverted.

Does the same equation work for mirrors?

Yes. The mirror equation is the same, 1/f = 1/dₒ + 1/dᵢ, with f = R ÷ 2, positive for a concave mirror and negative for a convex one. A positive image distance means a real image in front of the mirror, a negative one a virtual image behind it.

What does a negative image distance mean?

A virtual image: the light only seems to come from it, so it cannot be caught on a screen. For a lens it is on the same side as the object; for a mirror it is behind the mirror.

How do diopters relate to focal length?

Optical power in diopters is 1 divided by the focal length in meters. A −2 D eyeglass lens has a focal length of −50 cm; a +10 D lens has f = 10 cm.

Is anything I type sent anywhere?

No. Everything is worked out in your browser, and nothing you type is sent anywhere or stored.

Last updated · About DeviceCheckHub