Free tool

Thin Lens Equation Calculator

Solve the thin lens equation for the focal length, the object distance or the image distance. Get the magnification, the image height, and whether the image is real or virtual, upright or inverted, magnified or reduced, with the working shown.

Works for mirrors too - same equation

The lens or mirror

Positive for a converging lens or concave mirror, negative for a diverging lens or convex mirror.

Use the same length unit for every distance (cm or m). The answer comes out in that unit.

Result

Enter the two known values.

The sign rules are what trip people up on optics problems. Encodr keeps them on a spaced-repetition schedule so they are automatic by the exam.

Get started free

The equations

Thin lens equation: 1/f = 1/do + 1/di, so di = f do / (do - f).

Magnification: m = hi/ho = -di/do. A negative m means the image is inverted; |m| greater than 1 means it is larger than the object.

Sign convention (OpenStax College Physics)

f is positive for a converging (convex) lens and negative for a diverging (concave) lens. do is positive for a real object. di is positive for a real image, which forms on the opposite side of a lens from the object, and negative for a virtual image on the same side as the object. The same equation works for spherical mirrors with f = R/2: f is positive for a concave mirror and negative for a convex one, and a real image forms in front of the mirror (di positive).

Worked example

An object sits 30.0 cm from a converging lens with f = 10.0 cm. 1/di = 1/10.0 - 1/30.0, so di = 15.0 cm and m = -15.0/30.0 = -0.500: a real, inverted image half the size of the object. Move the object to 5.00 cm, inside the focal length, and di = -10.0 cm with m = 2.00: a virtual, upright, magnified image, which is how a magnifying glass works. Put the object exactly at the focal point and the rays leave parallel, so no image forms at a finite distance (the image is at infinity). More in the thin lens equation guide.

From the blog

Thin lens equation and magnification, worked examples

How to use 1/f = 1/do + 1/di and m = -di/do, the sign rules that decide real vs virtual, and worked lens and mirror examples.

Read →

What's in College Physics II: the 15 units, in order

The 15 units of a second-semester algebra-based physics course, from Coulomb's law to particle physics, mapped to OpenStax College Physics 2e chapters 18-34.

Read →

Series vs parallel circuits, with worked examples

How current, voltage and resistance behave in series and parallel circuits, with the formulas and step-by-step examples including a mixed circuit.

Read →

First-year biology, chemistry and physics, compared

What General Biology I and II, General Chemistry I and II, and College Physics I and II each cover, how they fit together, and free flashcards for each.

Read →

Related tools

Engineering Unit Converter

Convert between metric and imperial units for length, mass, pressure/stress, torque, and volume flow rate - built for engineering coursework, not just everyday conversions.

Open tool →

Error Propagation Calculator

Enter two measurements with their uncertainties to see the propagated uncertainty in a sum, difference, product, or quotient.

Open tool →

Kinematics Calculator (SUVAT Solver)

Enter any three of displacement, initial velocity, final velocity, acceleration and time to solve the other two, with the equation shown.

Open tool →

Projectile Motion Calculator

Enter launch speed, angle and height to get time of flight, range, maximum height and impact velocity, with the working shown.

Open tool →

Series and Parallel Resistor Calculator

Equivalent resistance for 2 to 8 resistors in series or parallel, plus current, voltage drop and power for each one.

Open tool →

All free tools