Lens Magnification Calculator
Calculate lens magnification, image distance, and image height using the thin lens equation.
About
Magnification describes how an optical system changes the apparent size and orientation of an object. For a thin lens, linear (transverse) magnification is defined as the ratio of image height to object height, m = hᵢ / hₒ. By the geometry of similar triangles in the lens ray diagram, this ratio equals the negative ratio of image distance to object distance: m = -dᵢ / dₒ. The thin lens equation itself, 1/f = 1/dₒ + 1/dᵢ, links the focal length f to the object and image distances.
The sign of m carries crucial information. A negative magnification means the image is inverted (top-bottom flipped relative to the object), and such images are real — they form where rays actually converge and can be projected onto a screen. A positive magnification means the image is upright, and such images are virtual — they form where rays only appear to diverge from, visible through the lens but not on a screen. The magnitude |m| tells you the size ratio: |m| > 1 enlarges, |m| < 1 reduces.
Convex (converging) lenses have a positive focal length and can produce both real inverted images (when the object sits beyond the focal length) and virtual upright enlarged images (when the object is inside the focal length, the magnifying-glass case). Concave (diverging) lenses have a negative focal length and always produce virtual, upright, reduced images regardless of object position. This calculator lets you flip between the two lens types and see how the sign conventions play out.
The thin lens equation applies under two approximations: the lens must be thin (its thickness negligible compared to its focal length), and rays must be paraxial (close to and nearly parallel to the optical axis). For thick lenses, multi-element systems, or wide-aperture optics, the simple Gaussian form breaks down and you need to trace rays through principal planes and apply more complete third-order corrections. For introductory optics, homework problems, and most practical single-lens setups, the thin lens equation is the right tool.
Beyond linear magnification, optical instruments also use angular magnification — the ratio of the angular size of the image as seen by the eye to the angular size of the object at a reference distance (the near point of 25 cm for the unaided eye). A simple magnifier has angular magnification M ≈ 25 cm / f, so a +5 D lens (f = 20 cm) gives M ≈ 1.25× and a +10 D lens gives 2.5×. Compound microscopes and astronomical telescopes chain the angular magnifications of the objective and eyepiece to achieve much larger values (100× to 1000× for microscopes).
This calculator solves the thin lens equation for the focal length given the object and image distances, then computes the magnification and image height from those inputs. It also classifies the image as real/virtual, inverted/upright, and enlarged/reduced/same-size based on the signs and magnitude of m. A verification row re-evaluates 1/f - 1/dₒ - 1/dᵢ as a sanity check on the equation.
How to Use
- 1Choose the lens typeSelect Convex (converging, f positive) for magnifying glasses, camera lenses, or reading glasses for farsighted eyes. Select Concave (diverging, f negative) for lenses used to correct nearsightedness or to spread a beam of light.
- 2Enter the object and image distancesType the object distance dₒ (cm) — how far the object sits in front of the lens. Then enter the image distance dᵢ (cm). For a real image, dᵢ is positive (image on the far side). For a virtual image, enter a negative dᵢ (image on the same side as the object).
- 3Enter the object heightType the object height hₒ in cm. The calculator uses this to compute the image height hᵢ = m × hₒ. If you only care about magnification, any nonzero value works — try 1 cm for a unit reference.
- 4Read the focal length, magnification, and image typeThe hero block reports the focal length f. The breakdown shows magnification m, image height hᵢ, the sign convention (real/inverted or virtual/upright), and verifies 1/f = 1/dₒ + 1/dᵢ.
- 5Switch the lens type to verify sign conventionsIf you toggle the lens type, the sign of f flips and the magnification sign interpretation changes accordingly. Use this to build intuition about how convex and concave lenses form images of the same object at the same distance.
- 6Reset and try another scenarioClick Reset to restore defaults. Try classic setups: a magnifying glass (dₒ < f, convex) produces a virtual upright magnified image; a slide projector (dₒ just above f, convex) produces a real inverted enlarged image.
Formula
Thin lens equation (Gaussian lens formula):
1/f = 1/dₒ + 1/dᵢ
Linear (transverse) magnification:
m = hᵢ / hₒ = -dᵢ / dₒ
Image height:
hᵢ = m × hₒ
Sign conventions:
- f > 0 for convex (converging); f < 0 for concave (diverging)
- dₒ > 0 for real objects (always, in this calculator)
- dᵢ > 0 for real images; dᵢ < 0 for virtual images
- m < 0 → inverted (real); m > 0 → upright (virtual)
- |m| > 1 enlarged; |m| < 1 reduced; |m| = 1 same size
Worked Example
A 10-cm tall object sits 15 cm in front of a convex lens and forms a real image 30 cm behind the lens. What are the focal length, magnification, and image height?
- Known: dₒ = 15 cm, dᵢ = 30 cm, hₒ = 10 cm, convex (f > 0)
- 1/f = 1/15 + 1/30 = 2/30 + 1/30 = 3/30 = 1/10
- f = 10 cm
- m = -dᵢ / dₒ = -30 / 15 = -2
- hᵢ = m × hₒ = -2 × 10 = -20 cm (negative = inverted)
- Image: real, inverted, enlarged (2× magnification)
Reverse example — a magnifying glass (f = 10 cm, convex) with the object 8 cm in front of the lens:
- 1/dᵢ = 1/f - 1/dₒ = 1/10 - 1/8 = 4/40 - 5/40 = -1/40
- dᵢ = -40 cm (negative = virtual image on same side as object)
- m = -dᵢ / dₒ = -(-40) / 8 = +5
- Image: virtual, upright, enlarged 5×
Tips
- Always work in consistent units (cm or m) — the magnification is unitless, but the focal length and distances must share the same unit so the equation balances.
- Treat dᵢ as a signed quantity: positive for real images (opposite side of lens from object), negative for virtual images (same side as the object). This single sign carries real/virtual information.
- If your computed magnification has the wrong sign, double-check the lens type. Convex lenses can produce both real inverted (m < 0) and virtual upright (m > 0) images depending on object position; concave lenses always produce virtual upright reduced images (0 < m < 1).
- For magnifying-glass setups, the virtual image is on the same side as the object (dᵢ negative), and the eye sees an upright, enlarged image. The angular magnification is roughly 25 cm / f for the relaxed eye.
- For thick or multi-element lenses (camera lenses, microscope objectives), use principal planes and effective focal length — the simple thin lens equation breaks down when lens thickness is comparable to f.
Common Mistakes
- Forgetting the negative sign in m = -dᵢ / dₒ — without it, you lose the orientation information and misclassify real vs virtual images.
- Using a positive dᵢ for virtual images — virtual images have dᵢ < 0; the negative sign is what makes m positive (upright) for magnifier setups.
- Switching the lens-type sign convention inconsistently — convex lenses have f > 0, concave lenses have f < 0. If you mix this up, the magnification sign will be wrong.
- Mixing units — dₒ, dᵢ, f, hₒ, hᵢ must all use the same length unit. The equation balances only when cm is used throughout (or m throughout).
- Treating the thin lens equation as universal — it breaks down for thick lenses, wide-aperture rays, and multi-element systems where principal-plane corrections are needed.
Frequently Asked Questions
- What is the magnification formula for a thin lens?
- For a thin lens, magnification m is defined as the ratio of image height to object height, which equals the negative ratio of image distance to object distance: m = -dᵢ / dₒ. The negative sign carries the orientation information — a negative m means the image is inverted relative to the object (typical of real images formed by convex lenses), while a positive m means the image is upright (typical of virtual images from concave lenses or magnifying-glass setups).
- How does a convex lens differ from a concave lens in this calculator?
- A convex (converging) lens has a positive focal length; it focuses parallel rays to a real focal point on the far side. A concave (diverging) lens has a negative focal length; it spreads parallel rays as if they came from a virtual focal point on the near side. The calculator flips the sign of f based on your selection, and the magnification and image type follow the sign conventions of the thin lens equation 1/f = 1/dₒ + 1/dᵢ.
- What makes an image real versus virtual?
- A real image forms where rays actually converge — you can project it onto a screen. It is always inverted (m negative) and occurs when dᵢ is positive. A virtual image forms where rays only appear to come from; it cannot be projected and is always upright (m positive), with dᵢ negative. Convex lenses produce real images when the object is beyond the focal length and virtual images (magnifying glass) when the object is inside f. Concave lenses always form virtual, reduced, upright images.
- Why is the magnification negative for a real image?
- The negative sign in m = -dᵢ / dₒ is a sign convention that encodes orientation. For a real image, dᵢ is positive (image on the far side of the lens) and dₒ is positive (real object), so m is negative — meaning the image is inverted top-to-bottom. For a virtual image, dᵢ is negative, so m becomes positive, meaning the image is upright. The magnitude |m| tells you how much bigger or smaller the image is than the object.
- What is the thin lens equation and when does it apply?
- The thin lens equation (Gaussian lens formula) is 1/f = 1/dₒ + 1/dᵢ, where f is the focal length, dₒ the object distance, and dᵢ the image distance. It applies when the lens is thin (thickness negligible vs. f) and rays are paraxial (close to and nearly parallel to the optical axis). For thick lenses, multiple-element systems, or wide-aperture optics, you need ray-tracing through principal planes and a more complete treatment.
- What is linear vs angular magnification?
- Linear (transverse) magnification m = hᵢ / hₒ = -dᵢ / dₒ compares image height to object height — what this calculator reports. Angular magnification (used for magnifying glasses, microscopes, and telescopes) compares the angular size of the image as seen by the eye to the angular size of the object at a reference distance (often 25 cm, the near point). For a simple magnifier, angular magnification ≈ 25 cm / f, which is why a +10 D lens (f = 10 cm) gives about 2.5× magnification.
Magnification sign convention
Magnification m = hᵢ / hₒ = -dᵢ / dₒ. The negative sign encodes orientation: a negative m means the image is inverted (top-bottom flipped) and is real; a positive m means the image is upright and is virtual. The magnitude |m| tells you the size ratio: |m| > 1 means enlarged, |m| < 1 means reduced, and |m| = 1 means same size. Always use the sign convention consistently — mix-ups are the most common student error.
Real vs virtual images
A real image forms where rays actually converge — you can capture it on a screen, film, or sensor. It is always inverted. A virtual image forms where rays only appear to diverge from — it cannot be projected, but the eye (or a camera) sees it through the lens. It is always upright. Convex lenses form real images when dₒ > f (projector, camera) and virtual images when dₒ < f (magnifier). Concave lenses always form virtual, reduced images.
Convex (converging) vs concave (diverging)
Convex lenses are thicker in the middle than at the edges — they bend parallel rays toward a real focal point on the far side, so f > 0. They magnify, focus, and form real images. Concave lenses are thinner in the middle — they spread parallel rays as if from a virtual focal point on the near side, so f < 0. They minify, diverge, and form only virtual, reduced, upright images. Eyeglasses for nearsightedness use concave lenses; farsightedness and reading glasses use convex.
Linear vs angular magnification
Linear (transverse) magnification m = hᵢ / hₒ compares actual image and object heights — what this calculator computes. Angular magnification M = θ_image / θ_reference compares apparent angular sizes at the eye, with the reference taken at the near-point distance of 25 cm. For a simple magnifier M ≈ 25 cm / f, so a +5 D lens (f = 20 cm) gives M ≈ 1.25×. Microscopes and telescopes chain magnifications multiplicatively, with the total angular magnification being the product of the objective and eyepiece contributions.
| Setup | dₒ | dᵢ | f | m | Image |
|---|---|---|---|---|---|
| dₒ = 2f (object at 2f) | 20 cm | 20 cm | 10 cm | -1× | -10 cm (real, inverted, same size) |
| dₒ > 2f (far object) | 30 cm | 15 cm | 10 cm | -0.5× | -5 cm (real, inverted, reduced) |
| f < dₒ < 2f (projector) | 15 cm | 30 cm | 10 cm | -2× | -20 cm (real, inverted, enlarged) |
| dₒ < f (magnifier) | 8 cm | -40 cm | 10 cm | +5× | +50 cm (virtual, upright, enlarged) |
| dₒ at infinity (camera) | ∞ | 10 cm | 10 cm | 0× (point) | Image at focal plane |
Authoritative References
- Wikipedia — Lens (optics)— WikipediaComprehensive overview of lens types, the thin lens equation, sign conventions, magnification, and aberrations.
- Khan Academy — Geometric optics— Khan AcademyFree video lessons on lenses, mirrors, magnification, ray diagrams, and the thin lens equation with worked examples.
- The Physics Classroom — Refraction and Lenses— physicsclassroom.comStep-by-step tutorial on the mathematics of lenses, including the lens equation and magnification with practice problems.
Try our other free calculators
CalcGenius has 1,200+ free, ad-free, browser-based calculators for finance, health, math, science, and everyday life. No sign-up required.