Skip to content

Thin Lens Calculator

Solve the thin lens and mirror equations for image distance, object distance or focal length, with magnification, a ray diagram, the lensmaker’s equation and dioptres.

Calculator Details

Image distance:15 cmSee results ↓

A thin lens, a spherical mirror, or design a lens from its surfaces (lensmaker’s equation)

Image distance, object distance or focal length

Unit for every distance and height

Positive for a converging (convex) lens or concave mirror, negative for a diverging lens or convex mirror

From the object to the lens or mirror; positive for a real object

Height of the object; the image height follows from the magnification

Your Results

Image distance: 15 cm

Image distance

15 cm

real, inverted, smaller

Magnification

−0.5×

Image height −1 cm

Optical power

10 D

Converging

With f = 10 cm, an object 30 cm from the lens forms a real, inverted image 15 cm behind the lens, magnified -0.5× (smaller).

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Detailed Breakdown

Black: object. Amber: image (solid, real). Dots: focal points. Ray 1 (first colour) leaves parallel to the axis; ray 2 goes through the centre of the lens. Dashed rays are backward extensions.
Lens or mirror values (real-is-positive sign convention)
QuantityValue
Focal length f10 cm
Object distance dₒ30 cm
Image distance dᵢ15 cm (real)
Magnification m = −dᵢ/dₒ−0.5 (inverted, smaller)
Image height−1 cm
Power 1/f10 D

How This Calculator Works

How It’s Calculated

1/f = 1/dₒ + 1/dᵢ · m = −dᵢ/dₒ = hᵢ/hₒ · mirror: f = R/2
Lensmaker: 1/f = (n_lens/n_medium − 1)(1/R₁ − 1/R₂) · Power P = 1/f (f in metres, P in dioptres)

Your calculation: 1/dᵢ = 1/f − 1/dₒ = 1/10 − 1/30, so dᵢ = 15 cm and m = −15/30 = −0.5.

Signs: f is positive for converging lenses and concave mirrors; dᵢ is positive for a real image (behind a lens, in front of a mirror) and negative for a virtual one; a negative m means the image is upside down.

Frequently Asked Questions

What is the thin lens equation?

1/f = 1/dₒ + 1/dᵢ, linking the focal length f, the object distance dₒ and the image distance dᵢ. A 10 cm converging lens with an object 30 cm away forms an image at 15 cm, magnified -0.5× (inverted and half size). The same equation works for spherical mirrors.

What do the signs mean?

In the real-is-positive convention used here, f is positive for converging (convex) lenses and concave mirrors and negative for diverging lenses and convex mirrors. A positive dᵢ is a real image you could project on a screen; a negative dᵢ is a virtual image seen through the lens or in the mirror. A negative magnification means the image is upside down.

When is the image the same size as the object?

When the object is at twice the focal length. A 10 cm lens with the object at 20 cm forms an image at 20 cm with magnification -1: real, inverted and the same size. Closer than 2f the image grows; farther away it shrinks.

How does a magnifying glass work?

Put the object inside the focal length of a converging lens. With f = 10 cm and the object at 5 cm, the image is virtual at -10 cm, upright and 2× larger. Your eye sees this enlarged virtual image through the lens.

Why do diverging lenses and convex mirrors always give small upright images?

They spread light out, so the rays from a real object never meet; their backward extensions form a virtual, upright, reduced image. A −15 cm lens with an object at 30 cm gives an image at -10 cm, 0.3333× the size. A convex mirror with f = −20 cm shows a car 30 cm away at 0.4× size, which is why “objects in mirror are closer than they appear”.

What is the lensmaker’s equation?

It gives a thin lens’s focal length from its shape and material: 1/f = (n_lens/n_medium − 1)(1/R₁ − 1/R₂). A biconvex crown-glass lens with 20 cm radii has f = 19.25 cm in air, but 71.28 cm under water, because glass bends light much less relative to water than to air.

What is a dioptre?

The unit of optical power: 1 ÷ focal length in metres. A 40 cm reading lens is 2.5 D; a −0.5 m lens for short sight is −2 D. Eyeglass prescriptions give the sphere (and cylinder for astigmatism) in dioptres, and powers of thin lenses in contact simply add.

When is the thin lens approximation not good enough?

When the lens is thick compared with its focal length, when rays are far from the axis or steeply angled (spherical aberration), or when colours focus differently (chromatic aberration). Camera and microscope lenses use several elements and are designed with ray tracing rather than this equation.

Uses the thin lens and spherical mirror equations with the real-is-positive sign convention and the thin-lens lensmaker’s equation (OpenStax University Physics Vol. 3 ch. 2), with refractive indices for 589 nm light from OpenStax Table 1.1. It treats rays as paraxial (close to the axis) and lenses as thin. It leaves out lens thickness, spherical and chromatic aberration, systems of several lenses, and eye-specific corrections such as vertex distance; eyeglass prescriptions come from an optometrist, not from this calculator.

Thin Lens Calculator: Lens and Mirror Equations, Magnification and Ray Diagram

By FindMySum · Last reviewed

Lenses and curved mirrors form images by bending or reflecting light so that rays from each point of an object meet again, or appear to. One short equation describes where that happens. This thin lens calculator solves it for the image distance, the object distance or the focal length of a lens or a spherical mirror, gives the magnification and the image's size and orientation, and draws a ray diagram. A third mode, the lensmaker's equation, works out a lens's focal length from the curvature of its surfaces and the glass it is made of.

The thin lens and mirror equation

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

  • f is the focal length: where parallel rays meet (or seem to come from) after the lens or mirror
  • dₒ is the distance from the object to the lens or mirror
  • dᵢ is the distance from the lens or mirror to the image

The magnification is m = −dᵢ ÷ dₒ, and the image height is m times the object height. The same equation works for spherical mirrors, where f is half the radius of curvature, R ÷ 2.

Sign convention

The calculator uses the real-is-positive convention from OpenStax University Physics.

  • f > 0 for a converging (convex) lens or a concave mirror; f < 0 for a diverging (concave) lens or a convex mirror.
  • dᵢ > 0 is a real image: behind a lens, or in front of a mirror, where light actually converges and a screen would show it.
  • dᵢ < 0 is a virtual image: on the object's side of a lens, or behind a mirror.
  • m < 0 means inverted; |m| > 1 means larger than the object.

Worked example: a 10 cm lens

The calculator opens with a converging lens of focal length 10 cm and an object 2 cm tall, 30 cm in front of it.

  • 1/dᵢ = 1/10 − 1/30 = 2/30, so dᵢ = 15 cm
  • m = −15 ÷ 30 = −0.5
  • Image height = −0.5 × 2 = −1 cm

The image is real, 15 cm behind the lens, upside down and half size, which is what a camera or your eye does with a distant scene. Its power is 1 ÷ 0.10 m = 10 dioptres. Move the object to 20 cm, twice the focal length, and the image moves to 20 cm at the same size. Move it to 5 cm, inside the focal length, and dᵢ becomes −10 cm: a virtual, upright image twice the size, which is how a magnifying glass works.

The ray diagram

The diagram draws two principal rays from the top of the object. Ray 1 travels parallel to the axis, then bends through the far focal point (for a converging lens) or away from the near one (diverging). Ray 2 passes straight through the centre of the lens, or reflects off the mirror's centre at an equal angle. Where the outgoing rays cross is the real image. If they spread apart instead, dashed lines trace them backward to where they appear to come from, the virtual image. The dots mark the focal points.

Mirrors

Choose the mirror mode for a concave (f > 0) or convex (f < 0) mirror. A concave mirror with f = 10 cm and an object at 15 cm forms a real, inverted image 30 cm in front of it, twice the size: the principle of a shaving mirror or a reflecting telescope. A convex mirror always gives a small, upright, virtual image, which is why it is used on cars and in shops to show a wide view. The radius of curvature is shown as R = 2f.

The lensmaker's equation

A thin lens's focal length depends on its two surface radii and on how much more strongly the glass bends light than its surroundings do:

1/f = (n_lens ÷ n_medium − 1)(1/R₁ − 1/R₂)

R₁ is the surface the light meets first. A radius is positive when its centre of curvature lies on the side the light exits toward, so a biconvex lens has R₁ > 0 and R₂ < 0; enter 0 for a flat surface. With crown glass (n = 1.52) and radii of 20 cm and −20 cm, f = 19.2 cm in air. Under water (n = 1.333) the same lens has f = 71.3 cm, which is why your eyes cannot focus well underwater and why a diver's mask restores a layer of air.

Dioptres and eyeglasses

Optical power, P = 1/f with f in metres, is measured in dioptres (D). Converging lenses for long sight or reading have positive power; diverging lenses for short sight have negative power. A prescription of −2.00 D means a lens with a focal length of −50 cm. For thin lenses in contact, powers add.

Limits

The equations are for thin lenses and paraxial rays, those close to and nearly parallel with the axis. Thick lenses, wide apertures and off-axis rays bring in aberrations, and the refractive index changes with colour, so blue light focuses slightly closer than red. Optical design software traces real rays through every surface for that reason.

More questions

How does a camera focus?

The lens's focal length is fixed, so to focus on a nearer subject the lens moves farther from the sensor. For a 50 mm lens, a subject at infinity focuses 50 mm behind it and a subject at 1 m about 52.6 mm behind it, which is the extra 2.6 mm the focus ring moves the glass.

How does the human eye focus if its distance to the retina is fixed?

It changes the focal length instead. Muscles around the eye's flexible lens make it rounder for near objects and flatter for far ones. With age the lens stiffens (presbyopia), the near point moves away, and reading glasses add converging power, usually +1 to +3 dioptres.

What is the difference between a real and a virtual image?

Light actually passes through a real image, so it can be caught on a screen, as in a projector or camera. A virtual image is where rays appear to come from after a lens or mirror has bent them, as in a magnifying glass or a bathroom mirror; no light reaches that point and no screen can show it.

Why is a plane mirror image the same size and reversed left to right?

A flat mirror has an infinite focal length, so the mirror equation gives dᵢ = −dₒ and m = +1: a virtual, upright image as far behind the mirror as the object is in front. What looks like a left–right swap is really a front–back reversal along the line of sight.

How do two lenses in a row combine?

Treat the image from the first lens as the object for the second. For thin lenses touching each other the powers add: a +5 D and a +3 D lens act like one +8 D lens. Microscopes and telescopes chain an objective and an eyepiece this way, multiplying their magnifications.

What is focal length in a telephoto or wide-angle lens?

For a camera, focal length sets the field of view for a given sensor size. Longer focal lengths (telephoto, 200 mm) magnify a narrow view; shorter ones (wide-angle, 16 mm) take in a wide scene. The thin lens equation still describes where each lens focuses, although real camera lenses contain many elements.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy