Lens & Mirror Formula Calculator

Solve 1/v − 1/u = 1/f for lenses and 1/v + 1/u = 1/f for mirrors using the NCERT (New Cartesian) sign convention. Get m, power, a full description of the image and a ray diagram drawn to scale.

Free, no sign-upRuns in your browserUpdated November 2026
Lens or mirror
Solve for
Place the object (standard positions)

Sign convention (NCERT / New Cartesian): distances are measured from the optical centre O or pole P; light travels left to right; distances along the incident light are +, against it are −; heights above the axis are +. A real object is on the left, so u is negative. Convex lens and convex mirror: f > 0. Concave lens and concave mirror: f < 0. Signs on f and u are applied for you.

Image distance v
—
Magnification m
—
Image height h′
—
Power P
—
Nature
—
Ray diagram (horizontal distances to scale)

Image formation table (NCERT Class 10)
Position of objectPosition of imageSize of imageNature of image

The row for your current object position is highlighted.

How to use the Lens & Mirror Formula Calculator

  1. Pick the device: convex lens, concave lens, concave mirror or convex mirror.
  2. Choose what to solve for (v, u or f) and the length unit, then type the other two distances. Signs follow the NCERT convention, and the tool fixes the sign of u and f for you.
  3. Optionally enter the object height, or tap a standard position such as “Between F and 2F” to place the object.
  4. Read v (or u, f), magnification, image height, power and whether the image is real or virtual, erect or inverted, magnified or diminished.
  5. Check the to-scale ray diagram and the highlighted row of the NCERT image-formation table.

Lens formula and mirror formula

Both formulas link the object distance u, the image distance v and the focal length f. With the sign convention used in NCERT textbooks they are:

Lens: 1/v − 1/u = 1/f m = h′/h = v/u P = 1/f (f in metres, P in dioptres) Mirror: 1/v + 1/u = 1/f m = h′/h = −v/u

The two look different only because of the sign convention. Learn the convention and both work for every case: convex or concave, real or virtual image.

The New Cartesian sign convention (NCERT)

  • The object is placed to the left, so incident light travels from left to right.
  • All distances are measured from the optical centre O of a lens or the pole P of a mirror.
  • Distances in the direction of the incident light (to the right) are positive; distances against it (to the left) are negative. So u is negative for a real object.
  • Heights above the principal axis are positive; heights below it are negative.
  • Results: convex lens f > 0, concave lens f < 0, concave mirror f < 0, convex mirror f > 0. For a mirror, f = R/2.

Reading the answer: for a lens, v > 0 means a real image on the far side and v < 0 means a virtual image on the object side. For a mirror, v < 0 means a real image in front of the mirror and v > 0 means a virtual image behind it. In both cases a negative m means inverted, a positive m means erect, and |m| > 1 means magnified.

Worked examples

Convex lens, f = +20 cm, object 30 cm away (u = −30 cm): 1/v = 1/f + 1/u = 1/20 − 1/30 = 1/60, so v = +60 cm. m = v/u = 60/(−30) = −2. The image is real, inverted and twice the size. Power P = 1/0.20 m = +5 D.

Concave mirror, f = −20 cm, u = −30 cm: 1/v = 1/f − 1/u = −1/20 + 1/30 = −1/60, so v = −60 cm (in front of the mirror). m = −v/u = −(−60)/(−30) = −2: real, inverted, magnified.

Convex mirror, f = +15 cm, u = −20 cm: 1/v = 1/15 + 1/20 = 7/60, so v ≈ +8.57 cm (behind the mirror) and m ≈ +0.43: virtual, erect, diminished. This is why convex mirrors are used as rear-view mirrors: they always give an erect, smaller image and a wider field of view.

Concave lens, f = −15 cm, u = −30 cm: 1/v = −1/15 − 1/30 = −1/10, so v = −10 cm and m = +1/3: virtual, erect, diminished. A concave lens always gives this kind of image for a real object.

Power of a lens

Power measures how strongly a lens converges or diverges light: P = 1/f with f in metres, measured in dioptres (D). A convex lens has positive power and a concave lens negative power. For thin lenses in contact, the powers add: P = P₁ + P₂ + … An optician’s prescription of −2.0 D is a concave lens of focal length −0.5 m, used to correct myopia.

Common mistakes

  • Dropping the minus sign on u. For a real object u is always negative. Writing u = +30 is the most common reason for a wrong answer.
  • Mixing up the formulas. Lens: minus sign (1/v − 1/u). Mirror: plus sign (1/v + 1/u). Magnification for a mirror has an extra minus sign.
  • Forgetting units in power. Convert f to metres first: f = 25 cm gives P = 1/0.25 = 4 D, not 1/25.
  • Adding fractions wrongly. Use a common denominator, such as 1/20 − 1/30 = (3 − 2)/60 = 1/60, then flip to get v. A fraction calculator helps you check.

Exam tips

  • Draw at least two rays: one parallel to the axis (which passes through, or appears to come from, F) and one through the optical centre or pole. Where they meet is the image.
  • Object at F of a converging lens or mirror gives an image at infinity. Object at 2F (or C) gives a same-size image at 2F (or C).
  • Check your answer’s sign against the table: if a concave lens gives a real image, a sign has gone wrong.

Frequently asked questions

What is the difference between the lens formula and the mirror formula?
The lens formula is 1/v − 1/u = 1/f and the mirror formula is 1/v + 1/u = 1/f, both with the New Cartesian sign convention. Magnification is v/u for a lens and −v/u for a mirror.
Why is u always negative?
In the NCERT sign convention the object is placed on the left and distances measured against the direction of incident light are negative. A real object is always on the incoming side, so u is negative.
How do I know if the image is real or virtual from v?
For a lens, positive v means a real image on the other side and negative v means a virtual image on the object side. For a mirror it is the opposite: negative v is real (in front) and positive v is virtual (behind).
What does a negative magnification mean?
A negative m means the image is inverted, and a positive m means it is erect. The size of m tells you whether it is magnified (|m| > 1), diminished (|m| < 1) or the same size (|m| = 1).
How do you calculate the power of a lens?
P = 1/f with f in metres; the unit is the dioptre (D). A convex lens of focal length 50 cm has P = 1/0.5 = +2 D. A concave lens of focal length 25 cm has P = −4 D.
Where should the object be for a magnified real image?
For a convex lens or concave mirror, place it between F and 2F (or between F and C). The image then forms beyond 2F (or C), real, inverted and enlarged.
Can a convex mirror form a real image?
Not of a real object. A convex mirror always forms a virtual, erect and diminished image behind the mirror, between the pole and the focus.

Last reviewed November 2026. Results are estimates for information only — see our disclaimer.