Mirror Equation Solver – Solve 1/f = 1/do + 1/di for f, do or di

Use this free Mirror Equation Solver to work with the spherical mirror formula 1/f = 1/do + 1/di. Choose which value you want to find — image distance, focal length or object distance — enter the other two, and the calculator also gives you the magnification and tells you whether the image is real or virtual.

A curved mirror does something a flat mirror never can: it gathers light to a point, or throws it outward, and in doing so it forms images that can be bigger than the object, smaller, upside down, or floating in front of the glass where a screen can catch them. All of that behaviour — every shaving mirror, telescope and car wing mirror — is governed by one compact equation linking three distances: how far the object stands from the mirror, how far the image forms from it, and the mirror's focal length, the single number that captures how strongly the surface is curved. Give the equation any two of the three and the third is forced.

The equation's real power is that it predicts character as well as position. The same calculation that locates the image also yields the magnification m = −di/do, and the signs of the answers read like a description: a positive image distance means a real image floating in front of the mirror; a negative one means a virtual image hiding behind it; a negative magnification means inverted, a positive one upright. A concave mirror can produce every combination on that list depending on where the object stands, which is why this one solver covers everything from a dentist's mirror to the primary mirror of a telescope.

Mirror Equation Solver — formula and diagram

Because the formula is symmetric in the object and image distances, it also runs backwards as a measuring instrument. Put an object and a screen in front of an unknown mirror, slide them until the image is sharp, and the two distances you read off reveal the focal length — the standard school-laboratory method for measuring f, and exactly the "solve for f" mode built into this calculator. Light itself does not care which end you call the object: swap do and di and the same equation describes the rays retracing their path in reverse.

object image: real, inverted, enlarged F C concave mirror

Formula

1/f = 1/do + 1/di  •  magnification m = −di / do  •  image height hi = m × ho

The equation rearranges to isolate whichever quantity you need: 1/di = 1/f − 1/do to locate an image, 1/f = 1/do + 1/di to measure a mirror from a known object–image pair, and 1/do = 1/f − 1/di to find where an object must stand to throw its image onto a screen at a chosen place — the projector problem. Notice it is the reciprocals that add, never the distances themselves: a mirror does not split the difference between object and image, it splits the reciprocal. That is why equal object and image distances happen only at one special place, do = di = 2f, the centre of curvature.

SymbolMeaningUnits & signs
ffocal length — mirror to focal point Fcm; + concave, − convex
doobject distance — mirror to objectcm; + for a real object
diimage distance — mirror to imagecm; + real (in front), − virtual (behind)
mmagnification — image size ÷ object sizeno units; − inverted, + upright
Rradius of curvature, R = 2fcm; same sign as f

The sign convention is a map, not a nuisance

Students often treat the signs in mirror work as arbitrary bookkeeping invented to make problems harder. They are the opposite: the signs are a compressed description of the physical scene. In the real-is-positive convention used here, the front of the mirror — the side where light actually travels and screens can stand — is positive territory. A real image, one the rays genuinely pass through, must live there, so it earns a positive di. A virtual image is a place the rays only appear to come from, behind the glass where no light ever goes, so its distance is negative. The sign is not decoration; it is the answer to "could I catch this image on a card?"

The focal length's sign does the same work. A concave mirror pulls parallel rays together to a real focus in front of itself — positive f. A convex mirror spreads them as if they came from a focus behind the surface — a virtual focus, negative f. Feed the calculator a negative f and every result follows automatically: the image distance always comes out negative (virtual), the magnification always positive (upright) and smaller than 1 (diminished). That is not three separate facts about convex mirrors to memorise; it is one sign propagating through one equation.

Magnification's sign completes the picture — literally. m = −di/do comes out negative whenever a single mirror or lens forms a real image, because rays crossing at the image flip top and bottom. So the minus sign in the formula is the mathematical trace of that flip: negative m, inverted image, every time, for every real image formed by one element. When a problem asks only "how big?", quote |m|; when it asks "describe the image", the sign is the description.

object virtual image: upright, diminished, behind the mirror F (virtual) convex mirror

How to use

  1. Pick what you want to find from the drop-down — image distance, focal length or object distance. That field disappears, because it is the answer.
  2. Enter the other two values in centimetres, keeping the sign convention: focal length positive for a concave mirror, negative for a convex one.
  3. Click "Solve Mirror Equation" to get the missing value, the magnification, and a plain description of the image.
  4. Read the signs before the sizes: positive di means a real image you could project; negative m means inverted. If the object sits exactly at the focal point, the calculator tells you the image is at infinity instead of inventing a number.

Worked examples

Example 1 — the standard case. An object stands 30 cm in front of a concave mirror of focal length 20 cm.
1/di = 1/f − 1/do = 1/20 − 1/30 = 1/60, so di = 60 cm.
Magnification m = −60 ÷ 30 = −2 — the image is real, inverted and twice as tall as the object.

Example 2 — object at the centre of curvature. The same mirror (f = 20 cm) with the object at do = 40 cm, which is 2f.
1/di = 1/20 − 1/40 = 1/40, so di = 40 cm and m = −40 ÷ 40 = −1. Object and image stand at the same place, the same size, one inverted — the unique "photocopier" position of a concave mirror, and a handy way to locate 2f experimentally.

Example 3 — inside the focal length: the shaving mirror. Bring the object to do = 10 cm, halfway to the focus of the f = 20 cm mirror.
1/di = 1/20 − 1/10 = −1/20, so di = −20 cm and m = +20 ÷ 10 = +2. The negative distance says the image is virtual, behind the mirror; the positive magnification says upright and doubled — exactly the magnified face a shaving or make-up mirror is designed to show.

Example 4 — a convex security mirror. A small convex mirror has f = −10 cm, and an object stands 30 cm in front of it.
1/di = −1/10 − 1/30 = −4/30, so di = −7.5 cm and m = +7.5 ÷ 30 = +0.25. Virtual, upright, quarter-size — a wide scene compressed into a small mirror, which is the whole point of security and vehicle mirrors.

Example 5 — a distant object: the telescope limit. A concave mirror of f = 15 cm views an object 100 cm away.
1/di = 1/15 − 1/100 = 85/1500, so di = 17.65 cm and m = −0.18. As the object retreats further the image creeps towards the focal plane at 15 cm and shrinks towards a point — distant objects always image essentially at F, which is where telescope cameras and sensors are placed.

Example 6 — measuring an unknown mirror. An object 25 cm from a mirror forms a sharp image on a screen 100 cm away. Solve for f:
1/f = 1/25 + 1/100 = 5/100, so f = 20 cm, with m = −100 ÷ 25 = −4. Two ruler readings and one reciprocal sum have measured the mirror — no ray diagram required.

Mirror equations in real life

Shaving and make-up mirrors. These are concave mirrors used with the face inside the focal length (Example 3): the virtual, upright, magnified image is the only configuration that helps you shave, and its magnification is set entirely by how close you stand relative to f.

Car passenger mirrors. Convex, so the image is upright and diminished with a wide field of view. The small m is also why the warning "objects in mirror are closer than they appear" is etched into the glass: a diminished image reads to the brain as a more distant one.

Telescope primary mirrors. A reflecting telescope is Example 5 made huge: starlight arrives effectively from infinity, so the primary mirror (often f measured in metres) forms its image just inside the focal plane, where an eyepiece or camera waits.

Headlight and torch reflectors. Run the equation in reverse: place a bulb exactly at the focal point (do = f) and 1/di = 0 — the reflected beam emerges parallel, thrown far down the road instead of spreading. Searchlights and lighthouses exploit the same position.

Solar cookers and furnaces. A concave mirror concentrates parallel sunlight into its focal region. The concentration ratio is set by the mirror's area divided by the spot size, and laboratory solar furnaces reach thousands of degrees at the focus of mirrors whose f comes straight from this page's equation.

Dentists' and doctors' mirrors. A small concave mirror held a centimetre or two from a tooth — inside its focal length — shows the dentist an upright, magnified virtual image of a surface no direct view could reach.

bulb at F parallel beam out reflector

Quick reference: the five landmark positions (concave mirror, f = 20 cm)

Object doImage dimDescription
very far away20 cm (at F)≈ 0real point — telescope case
60 cm (beyond C)30 cm−0.5real, inverted, diminished
40 cm (at C = 2f)40 cm−1real, inverted, same size
30 cm (between C and F)60 cm−2real, inverted, enlarged
20 cm (at F)infinity—parallel beam — headlight case
10 cm (inside F)−20 cm+2virtual, upright, enlarged

Read the table as a journey: walk an object in from far away and the image walks out from F to meet it at C, swaps places symmetrically, races off to infinity as the object reaches F — then reappears behind the mirror, upright, the moment the object steps inside the focal length. One equation choreographs the whole dance.

Why big telescopes abandon spheres: spherical aberration

The mirror equation quietly assumes a perfect spherical mirror imaging perfectly — true only for rays near the axis. Rays striking a spherical mirror near its edge reflect through a point slightly closer to the mirror than F, so a wide spherical mirror cannot focus starlight to a single sharp point: the defect is spherical aberration, and it grows quickly with aperture. The fix is to change the curve by a hair's breadth from sphere to paraboloid, whose focus is exact for all parallel rays. That is why serious telescope primaries are parabolic, why the spherical Hubble primary's tiny figure error was so costly, and why this solver's answers — exact for school mirrors and paraxial rays — are the ideal that real mirror-makers polish towards, often to within a fraction of a wavelength of the perfect curve.

Common mistakes

  • Forgetting the convex sign. A convex mirror entered with positive f returns a confident, wrong, real image. The sign is not optional: convex means negative f before you start.
  • Adding distances instead of reciprocals. 1/f = 1/do + 1/di — the reciprocals add. Averaging do and di or halving their sum coincides with the truth only at the centre of curvature.
  • Reading a negative image height as an error. Negative hi (from negative m) means inverted, not impossible. Quote the size as |hi| and the sign as the orientation.
  • Mixing up f and R. Manufacturers and problems sometimes quote the radius of curvature. The equation wants the focal length — halve R first (f = R/2), or every image lands in the wrong place.
  • Trying to project a virtual image. If di comes out negative, no screen position will ever catch the image — it exists only for an eye looking into the mirror. Sliding the screen behind the mirror is a classic wasted laboratory hour.

FAQ

Which sign convention does this calculator use?
The "real is positive" convention taught in most school courses: everything in front of the mirror is positive. If your course uses the Cartesian convention (distances measured against the light direction are negative), flip the signs of all distances before entering them.

What does a negative image distance mean?
The image forms behind the mirror, so it is virtual — it cannot be caught on a screen, but you can see it when you look into the mirror. This always happens with convex mirrors, and with concave mirrors when the object is inside the focal length.

What happens when the object is exactly at the focal point?
1/di becomes zero, so the image forms at infinity — the reflected rays come out parallel. The calculator will tell you this instead of giving a number.

How can I measure a mirror's focal length with no special equipment?
Point a concave mirror at a distant window or tree and catch the image on a card, sliding the card until the picture is sharp. Distant objects image at the focal plane, so the card's distance from the mirror is f to within a few millimetres — the method behind Example 5's telescope limit.

What is the centre of curvature, and why does 2f matter?
It is the centre of the sphere the mirror was cut from, sitting at distance R = 2f. An object placed there images onto itself, same size, inverted (Example 2) — a landmark position for ray diagrams and a quick experimental check on any claimed focal length.

Can a convex mirror ever form a real image?
Not from a real object: its diverging surface always produces a virtual, upright, diminished image behind the mirror, whatever the object distance. (A virtual object — rays already converging onto the mirror from another element — is the exotic exception found in multi-mirror instruments.)

Why do passenger-side car mirrors warn that objects are closer than they appear?
Because the convex mirror's magnification is well below 1 — in Example 4 it was 0.25. Your visual system judges distance partly by size, so a quarter-size car reads as a far-away car. The warning compensates for an optical illusion the mirror equation predicts exactly.

Does the equation work in metres or millimetres?
Yes — any single unit, used for all three distances, works, and the answer arrives in that unit. Telescope workers use metres (an f = 2.4 m primary), school laboratories use centimetres. Trouble starts only when units are mixed inside one calculation.

How much magnification does a shaving mirror give?
It depends on where your face is: m = −di/do with di from the equation. For an f = 20 cm mirror with your face 10 cm away, m = +2 (Example 3); move to 15 cm and the image grows and recedes further behind the mirror. There is no single "power" printed on such mirrors because the geometry is yours to choose each morning.

What is a virtual object?
In systems of two or more mirrors or lenses, the image from the first element can be intercepted before it forms, making the second element receive converging light — a virtual object, entered with negative do. This solver handles the arithmetic if you ever meet one; single-mirror problems never produce it.

Rachel Novak

Rachel Novak

Senior Editor · All Topics

Rachel Novak creates and reviews our calculators across the whole CalcVIP library calculators at CalcVIP. Every calculator is checked against hand-worked examples before it is published, so the formula, the diagram and the answer all agree.

View full profile & all calculators by Novak →