Logo

MonoCalc

/

Thin Lens Calculator

Physics

Sign convention in force: Cartesian, real-is-positive

SymbolQuantityPositive meansNegative means
fFocal lengthConverging (convex) lensDiverging (concave) lens
d_oObject distanceReal object, incoming sideVirtual object (converging beam entering the lens)
d_iImage distanceReal image, outgoing side — can be projectedVirtual image, object's side — only visible by looking through
mMagnificationUpright imageInverted image
RSurface radiusCentre of curvature on the outgoing sideCentre of curvature on the incoming side

This calculator uses the Cartesian real-is-positive convention throughout: a positive image distance means a real image on the far side of the lens, a negative one means a virtual image on the object's own side. Textbooks that put a minus sign in the equation itself are using a different convention and will disagree on signs, never on physics.

What do you want to find?

Needs focal length and object distance. Formula: d_i = (d_o · f) / (d_o − f)
Thicker in the middle. Brings parallel rays to a real focus, and forms a real image whenever the object sits beyond F.
Every length field is re-expressed when you change this. Dioptres always come from metres internally.

Distances

Positive for converging, negative for diverging.
Positive for a real object on the incoming side.
Solved for you.
Derived from the distances.
Leave blank to skip the image-height output.
Clamped to 0–10 and applied to every numeric output.
Watch the image sweep out to infinity as the object approaches F, then flip to the other side.
Image distance d_i
+30.000 cm
Real imageInvertedenlarged (2.000×)Between F and 2F

A real, inverted image forms 30.000 cm behind the lens, 2.000× the object's size. It can be caught on a screen. The image is 8.000 cm tall.

The image is real, inverted and enlarged, and it falls beyond 2F on the far side. This is the projector and photographic-enlarger regime.

Ray diagram

2FFF′2F′objectreal imagelight travels left → rightconverging (convex)

The shaded band marks the region the object occupies. Dashed lines are backward extensions of the emerging rays: where they cross is where a virtual image appears to be, which is why nothing can be projected there. Distances beyond the frame are clipped, so trust the numbers over the picture when the image runs off the edge.

All quantities

QuantityValueMeaning
Focal length f+10.000 cmPositive — converging lens
Object distance d_o+15.000 cmReal object on the incoming side
Image distance d_i+30.000 cmPositive — real image behind the lens, projectable
Magnification m-2.000m = −d_i/d_o; inverted, enlarged
Image height h_i-8.000 cmh_i = m · h_o — 8.000 cm tall, inverted
Optical power P10.000 DP = 1/f with f in metres — the unit opticians quote
Focal pointsF at ±10.000 cm, 2F at ±20.000 cmMeasured from the lens centre on both sides
Object regionBetween F and 2FThe image is real, inverted and enlarged, and it falls beyond 2F on the far side. This is the projector and photographic-enlarger regime.

Step by step

Thin lens (Gaussian) equation

1/f = 1/d_o + 1/d_i

Rearrange for the image distance

d_i = (d_o · f) / (d_o − f)

Substitute

d_i = (15.000 cm × +10.000 cm) / (15.000 cm − +10.000 cm)

Result

d_i = +30.000 cm

Transverse magnification

m = −d_i / d_o = −(+30.000 cm) / (+15.000 cm) = -2.000

Image height

h_i = m · h_o = -2.000 × 4.000 cm = -8.000 cm

Optical power

P = 1 / f = 1 / (0.1000 m) = 10.000 D

Magnification against object distance

-4-20240.50010.420.330.140.0d_o = fobject distance d_o (cm)

m(d_o) = f/(f − d_o) is a hyperbola. It blows up at d_o = f, and the sign flip either side of that asymptote is the switch between a real inverted image and a virtual upright one. The marker is your current operating point; values beyond ±5 are clipped.

Focal length ⇄ dioptre converter

Eyeglass prescriptions are quoted here: + for long sight, − for short sight.

+50.000 cm (0.5000 m)

Your current lens is 10.000 D, which is +10.000 cm.

What the thin lens equation assumes
The thin lens equation assumes the lens is thin compared with every distance in the problem, that rays stay close to the axis (the paraxial approximation), and that the material is non-dispersive. Thick lenses, fast lenses and wide-angle rays all need the full matrix treatment instead.

About This Tool

Thin Lens Calculator – Image Distance, Magnification and Dioptres

A lens does one thing: it changes where a bundle of rays appears to come from. This thin lens calculator turns that into numbers. Give it any two of the three distances in the thin lens equation and it returns the third, then derives the magnification, the image height, the optical power in dioptres, and — the part that trips people up — whether the image is real or virtual, upright or inverted, enlarged or reduced.

The equation and its rearrangements

With every distance measured from the centre of the lens, the Gaussian form is

1/f = 1/d_o + 1/d_i

which rearranges into the three closed forms the calculator actually evaluates: d_i = d_o·f / (d_o − f), d_o = d_i·f / (d_i − f) and f = d_o·d_i / (d_o + d_i). The magnification follows from the geometry of the undeviated central ray, m = −d_i/d_o = h_i/h_o. Put a 10 cm lens 15 cm from an object and you get d_i = +30 cm with m = −2: a real, inverted image twice the size, exactly what a slide projector does.

Signs are the whole game

Most wrong answers in optics are right arithmetic with a lost minus sign. This tool uses the Cartesian real-is-positiveconvention throughout and keeps the legend on screen: f > 0 converging, f < 0 diverging; d_o > 0 for a real object; d_i > 0 for a real image on the far side and d_i < 0 for a virtual image on the object's own side; m > 0 upright, m < 0inverted. Instead of leaving you to interpret the signs, the calculator writes the result out in words — “a real, inverted image forms 30 cm behind the lens”.

The five regions of a converging lens

Where the object sits relative to F and 2Fdecides everything, and the tool names the region for you. Beyond 2Fthe image is real, inverted and reduced — a camera or an eye. At exactly 2F the magnification is −1 and object and image are interchangeable. Between F and 2Fthe image is real, inverted and enlarged — a projector. At F the rays emerge parallel and no image forms at all. Inside F the image turns virtual, upright and enlarged: a magnifying glass. A diverging lens has none of this structure — every real object gives a virtual, upright, reduced image, wherever you put it.

Object at the focal point is not an error
Setting d_o = f makes the denominator zero because the image genuinely is at infinity: the lens has become a collimator. The tool says so rather than returning Infinity. Nudge the object either side of F and watch the image sweep off to a huge positive distance one way, and to a huge virtual distance the other.

Lens-maker's equation and optical power

Focal length can also come from the glass itself, through 1/f = (n/n_m − 1)(1/R₁ − 1/R₂), with 1/R = 0 for a flat surface. A crown-glass biconvex lens with n = 1.52 and radii of ±20 cm works out to f = 19.23 cm. Because only the ratio n/n_mmatters, immersing the same lens in water strips away most of its power — which is precisely why swimming goggles restore underwater vision by putting a layer of air back in front of the eye. Optical power is the reciprocal in metres, P = 1/f, so a +2.00 D reading lens is f = 50 cm and a 50 mm camera lens is +20 D.

Where the approximation runs out
The thin lens equation assumes zero thickness and paraxial rays. Real lenses need distances measured from their principal planes, fast and wide-angle designs carry aberrations the formula cannot see, and index varies with wavelength so each colour focuses slightly differently. Good to a few percent for homework and photographic estimates; not a substitute for ray tracing.

The two-lens mode chains a second element by making the first image the object of the second, d_o2 = d − d_i1, and multiplies the magnifications. A negative d_o2 is a virtual object— light still converging when it reaches the second lens — which is normal in a microscope and needs no special handling. Every mode shows its full substitution, so you can check your own working line by line rather than just the final number.

Frequently Asked Questions

Is the Thin Lens Calculator free?

Yes, Thin Lens Calculator is totally free :)

Can I use the Thin Lens Calculator offline?

Yes, you can install the webapp as PWA.

Is it safe to use Thin Lens Calculator?

Yes, any data related to Thin Lens Calculator only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

How does this thin lens calculator work?

Choose which of the three distances in 1/f = 1/d_o + 1/d_i you want to find, enter the other two, and the tool solves the rearranged form for your unknown. Every derived figure — magnification, image height, optical power in dioptres, the real/virtual and upright/inverted classification, and the object's region relative to F and 2F — is then computed from the unrounded answer. Lengths are normalised to metres internally and converted back to your display unit only at the end, so the dioptre figure is always right no matter whether you typed millimetres or feet.

What sign convention does the calculator use?

The Cartesian "real-is-positive" convention, stated in a legend that stays on screen. A positive focal length is a converging (convex) lens and a negative one is diverging; a positive object distance is a real object on the incoming side; a positive image distance is a real image on the far side of the lens; and a positive magnification means the image is upright. Textbooks that write the equation with a minus sign are using a different convention and will disagree with these signs while agreeing on the physics.

Why does the image distance come out negative?

Because the image is virtual. When a real object sits inside the focal length of a converging lens — the magnifying-glass case — the rays leaving the lens are still diverging, so they only appear to come from a point on the object's own side. The calculator reports that as a negative d_i, a positive magnification and an upright, enlarged image, and says in words that it cannot be projected onto a screen. A diverging lens gives a negative d_i for every real object, which is why a concave lens can never form a projectable image.

Why is an object exactly at the focal point rejected?

Because no image forms there at any finite distance. Setting d_o = f makes the denominator d_o − f zero, and physically the rays leave the lens exactly parallel — that is a collimator, not an imaging system. Rather than dividing by zero or returning Infinity, the tool explains the situation and asks you to nudge the object off F. Move it a fraction outside F and the real image races off to a huge positive distance; a fraction inside, and a huge virtual image appears on the object's side.

How do focal length and dioptres relate?

Optical power in dioptres is simply the reciprocal of the focal length in metres, P = 1/f. A +2.00 D reading lens has f = 0.5 m, a −4.00 D myopia correction has f = −0.25 m, and a 50 mm camera lens is +20 D. Because the definition demands metres, the tool always converts internally before computing power, whichever display unit you picked. Thin lenses in contact also add their powers, which is why prescriptions are quoted in dioptres rather than focal lengths.

How accurate is the thin lens equation for real lenses?

It is exact only for an idealised lens of zero thickness with rays that stay close to the optical axis. Real lenses have thickness, so the distances should be measured from the principal planes rather than the glass, and fast or wide-angle systems suffer spherical aberration, coma and field curvature the equation knows nothing about. Refractive index also varies with wavelength, so a single element has a slightly different focal length for every colour. For homework, spectacle powers, projector geometry and most photographic estimates the approximation is good to a few percent; for lens design you need ray tracing.