Thin Lens Equation Calculator

Image distance15.00 cm
Magnification-0.50x
Image characterReduced and inverted
How this was calculated
  1. Thin lens equation: 1/f = 1/do + 1/di, so 1/di = 1/10 − 1/30, giving di = 15.00 cm.
  2. Magnification m = −di ÷ do = -0.50x; the negative sign means the image is inverted relative to the object.
  3. A positive image distance puts a real image on the far side of the lens, where a screen can catch it: reduced and inverted.

This thin lens equation calculator solves the thin lens equation, 1/f = 1/do + 1/di, for any one of the three variables when you provide the other two. Distances are measured from the lens, and the sign convention treats real images—formed on the opposite side from the object—as positive. The calculator also gives the magnification m = -di / do, where a negative m means an inverted image and an absolute value above 1 means the image is enlarged. For example, with f = 10 cm and an object at 30 cm, it finds di = 15.00 cm and m = -0.50x, a real, inverted, half-size image. If you instead provide an object at 30 cm and an image at 15 cm, it returns f = 10.00 cm, equal to a lens power of 10.00 dioptres—the unit opticians use for glasses and contact lenses, defined as 1 divided by f in metres.

The thin lens equation is the accepted standard for single-lens calculations in air because it captures the direct geometric relationship between focal length, object distance, and image distance that governs image formation. It does assume a thin lens in air; thick lenses need principal-plane corrections. An object exactly at the focal point images at infinity, while inside the focal length no real image forms and the lens acts as a magnifier, giving a virtual, upright image with a negative di. This page presents the formula, walks through step-by-step workings, and includes worked examples such as placing the image at 30 cm with f = 10 cm, which requires the object at 15.00 cm and yields m = -2.00x—the projector arrangement—along with sources.

Worked examples

Where the image lands

Primary result: 15.00 cm — a 10 cm lens with the object at 30 cm focuses at 15 cm, at magnification -0.50x. (Image distance · 10 cm · 30 cm · 15 cm)

Image distance15.00 cm
Magnification-0.50x
Image characterReduced and inverted

Identifying an unknown lens

Primary result: 10.00 cm — an object at 30 cm imaging at 15 cm pins the focal length to 10 cm — a 10-diopter lens. (Focal length · 10 cm · 30 cm · 15 cm)

Focal length10.00 cm
Magnification-0.50x
Lens power10.00 dioptres

Setting up a projector

Primary result: 15.00 cm — to throw the image to 30 cm with a 10 cm lens, the object sits at 15 cm and the image doubles: magnification -2.00x. (Object distance · 10 cm · 30 cm · 30 cm)

Object distance15.00 cm
Magnification-2.00x
Image characterEnlarged and inverted

The equation and the sign convention

The thin lens equation relates three distances measured from the lens itself: focal length f, object distance do, and image distance di. The relationship is 1/f = 1/do + 1/di. Our thin lens equation calculator uses the real-is-positive sign convention: real images, formed on the opposite side of the lens from the object, are positive. A negative di indicates a virtual image on the same side as the object.

Using reciprocals keeps the algebra straightforward. Because the equation is written in terms of 1/f, 1/do, and 1/di, you can rearrange and solve for any one unknown using simple addition and subtraction rather than complicated multiplication. For example, with f = 10 cm and an object at 30 cm, you get 1/di = 1/10 - 1/30, so di = 15.00 cm. Going the other direction, an object at 30 cm and an image at 15 cm give 1/f = 1/30 + 1/15, so f = 10.00 cm. To place the image at 30 cm with f = 10 cm, the object must sit at 15.00 cm — the projector arrangement.

Magnification follows from the image and object distances: m = -di / do. A negative m means an inverted image, and an absolute value above 1 means enlarged. In the first example above, m = -0.50x, describing a real, inverted, half-size image. In the projector arrangement, m = -2.00x, so the image is real, inverted, and twice the size of the object.

Two special cases round out the behavior. An object exactly at the focal point images at infinity. Inside the focal length, no real image forms and the lens acts as a magnifier, giving a virtual, upright image (negative di). The equation assumes a thin lens in air; thick lenses need principal-plane corrections.

  • Lens power in dioptres is 1 / f in metres — the unit opticians use for glasses and contact lenses. In the example where f = 10.00 cm (0.10 m), the lens power is 10.00 dioptres.
The sign convention matters as much as the numbers. A positive di means the image is real and forms on the opposite side of the lens from the object; a negative di means the image is virtual and forms on the same side as the object. Getting the sign right is what keeps magnification and orientation correct.

The worked examples

The worked examples below walk through the three core cases a thin lens equation calculator handles: solving for image distance, focal length, and object distance. Each example uses the thin lens equation 1/f = 1/do + 1/di, with all distances measured from the lens. The sign convention treats real images — those formed on the opposite side from the object — as positive.

Example 1 — Solve for image distance. With a focal length of 10 cm and an object placed 30 cm from the lens, substitute into the equation: 1/di = 1/f − 1/do = 1/10 − 1/30. Find a common denominator: 1/10 − 1/30 = 3/30 − 1/30 = 2/30, so 1/di = 1/15 and di = 15.00 cm. The positive value confirms a real image on the opposite side from the object. Magnification is m = −di / do = −15 / 30 = −0.50x. The negative sign means the image is inverted, and the absolute value of 0.50 means it is half the size of the object.

Example 2 — Solve for focal length. When an object sits 30 cm from the lens and a real image appears 15 cm from the lens, add the reciprocals: 1/f = 1/do + 1/di = 1/30 + 1/15. Convert to a common denominator: 1/30 + 2/30 = 3/30, so 1/f = 1/10 and f = 10.00 cm. To express this as lens power in dioptres, divide 1 by the focal length in metres: 1 / 0.10 m = 10.00 D. Dioptres are the unit opticians use for glasses and contact lenses.

Example 3 — Solve for object distance. To place the image 30 cm from a lens whose focal length is 10 cm, rearrange the equation: 1/do = 1/f − 1/di = 1/10 − 1/30 = 2/30, so do = 15.00 cm. The magnification is m = −di / do = −30 / 15 = −2.00x. The image is real, inverted, and twice the size of the object — the classic projector arrangement.

Two boundary cases are worth noting. An object placed exactly at the focal point images at infinity, because 1/di becomes zero and no finite image forms. Inside the focal length, no real image forms at all; the lens acts as a magnifier and produces a virtual, upright image, shown by a negative di. All of these results assume a thin lens in air. Thick lenses require principal-plane corrections before the same equation gives accurate distances.

Magnification and image character

Once your thin lens equation calculator returns an image distance, the magnification tells you what the image actually looks like. Magnification m equals -di divided by do, so the sign and size of that ratio reveal the image's character in one step. A negative m means the image is inverted, while an absolute value above 1 means the image is enlarged. The thin lens equation uses the sign convention that real images, formed on the opposite side of the lens from the object, carry a positive image distance. Virtual images, by contrast, produce a negative di.

Three worked examples show how the numbers map onto what you see. With f = 10 cm and an object at 30 cm, the equation gives 1/di = 1/10 - 1/30, so di = 15.00 cm and m = -0.50x — a real, inverted, half-size image. Swapping the known quantities so the object sits at 30 cm and the image at 15 cm gives 1/f = 1/30 + 1/15, so f = 10.00 cm, a lens power of 10.00 dioptres. To place the image at 30 cm with f = 10 cm, the object must sit at 15.00 cm, and m = -2.00x — the projector arrangement that doubles the object's size on the screen.

The focal point marks the boundary between real and virtual image formation. An object exactly at the focal point images at infinity, so no finite image distance exists. Inside the focal length no real image forms; the lens acts as a magnifier, giving a virtual, upright image with a negative di. This is the arrangement behind simple magnifying lenses and the eyepiece side of optical instruments.

Keep the limits of the model in mind. The equation assumes a thin lens in air, and thick lenses need principal-plane corrections before the same math applies. Lens power in dioptres is 1 divided by f in metres — the unit opticians use for glasses and contact lenses — so converting centimetres to metres before taking the reciprocal keeps the dioptre value consistent with the thin lens equation calculator output.

ExamplemOrientationSizeReal / Virtual
f = 10 cm, object at 30 cm-0.50xInvertedHalf-sizeReal
Object at 30 cm, image at 15 cm (f = 10.00 cm)Not specifiedNot specifiedNot specifiedNot specified
Image at 30 cm, f = 10 cm, object at 15.00 cm-2.00xInvertedEnlargedReal
An object exactly at the focal point images at infinity; inside the focal length the lens acts as a magnifier, producing a virtual, upright image (negative di).

Limits of the thin lens model

A thin lens equation calculator is a convenient tool, but the underlying formula rests on simplifying assumptions that break down in real optical systems. The equation 1/f = 1/do + 1/di treats the lens as a single refracting surface with no thickness, and it relies on the paraxial approximation, meaning rays stay close to the optical axis and make only small angles with it. Under these conditions the model works well: for example, with f = 10 cm and an object at 30 cm, it gives di = 15.00 cm and m = -0.50x, correctly describing a real, inverted, half-size image. The same logic lets you recover that a lens producing an image at 15 cm from an object at 30 cm has f = 10.00 cm, or 10.00 dioptres of power.

Real lenses, however, have finite thickness. Light refracts at two curved surfaces separated by glass, so the simple distances measured from a single lens plane no longer hold. Thick lenses require principal-plane corrections, where measurements are taken from specific principal planes rather than the physical center of the lens. A standard thin lens equation calculator will not account for this separation, so results drift when the lens thickness becomes a meaningful fraction of the object or image distance. Multi-element systems, such as camera lenses, compound the issue because each element introduces its own thickness and spacing.

The model also assumes a single refractive index, ignoring how glass bends different wavelengths by different amounts. In reality, blue light refracts more strongly than red light, so a single lens focuses each color at a slightly different point. This chromatic aberration means the focal length f is not truly constant across the spectrum, yet the equation treats it as one fixed value. The result is that images formed by simple lenses often show colored fringing that the thin lens model cannot predict or describe.

Finally, the equation assumes the lens sits in air. If the surrounding medium changes, the refractive power changes as well, and the straightforward relationship between focal length and lens geometry no longer applies. For most everyday calculations involving glasses, contact lenses, or basic optics problems, these limits do not cause trouble. Lens power in dioptres, defined as 1 divided by f in metres, remains the standard opticians use because the thin lens model is accurate enough for prescription lenses. But anyone designing precision optics should treat the equation as a starting point rather than a complete description.

FAQs

What is the thin lens equation?

The thin lens equation is 1/f = 1/do + 1/di. The focal length, object distance, and image distance of a thin lens are linked by reciprocals. This relationship lets you solve for any one value when the other two are known, making it a core tool in optics for analyzing how lenses form images.

What does a negative image distance mean?

A negative image distance means a virtual image on the same side as the object. This is the magnifying-glass case, which cannot be projected on a screen. The light rays appear to come from the image location but never actually pass through it, so you see the image by looking through the lens.

What is a dioptre?

A dioptre is a unit of lens power, calculated as 1 divided by the focal length in metres. For example, a 10 cm lens is 10.00 dioptres. Dioptres provide a convenient way to express how strongly a lens converges or diverges light, and they are commonly used in eyeglass prescriptions.

How is magnification calculated?

Magnification is calculated using m = -di / do. A negative value means the image is inverted relative to the object. The size ratio is the absolute value, which tells you how much larger or smaller the image is compared to the original object.

What happens with the object at the focal point?

When the object is placed at the focal point, the image forms at infinity. The lens outputs parallel rays, which is the searchlight and collimator arrangement. No image is produced at a finite distance because the refracted rays never converge, making this setup useful for creating a directed beam of light.

Real vs virtual image — what is the difference?

Real images form where rays actually converge and can land on a screen. Virtual images are where rays only appear to diverge from. A real image is physically projected at a location, while a virtual image is perceived by the eye but has no actual physical presence where the light gathers.

Sources

Related calculators

Magnification Calculator
Magnifying power two ways: telescope magnification and exit pupil from focal lengths and aperture, or a magnifying glass's rated power from its focal length.
Snell's Law Calculator
Refraction at a boundary: the refracted angle from both refractive indices and the angle of incidence — and an honest total-internal-reflection answer when no refracted ray exists.
Critical Angle Calculator
The critical angle for total internal reflection between two media — glass, water or diamond into air — from their refractive indices.
Diffraction Grating Calculator
The angles at which a diffraction grating sends each order of a given wavelength — and the highest order the grating can produce for that light.