Lens Magnification Solver – Magnification & Image Distance from f and Object Distance

Use this free Lens Magnification Solver to find the magnification and image distance of a thin lens directly from its focal length and the object distance — using the compact form m = f / (f − do), handy when you know where the object sits but not where the image lands.

Every lens performs the same negotiation: given an object at one distance, it delivers an image at another distance, scaled by a factor — the magnification. Photographers call the scale "how big it looks", projectionists call it "throw", microscopists build careers on it. The textbook route to it runs through the lens equation twice — find the image distance, then divide. The compact form on this page, m = f ÷ (f − do), collapses that into a single step using the two numbers you almost always know first: the focal length and where the object stands. One subtraction, one division, and you know both how big the image will be and, from the companion formula, exactly where it will form.

The sign of m is half the answer. A negative magnification is not an error or a smaller size — it is the signature of a real image, formed on the far side of the lens, upside down. Every camera photograph and every projected film frame is such an inverted image; sensors and screens simply present it flipped. A positive magnification means a virtual image on the same side as the object, upright — the magnifying glass case. And the size of |m| sorts the applications into families: |m| far below 1 is a camera shrinking the world onto a sensor; |m| near 1 is copying and macro work; |m| far above 1 is a projector or microscope objective blowing a small object up to fill a screen or an eye.

Lens Magnification Solver — formula and diagram

The formula also exposes the drama at the focal point. As the object distance approaches f, the denominator f − do shrinks towards zero and the magnification soars towards infinity — the image flees to infinity with it. Slide the object just inside f and the sign flips: the runaway real image becomes a runaway virtual one. That single point, do = f, divides the lens's whole behaviour in two, and this calculator handles both sides of it, including the diverging lens, whose negative focal length makes every image upright, shrunken and virtual.

object image (inverted) lens f dₒ dᵢ

Formula

m = f / (f − do)  •  di = f × do / (do − f)  •  m = −di / do

A negative magnification means the image is inverted; a positive one means it is upright. A negative image distance means a virtual image on the same side as the object. The three forms are one fact wearing three coats: the third is the definition (image size over object size, with the sign convention), the second is the thin-lens equation solved for di, and the first is what falls out when you substitute — a formula needing only f and do. Everything is in the same unit throughout (this calculator works in centimetres): mixing a focal length in millimetres with an object distance in metres is the one unforgivable sin, and the worked examples show the conversions done honestly. Image height follows immediately: hi = m × ho, sign and all.

SymbolMeaningUnits
mlateral magnification — image height ÷ object height, signed— (×)
ffocal length (+ converging, − diverging)cm
doobject distance from the lenscm
diimage distance (+ far side, real; − same side, virtual)cm

The six places an object can stand

A converging lens has a whole repertoire, and the object's address selects the performance. Beyond twice the focal length (do > 2f) the image is real, inverted and shrunken — the camera regime, where a landscape is compressed onto a sensor. Exactly at 2f the image is life-size, m = −1, the copying and macro-photography point. Between f and 2f the image is real, inverted and enlarged, fleeing far away as the object nears f — the projector regime. At f itself the image is at infinity. Inside f the image turns virtual, upright and enlarged on the object's own side — the magnifying glass. And a diverging lens has only one act: wherever the object stands, the image is virtual, upright and reduced, which is why such lenses serve as peepholes and as the correcting element for short sight.

Notice how the compact formula narrates all of this without a ray diagram. The denominator f − do is negative throughout the real-image regimes, giving negative m; it passes through zero at the focal point, where m explodes; and it turns positive inside f, flipping m upright. The numerator's sign carries the lens type: negative f (diverging) makes the denominator always negative and m always positive and less than 1 — one glance at m = f/(f − do) and the whole behaviour table can be reconstructed. That is the mark of a good formula: it does not just compute the answer, it explains the landscape the answer lives in.

object at 2f: m = −1 at f: image at ∞ image races away as object nears f far object → tiny image near f · between f and 2f → big image far away

How to use

  1. Enter the focal length f in centimetres — positive for a converging (convex) lens, negative for a diverging (concave) one. Convert from millimetres by dividing by 10: a 50 mm camera lens is f = 5 cm here.
  2. Enter the object distance do in centimetres, measured from the lens itself (for a camera, effectively from the lens's rear nodal point — the barrel marking is close enough for planning).
  3. Click "Calculate Magnification" to get m and di, with the image described as real or virtual, upright or inverted.
  4. Multiply m by the object's real height to predict the image height — the check that tells a photographer whether the subject fits the sensor.

Worked examples

Example 1 — enlarged and inverted. A converging lens has f = 10 cm and the object is do = 15 cm away. m = 10 ÷ (10 − 15) = 10 ÷ (−5) = −2 (image twice as large, inverted). di = (10 × 15) ÷ (15 − 10) = 150 ÷ 5 = 30 cm on the far side of the lens. The object stands between f and 2f — projector territory — and the numbers confirm it: a modest object distance buys a doubled image a third of a metre away.

Example 2 — a camera at portrait distance. A 50 mm lens is f = 5 cm; a sitter 2 m away is do = 200 cm. m = 5 ÷ (5 − 200) = −0.0256, and di = 5.13 cm — the sensor sits just 1.3 mm beyond the focal point, which is why camera focusing movements are so small at ordinary distances. A face 25 cm tall becomes an image of 25 × 0.0256 = 0.64 cm = 6.4 mm — comfortably inside a 24 mm-tall full-frame sensor.

Example 3 — will the person fit? The same 50 mm lens photographing a standing adult 1.7 m tall from 5 m: m = 5 ÷ (5 − 500) = −0.0101, so the image is 170 × 0.0101 = 1.72 cm = 17.2 mm tall — fits the 24 mm frame height with headroom. This is the calculation wedding photographers do instinctively: the formula turns "step back a bit" into arithmetic.

Example 4 — a projector. A projector lens of f = 20 cm images an LCD panel placed at do = 21 cm — just outside the focal point. m = 20 ÷ (20 − 21) = −20, and di = (20 × 21) ÷ 1 = 420 cm = 4.2 m. The 10 cm-wide panel becomes a 2 m-wide picture on a screen across the room. Nudge the panel 1 cm closer to f and the image would flee metres further and grow again — projectors focus by exploiting exactly this sensitivity.

Example 5 — the magnifying glass regime. Hold the f = 10 cm lens of Example 1 with the object at do = 6 cm, inside the focal length. m = 10 ÷ (10 − 6) = +2.5, and di = (10 × 6) ÷ (6 − 10) = −15 cm: a virtual image 15 cm behind the object side, upright and two and a half times enlarged — what your eye sees when it looks through the lens. Same lens, same formula, opposite sign: the address of the object changed everything.

Example 6 — a diverging lens. A concave lens with f = −10 cm views an object at do = 20 cm. m = −10 ÷ (−10 − 20) = +0.33, and di = (−10 × 20) ÷ (20 + 10) = −6.67 cm. The image is upright, one third size, virtual, and close to the lens — for every object distance. Door peepholes are built on this monotony: a wide world, shrunk upright into a small bright disc, always in the same place.

Lens magnification in real life

Photography and the crop question. "Will it fill the frame?" is m in disguise. Wildlife photographers compute m = f/(f − do) to learn how close they must approach, and macro shooters live at m = −1 and beyond, where focusing rails replace focusing rings because the image distance changes so violently.

Cinema and home projection. Throw ratio — screen width per unit distance — is this formula rearranged. Choosing a projector for a room is choosing an f whose m lands the panel's image exactly on the screen at the room's depth, as in Example 4.

Photocopiers and scanners. A copier promising 50%–200% copies is a lens shuttling between the symmetric positions this formula describes: m = −0.5, −1, −2 correspond to object and image distances swapping around the 2f point. The zoom of a copier is pure lens-equation choreography.

Microscope objectives. An objective marked 40× is a lens whose tube length fixes di so that m = −40 at its design object distance. The compact formula, run backwards, gives the working distance the specimen must sit at — fractions of a millimetre at high powers.

Vision correction. A spectacle lens forms a virtual image (positive m, negative di) at the distance the wearer's eye can actually handle. The optometrist's art is choosing f so the formula relocates the world to where the eye can use it.

Machine vision. Factory cameras inspecting parts are specified by magnification first: the sensor size and the part size fix m, the working distance fixes do, and the formula then dictates the lens focal length to buy. Industrial optics catalogues are organised around exactly this calculation.

object hₒ image hᵢ = m × hₒ lens dₒ dᵢ

The Newtonian form: measuring from the focal points

There is a second, older way to write the same physics that some designers prefer. Measure the object's distance not from the lens but from the front focal point — call it x = do − f — and the image's distance from the rear focal point, x′ = di − f. The lens equation then becomes the startlingly simple x × x′ = f², and the magnification is m = −f ÷ x = −x′ ÷ f. Example 1 checks instantly: f = 10, do = 15 gives x = 5, so x′ = 100 ÷ 5 = 20, di = 30 cm, and m = −10 ÷ 5 = −2. The Newtonian form makes the see-saw explicit: object and image trade distances from their focal points in inverse proportion, and when one is at f²'s worth of closeness the other is flung equally far. Camera bellows, projector focusing and microscope fine-focus all move along this hyperbola, and the compact formula of this page is its algebraic twin.

Quick reference: one lens, many magnifications (f = 10 cm)

Object distance doMagnification mImage distance diRegime
∞ (very far)≈ 010 cmimage at focal point
30 cm−0.515 cmcamera, reduced
20 cm (2f)−120 cmlife-size copying
15 cm−230 cmprojector, enlarged
11 cm−10110 cmnear the focal point
9 cm+10−90 cmmagnifier, virtual
5 cm+2−10 cmgentle magnifier

Read down the table and watch the focal point at 10 cm split the world: approach it from outside and the real image flees to 110 cm and beyond; step inside it and an even larger virtual image appears behind the lens. The symmetry between the 11 cm and 9 cm rows — both |m| = 10, opposite signs, wildly different image distances — is the whole personality of the thin lens in one glance.

Common mistakes

  • Mixing millimetres and centimetres. Camera lenses are specified in millimetres; this calculator works in centimetres. A 50 mm lens entered as f = 50 instead of 5 inflates every distance tenfold and turns a portrait into a landscape. Convert first: divide mm by 10.
  • Reading a negative m as "smaller" or "wrong". The sign is orientation, not size: −2 means twice as large and inverted. Dropping the sign loses the single most useful piece of information the formula gives — whether a screen can catch the image at all.
  • Expecting a screen image from a virtual result. Negative di means the image exists only where the eye, looking through the lens, perceives it. No screen placed anywhere will catch it — a fact that wastes much laboratory time when ignored.
  • Placing the object exactly at f and expecting a number. At do = f the image is at infinity and m is infinite; the calculator refuses, correctly. In practice, "at f" is how searchlights and collimators are set — the "image" is a parallel beam.
  • Forgetting the diverging lens sign. A concave lens needs f entered as negative. Enter it positive and the calculator will cheerfully invent a real image that the actual lens can never form.

FAQ

Where does m = f / (f − do) come from?
It is the ordinary magnification m = −di/do with the image distance from the lens equation substituted in. It is useful because it needs only the two quantities you usually know first: f and do.

What happens when the object is exactly at the focal point?
Then f − do = 0 and the magnification blows up — the rays leave the lens parallel and the image is formed at infinity, so no screen can catch it.

Can the magnification be greater than 1 with a virtual image?
Yes. If a converging lens has the object inside its focal length (do < f), m is positive and larger than 1 — that is exactly how a magnifying glass works: an upright, enlarged virtual image.

How do I get the image height from m?
Multiply: hi = m × ho. The sign tells you the orientation (negative = inverted). Example 3 shows the working pattern: a 1.7 m person at m = −0.0101 gives a 17.2 mm image — the fit-check every photographer and machine-vision engineer runs.

What magnification do I need for 1:1 macro?
m = −1, which happens when do = di = 2f. With a 60 mm macro lens (f = 6 cm) that means the subject sits 12 cm from the lens and the sensor 12 cm behind it — which is why 1:1 macro needs long lens barrels or bellows, and why depth of field there is measured in millimetres.

Why does the image distance change so little when I focus a camera?
Because at ordinary distances di hugs the focal point: from infinity to a 2 m portrait with a 50 mm lens, di moves only from 5.00 cm to 5.13 cm. The formula's denominator (do − f) is huge compared with f, so the quotient barely stirs — and the focusing helicoid needs only a millimetre or two of travel.

Can two lenses' magnifications combine?
Yes — magnifications multiply through a system. A microscope's total is the objective's lateral m times the eyepiece's angular magnification; a camera with a 1.4× teleconverter multiplies the lens's m by 1.4 (and its effective focal length likewise). Each stage is this page's formula applied in turn.

What is longitudinal magnification, and why is it m²?
Depth scales differently from height: a small movement of the object along the axis moves the image by m² times as much (with a sign change). It is why focusing is so touchy at high |m| — at m = −10, a 1 mm object movement shifts the image plane 100 mm — and why macro depth of field collapses so dramatically.

Does the formula work for mirrors too?
The algebra is identical with the mirror's focal length (f = R/2) and distances measured in front of the mirror. A concave mirror is the converging case, a convex mirror the diverging one; the compact form m = f/(f − do) and the same sign story apply — shaving mirrors and security mirrors included.

Why do phone photos of distant scenes have such tiny m?
A phone's focal length is only about 5 mm (0.5 cm), so even a subject 5 m away gives m ≈ −0.001: a 1.7 m person becomes a 1.7 mm image. The sensor is correspondingly small, so the picture still fills it — magnification is always relative to the format waiting to receive the image.

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 →