Lens Equation Calculator
Where a Lens Actually Forms Its Image
Every camera lens, magnifying glass, and eyeglass prescription obeys the same underlying relationship between how far away an object sits, how far away its image forms, and the lens's own focal length. The thin lens equation is the tool optical designers reach for first, and it works for both converging and diverging lenses once sign conventions are applied consistently.
The Formula
f is focal length, do is object distance, and di is image distance, all measured from the lens along its optical axis using consistent units and sign convention. Rearranged, the calculator solves for any one of the three given the other two.
Where This Equation Is the Design Tool
- Camera and telescope optics — lens focal length selection and focusing distance are worked out directly from this relationship.
- Eyeglass and contact lens prescriptions — corrective lens power is specified in diopters, which is just the reciprocal of focal length in meters.
- Microscopy — magnification and working distance for objective lenses are set using the same object-image-focal length relationship.
- Projector and enlarger design — throwing a sharp, correctly sized image over a given distance requires solving this equation for the right focal length.
How Image Distance Shifts With Object Distance
For a fixed 10 cm converging lens, moving the object farther away brings the image distance closer to the focal length:
| Object distance (do) | Image distance (di) |
|---|---|
| 15 cm | 30 cm |
| 20 cm | 20 cm |
| 30 cm | 15 cm |
| 50 cm | 12.5 cm |
At do = 20 cm (twice the focal length), the image forms at exactly the same distance on the other side — the classic 1:1 magnification point for a converging lens.
How to Use This Calculator
- Choose what to solve for: Solve for Image Distance (di), Solve for Object Distance (do), or Solve for Focal Length (f).
- Enter the two known values from Focal Length (f), Object Distance (do), and Image Distance (di), using consistent units and sign convention.
- Select Calculate to see the unknown distance along with the worked formula.
Related Calculations
For the energy carried by the light passing through that lens, see the Photon Energy Calculator, or relate the light's wavelength and frequency with the Wavelength Calculator.