Thin Lens and Mirror Formula Calculator
The Thin Lens and Mirror Formula, in the Cartesian Convention
Two formulae that differ by one sign, and a convention that decides every other sign on the page. This works the lens and the mirror in the Cartesian convention NCERT and most boards use, prints the image distance, the magnification and the image height, and says in words whether the image is real or virtual and which way up.
Image distance, magnification and which way up
A converging lens of 10 cm focal length, with an object 30 cm in front of it, 2 cm tall
Two formulae one sign apart, and a convention that decides the rest
- the convention, first
- Cartesian, as in NCERT Class XII Part II section 9.2.1. All distances from the pole of the mirror or the optical centre of the lens; distances measured in the same direction as the incident light are POSITIVE and against it NEGATIVE; heights above the axis positive. With light drawn travelling left to right, everything on the object side is negative. Nothing else on this page makes sense until that sentence does
- u
- object distance, negative for a real object. This is the sign that costs the most marks in the subject. An object 30 cm in front of a lens is u = −30 cm. A positive u is a virtual object — light already converging when it reaches the element — and happens only in multi-element problems
- f
- focal length, signed, and the sign IS the element type. Converging lens positive; diverging lens negative; concave mirror negative, because its focus is in front of it on the incoming side; convex mirror positive. The two mirror signs read backwards to most people’s intuition and are reversed in the older real-is-positive convention, which is why the companion page on this site exists
- v
- image distance, and its sign is the real-or-virtual verdict — but which way round depends on the element. For a LENS, positive v is on the far side and the image is real. For a MIRROR, positive v is behind the mirror and the image is VIRTUAL, because the light never gets there. Same sign, opposite meaning, and this page says which in words so there is nothing to remember
- m
- magnification, h′/h, and its sign is the which-way-up verdict: negative is inverted, positive is erect. m = v/u for a lens and −v/u for a mirror. For one element and a real object, real goes with inverted and virtual goes with erect, always — so an answer that is real and erect has a sign error in it
- what this page is NOT
- this is school ray optics: one thin element, one object, signed distances. It is not spectacle optics. Vertex distance, prism dioptres, decentration, aniseikonia and thick-lens back vertex power are a different subject for a different reader and live in this family’s ophthalmic optics section. The dioptre row here is the plain school P = 1/f and nothing more
Worked example
A converging lens of 10 cm focal length, with an object 30 cm in front of it, 2 cm tall
THE SIGNS, BEFORE ANY ARITHMETIC. Converging lens, so f = +10 cm. Real object 30 cm in front, so u = −30 cm, not +30. Object standing up, so h = +2 cm. Two of those three are sign decisions and both are made before a single number is substituted. Get into the habit of writing the signed values down as a separate line.
THE FORMULA, REARRANGED FOR v. The lens formula is 1/v − 1/u = 1/f, so 1/v = 1/f + 1/u = 1/10 + 1/(−30) = 0.1 − 0.033 33 = 0.066 67 per cm. Note what the rearrangement did to the sign: moving 1/u across makes it a PLUS, and then the negative u makes it subtract anyway. Doing it in two steps rather than one is slower and much harder to get wrong.
THE IMAGE DISTANCE. v = 1/0.066 67 = +15.0000 cm. Positive, and for a LENS positive means the far side, so the image is real and forms 15 cm beyond the lens. You could put a screen there and see it. Had this been a mirror, the same +15 would have meant 15 cm BEHIND the mirror and therefore virtual.
THE MAGNIFICATION AND THE HEIGHT. For a lens m = v/u = 15/(−30) = −0.5. Negative, so inverted; size 0.5, so half as tall. The image is h′ = m h = −0.5 × 2 = −1 cm — one centimetre tall and upside down. Real and inverted, which is the pairing you should expect from a single converging element and a real object.
THE SAME LENS, AS A MIRROR, FOR CONTRAST. Put f = +10 and u = −30 into the MIRROR formula instead: 1/v = 1/f − 1/u = 0.1 + 0.033 33 = 0.133 33, so v = +7.5 cm — behind the mirror, therefore virtual, and m = −v/u = −7.5/(−30) = +0.25, erect and a quarter size. Same two input numbers, a completely different image, and the only difference is one sign in each of the two formulae. That is why the element selector is the first field on the page.
AND THE DEGENERATE CASE. Move the object to exactly the focal point, u = −10 cm. Then 1/v = 1/10 − 1/10 = exactly zero, v is infinite, and there is no image to find. The page refuses rather than printing a very large number, because a very large number would suggest an image is forming somewhere far away and no image forms at all: the rays leave parallel. That is a collimator, and it is how the first lens of every telescope is used.
A converging lens of f = +10 cm, and a concave mirror of f = −10 cm, object at six distances
| Object at | u, cm | Lens: v, cm | Lens: m | Lens: image | Mirror: v, cm | Mirror: m | Mirror: image |
|---|---|---|---|---|---|---|---|
| 3f | −30 | +15.00 | −0.50 | real, inverted, smaller | −15.00 | −0.50 | real, inverted, smaller |
| 2f | −20 | +20.00 | −1.00 | real, inverted, same size | −20.00 | −1.00 | real, inverted, same size |
| 1.5f | −15 | +30.00 | −2.00 | real, inverted, bigger | −30.00 | −2.00 | real, inverted, bigger |
| at f | −10 | no image | — | rays emerge parallel | no image | — | rays emerge parallel |
| 0.5f | −5 | −10.00 | +2.00 | virtual, erect, bigger | +10.00 | +2.00 | virtual, erect, bigger |
| 0.2f | −2 | −2.50 | +1.25 | virtual, erect, bigger | +2.50 | +1.25 | virtual, erect, bigger |
One sign of difference between the two formulae, and four signs to get right
The lens formula and the mirror formula differ by exactly one sign, and so do their magnifications. Lens: 1/v − 1/u = 1/f with m = v/u. Mirror: 1/v + 1/u = 1/f with m = −v/u. NCERT prints them as Equations 9.23 and 9.24, and 9.7 and 9.9. The useful mnemonic is that each system has one plus and one minus: the mirror takes the plus in the formula and the minus in the magnification, the lens the other way round. Everything else about the two cases is identical.
The convention, though, is where the marks go. In the Cartesian convention every distance is measured from the optical centre or the pole, positive in the direction the light is travelling. Draw the light going left to right and the whole object side is negative. So a real object is at a negative u — always, with no exceptions in single-element problems — and an object 30 cm in front of a lens is u = −30 cm. Students who substitute u = +30 get a plausible-looking answer with the wrong sign, and nothing in the arithmetic complains. That is why this page prints a warning when you type a positive u rather than silently accepting it.
The sign of f carries the element type, and the mirror cases feel wrong. A converging lens is f positive and a diverging lens is f negative, which surprises nobody. A concave mirror is f NEGATIVE, because its focus lies in front of the mirror on the incoming side; a convex mirror is f POSITIVE. “Concave” and “negative” sit badly together in the memory, and the older real-is-positive convention has them precisely the other way round, which is why a student working from two books at once can be reliably wrong. That disagreement has a page of its own on this site, and it is a better use of twenty minutes than re-reading this one.
Then the signs of the ANSWERS carry the verdicts, and the sign of v means opposite things for the two elements. For a lens, positive v is on the far side, where the light actually goes, so the image is real. For a mirror, positive v is behind the mirror, where the light never goes, so the image is virtual. Same sign, opposite reading. The sign of m is more forgiving: negative is inverted for both. And for a single element with a real object the two verdicts are locked together — real images are inverted, virtual images are erect, always — so an answer that comes out real and erect contains a sign error and you can stop and look for it.
Where this goes wrong, in order of how often. A positive u for a real object. A concave mirror given a positive f. Reading positive v as real on a mirror problem. Mixing centimetres and metres, which matters for the dioptre row: P = 1/f with f in METRES, so a 10 cm lens is 10 D and not 0.1 D. And using the thin lens formula on something that is not thin — the formula assumes the two surfaces are close enough together that you can measure everything from one point, which is fine for a classroom lens and not fine for a spectacle lens in a frame, where the thickness and the distance to the eye both matter and a different set of pages applies.
Frequently asked questions
Is the object distance u positive or negative?
Negative, for a real object, in the Cartesian convention that NCERT and most current boards use. Distances are measured from the optical centre or pole and are positive in the direction the light travels, so the object side — which the light is coming FROM — is negative. An object 30 cm in front of a lens is u = −30 cm. A positive u means a virtual object, which only arises when converging light meets a second element.
Why is a concave mirror’s focal length negative?
Because its focus is in front of the mirror, on the side the light arrives from, and that direction is negative in the Cartesian convention. A convex mirror’s focus is behind it, in the direction the light was travelling, so its f is positive. This is the opposite of what the older real-is-positive convention says, where a concave mirror’s focus is real and therefore positive. Both are self-consistent; mixing them is what goes wrong.
Does a positive image distance mean the image is real?
For a lens, yes. For a mirror, no — it means the opposite. A lens passes light through to the far side, where distances are positive, so a positive v is where the light really goes and the image is real. A mirror sends light back, so a positive v is BEHIND the mirror where no light arrives, and the image is virtual. This page states the verdict in words next to the number for exactly this reason.
What happens when the object is exactly at the focal point?
There is no image. 1/v = 1/f + 1/u becomes 1/f − 1/f = 0 exactly, so v is infinite and the rays leave the element parallel to each other, never meeting again. This page refuses to print a number rather than showing a very large one, because a large number would wrongly suggest an image forming far away. It is not a flaw in the formula: it is the focal point’s definition run backwards, and it is the working principle of a collimator and of a telescope objective.
How do I know whether the image is erect or inverted?
From the sign of the magnification: negative is inverted, positive is erect. And for a single element with a real object there is a shortcut, because the verdicts come in pairs — real images are inverted and virtual images are erect, with no exceptions. So if you have worked out that the image is real, it is inverted, and if your magnification came out positive you have a sign error upstream.
Is the lens power in dioptres the same thing as a spectacle prescription?
It is the same quantity and a much simpler problem. P = 1/f with f in metres, so the 10 cm lens on this page is +10 D. A spectacle prescription is that number plus everything this page leaves out: the lens has real thickness, so the power measured at the back surface differs from the nominal one; it sits a centimetre or two in front of the eye, so the effective power depends on that distance; and it may carry cylinder and prism. Those belong to a different subject and this family handles them in its ophthalmic optics section rather than here.
Related calculators
References
- NCERT, Physics Textbook for Class XII, Part II, Chapter 9, Ray Optics and Optical Instruments (read 11 November 2026). Section 9.2.1 states the Cartesian sign convention: all distances measured from the pole of the mirror or the optical centre of the lens, distances measured in the same direction as the incident light taken as positive, heights above the axis positive. Equation 9.7 is the mirror equation 1/v + 1/u = 1/f and Equation 9.9 gives m = −v/u; Equation 9.23 is the thin lens formula 1/v − 1/u = 1/f and Equation 9.24 gives m = v/u. Table 9.1 lists refractive indices against air with their critical angles: water 1.33 and 48.75°, crown glass 1.52 and 41.14°, diamond 2.42 and 24.41°.
- A caution about Table 9.1 that this batch could not resolve. The copy read on 11 November 2026 gives dense flint glass as 1.62 with a critical angle of 37.31°. Those two numbers are not consistent: arcsin(1/1.62) is 38.12°, and 37.31° requires an index of 1.650. Either the index in the printed table is 1.65 and the copy read here was garbled, or the row itself is internally inconsistent. This batch could not establish which, so no dense flint glass figure is printed anywhere in these eight records. The three rows that are used — water, crown glass and diamond — were each checked the same way and each reproduces its own stated critical angle to better than 0.01°.
- A deliberate scope boundary, recorded because it was checked rather than assumed. This is a school ray-optics page for a student: one thin element, one object, signed distances in centimetres, and the dioptre row is the plain school P = 1/f. It is not an ophthalmic page, and the six ophthalmic records that already exist elsewhere in this family — thick-lens back vertex power, Prentice’s rule, the prism dioptre to degree converter, spectacle magnification and aniseikonia, oblique meridian lens power, and lens decentration with minimum blank size — were each checked against this page before it was written. None of them covers the thin lens or mirror formula, the Cartesian sign convention, or real-against-virtual image reasoning, and nothing here duplicates any of them. They are a different page for a different reader: a dispensing problem rather than a class XII problem.
- On the thin-lens assumption itself, which is what makes this page’s arithmetic valid and a spectacle lens’s invalid: the formula measures every distance from one point, which is only legitimate when the lens’s thickness is negligible beside the focal length and the object and image distances. A classroom lens satisfies that comfortably. A meniscus spectacle lens in a frame does not, which is why back vertex power exists as a separate quantity, and the paraxial assumption also quietly excludes rays far from the axis — the source of spherical aberration, which no form of this formula describes.
