PublicSoftTools

Lens & Mirror Calculator

Solve the thin lens equation for focal length, image distance, object distance, and magnification. Supports converging and diverging lenses, and concave and convex mirrors. No signup, runs entirely in your browser.

⏱ 7 min read · Complete guide below

1/f = 1/dₒ + 1/dᵢ
Solve for:
Image Distance33.333 cm
Magnification m-0.6667
Real image · Diminished · Inverted

How to Use the Lens & Mirror Calculator

  1. 1Choose the optic type: converging or diverging lens, concave or convex mirror.
  2. 2Enter any two of the three distances — focal length (f), object distance (dₒ), image distance (dᵢ) — in consistent units (cm or m).
  3. 3The calculator solves 1/f = 1/dₒ + 1/dᵢ for the missing value and reports the magnification m = −dᵢ/dₒ.
  4. 4Interpret the signs: positive dᵢ = real image, negative dᵢ = virtual; negative m = inverted, positive m = upright.

Worked Example: One Lens, Two Very Different Images

Take a converging lens with focal length f = 10 cm and place an object 15 cm away. Solving the thin lens equation: 1/dᵢ = 1/10 − 1/15 = 1/30, so dᵢ = +30 cm. Magnification m = −30/15 = −2: the image is real (it can be focused onto a screen), inverted, and twice the object's size. This is the projector configuration — object just beyond the focal point, enlarged real image on the far side.

Now slide the same object inside the focal point, to 5 cm. The math flips sign: 1/dᵢ = 1/10 − 1/5 = −1/10, so dᵢ = −10 cm and m = −(−10)/5 = +2. The image is virtual, upright, and doubled — you cannot project it, but looking through the lens you see it magnified. That is exactly how a magnifying glass works. Same lens, same equation; the only change is whether the object sits beyond or inside the focal length.

One Equation for Lenses and Mirrors

The elegant thing about basic optics is that a single relationship governs both lenses and curved mirrors: 1/f = 1/dₒ + 1/dᵢ, linking the focal length, the object distance, and the image distance. Because there are three quantities in one equation, knowing any two lets you solve for the third — which is exactly what this calculator does. The magnification, m = −dᵢ/dₒ, then tells you the image's size and orientation. The reason the same maths applies to a converging lens and a concave mirror is that both bend light to a focus; the only bookkeeping difference is that a mirror folds the light back onto the same side as the object, while a lens passes it through to the far side. Get comfortable with this one equation and a huge range of optics problems become routine.

Real Images vs Virtual Images

The single most important distinction in image formation is between real and virtual images, and the sign of the image distance tells you which you have. A real image (positive dᵢ) forms where light rays physically converge, so it can be projected onto a screen — this is how a camera, a projector, and the human eye form images. A virtual image (negative dᵢ) forms where rays only appear to come from; it cannot be caught on a screen but is perfectly visible when you look through the optic — this is what a magnifying glass, a diverging lens, or a bathroom mirror produces. The magnification sign completes the picture: negative means inverted, positive means upright. Reading these two signs turns a bare number into a full description of the image.

The Optics Behind Everyday Devices

These calculations are not just exam exercises — they describe the devices around you. A magnifying glass is a converging lens with the object placed inside its focal length, giving the enlarged, upright virtual image from the worked example. A camera or projector places the object beyond the focal length to form a real image on a sensor or screen. A concave shaving or makeup mirrorenlarges your reflection the same way. Meanwhile diverging lenses and convex mirrors — used in peepholes, wide-angle car mirrors, and some glasses — always shrink the scene into an upright virtual image, trading size for a wider field of view. Changing a single distance in this calculator reproduces the behaviour of each of these instruments.

Optics Tips

Real vs virtual images

Positive image distance = real image (can be projected on a screen). Negative image distance = virtual image (appears to be on the same side as the object).

Focal point check

When the object is exactly at the focal point (dₒ = f), the image is at infinity. The tool returns a very large value — this is physically correct, not an error.

Magnification sign

Negative magnification means the image is inverted relative to the object. Positive magnification means the image is upright. The magnitude indicates size ratio.

Diverging lenses

Diverging lenses and convex mirrors always produce virtual, upright, diminished images regardless of object position. Focal length is entered as positive — the tool applies the negative sign internally.

Frequently Asked Questions

What is the thin lens equation?

The thin lens equation is 1/f = 1/dₒ + 1/dᵢ, where f is the focal length, dₒ is the object distance, and dᵢ is the image distance. The same equation applies to curved mirrors using the mirror equation.

What does magnification mean?

Magnification m = -dᵢ/dₒ. A value of +2 means the image is twice the size and upright (virtual). A value of -0.5 means the image is half the size and inverted (real). m = 1 means the same size.

What is the sign convention?

For lenses: object distance is positive when the object is in front of the lens (real object). Image distance is positive for real images (on the far side) and negative for virtual images. Focal length is positive for converging lenses and negative for diverging ones.

What is the difference between a real and virtual image?

A real image forms where light rays actually converge — it can be projected onto a screen. A virtual image forms where rays appear to diverge from — it cannot be projected. Diverging lenses and convex mirrors always form virtual images.

How does a concave mirror differ from a converging lens?

Both can form real inverted images when the object is beyond the focal point. The key difference is that mirrors work by reflection so the image forms on the same side as the object, while lenses form images on the opposite side.

Is my data stored?

No. All calculations run locally in your browser. No data is sent to any server.

Does the same equation really work for both lenses and mirrors?

Yes. The thin lens equation, 1/f = 1/dₒ + 1/dᵢ, and its magnification relation, m = −dᵢ/dₒ, apply to both thin lenses and curved mirrors. Both bend light to a focus, so the mathematics is identical. The main practical difference is geometry: a mirror reflects light back so the image forms on the same side as the object, while a lens transmits light so a real image forms on the opposite side. Careful sign conventions handle the rest.

How do I tell if an image will be real or virtual?

Look at the sign of the image distance the calculator returns. A positive image distance means a real image, which forms where light actually converges and can be projected onto a screen. A negative image distance means a virtual image, which only appears to exist and cannot be projected, though you can see it by looking through the optic. Diverging lenses and convex mirrors always produce virtual images regardless of object position.

What does the magnification value tell me?

Magnification m = −dᵢ/dₒ describes both the size and orientation of the image. Its magnitude is the size ratio: |m| greater than 1 means the image is enlarged, less than 1 means reduced, and exactly 1 means the same size. Its sign gives orientation: a negative value means the image is inverted (upside down relative to the object), and a positive value means it is upright. So m = −2 is an enlarged, inverted image, while m = +0.5 is a reduced, upright one.

Why does the calculator return a huge image distance sometimes?

When the object is placed exactly at the focal point (object distance equals focal length), the outgoing rays become parallel and the image forms at infinity. Mathematically the equation gives an infinite image distance, so the tool reports a very large number. This is physically correct, not an error — it is the principle behind spotlights and collimators, where a source at the focus produces a parallel beam.

What is the sign convention for object and focal distances?

For a real object placed in front of the optic, the object distance is positive. Focal length is positive for converging lenses and concave mirrors, and negative for diverging lenses and convex mirrors — though this tool lets you select the optic type and applies the correct sign internally, so you can enter the focal length as a positive value. The image distance then comes out positive for real images and negative for virtual ones, following the standard convention.