What is the Thin Lens Equation Calculator?
This calculator solves the classic thin lens equation, \(\frac{1}{f} = \frac{1}{d_o} + \frac{1}{d_i}\), which links the focal length of a lens (\(f\)) to the distance of an object from the lens (\(d_o\)) and the distance of the resulting image (\(d_i\)). It also computes the linear magnification \(M = -\frac{d_i}{d_o}\) and the optical power \(P = \frac{1}{f}\). It works for both converging (positive \(f\)) and diverging (negative \(f\)) lenses under the thin-lens approximation, where the lens thickness is negligible compared with the distances involved.
How to use it
Enter any two of the three quantities and leave the third blank (or zero). The calculator solves for the missing value. Always use the same length unit for all three values — centimetres or metres. Follow the sign convention: object distances are positive on the incoming-light side, real images have positive \(d_i\), and virtual images have negative \(d_i\).
The formula explained
Rearranging $$\frac{1}{f} = \frac{1}{d_o} + \frac{1}{d_i}$$ lets you isolate any term. For the image distance: \(\frac{1}{d_i} = \frac{1}{f} - \frac{1}{d_o}\), so \(d_i = \frac{1}{\frac{1}{f} - \frac{1}{d_o}}\). The magnification compares image and object size; \(|M| > 1\) means the image is enlarged, and a negative \(M\) means the image is inverted.
Worked example
A converging lens has \(f = 10\ \text{cm}\) and an object sits \(d_o = 15\ \text{cm}\) away. Then $$\frac{1}{d_i} = \frac{1}{10} - \frac{1}{15} = 0.1 - 0.0667 = 0.0333,$$ so \(d_i = 30\ \text{cm}\). The magnification is \(M = -\frac{30}{15} = -2\), meaning the image is real, inverted and twice the object size.
FAQ
What does a negative focal length mean? It indicates a diverging (concave) lens, which always forms a reduced, upright, virtual image.
What if my image distance comes out negative? A negative \(d_i\) signals a virtual image formed on the same side as the object.
Does this work for mirrors too? The mirror equation has the same form, but sign conventions differ; this tool is set up for thin lenses.