The thin lens equation relates the three key distances in any optical system: focal length, object distance and image distance. Written as 1/f = 1/do + 1/di, it applies equally to converging lenses (convex, positive focal length), diverging lenses (concave, negative focal length) and curved mirrors under the same sign convention. You enter any two of the three values and choose which quantity you want to solve for, and the calculator returns the missing distance along with the lateral magnification, image type and orientation. Focal length is a fixed property of the lens or mirror: positive for converging optics and negative for diverging optics. Object distance do is almost always positive and is measured from the optical centre to the object. Image distance di can be positive or negative: positive means a real image forms on the far side of a lens (or in front of a mirror), and negative means a virtual image appears on the same side as the object (or behind a mirror). Magnification M equals negative di divided by do. A negative M means the image is inverted; a positive M means it is upright. A magnitude greater than one means the image is enlarged. This calculator supports converging lens mode, diverging lens mode and concave mirror mode. It is suited to secondary school and university physics optics problems, and to photographers and optical engineers checking system geometry. The real-is-positive sign convention is used throughout. Results are ideal thin-lens approximations; thick-lens effects, aberrations and chromatic dispersion are not modelled.
Sign convention: distances in front of the lens or mirror are positive. A negative focal length indicates a diverging lens or convex mirror. Results are thin-lens approximations only.
The thin lens equation is 1/f = 1/do + 1/di. Rearranging for image distance: 1/di = 1/f minus 1/do, so di = 1 divided by (1/f minus 1/do). For object distance: do = 1 divided by (1/f minus 1/di). For focal length: f = 1 divided by (1/do + 1/di). Lateral magnification is M = negative di divided by do. A positive di indicates a real image where light actually converges; a negative di indicates a virtual image where rays appear to diverge from that point. For a converging lens or concave mirror enter a positive focal length; for a diverging lens or convex mirror enter a negative focal length.
A converging lens has a focal length of 20 cm. An object sits 30 cm from the lens. Solving for image distance: 1/di = 1/20 minus 1/30 = 3/60 minus 2/60 = 1/60, so di = 60.00 cm. The image is real (positive di) and forms 60 cm on the far side of the lens. Magnification M = negative 60 divided by 30 = negative 2.00x: the image is inverted and twice the height of the object.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use
Reviewed and maintained. Last reviewed 2026-07-02 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.
© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.