Mirror & Lens Equation Calculator
Find image distance and magnification.
Result
How it is calculated
The tool solves 1/di = 1/f − 1/do for the image distance, then m = −di / do. Here f is the focal length, do the object distance and di the image distance, all in one length unit (the unit cancels in the magnification).
Sign convention used: object distance must be positive; focal length is positive for a converging lens or concave mirror and negative for a diverging lens or convex mirror. A positive di is a real image, a negative di a virtual one. A negative m means inverted. Results show four decimals. No result is given when the object distance is zero or negative, the focal length is zero, or the object sits exactly at the focal point, where the image would be at infinity.
Worked example
A converging element with f = 10 and an object at do = 30. Then 1/di = 1/10 − 1/30 = 3/30 − 1/30 = 2/30, so di = 15.0000. Magnification is −15 / 30 = −0.5000. The image is real (positive distance), inverted (negative sign) and half the size of the object. Moving the object to 5 with the same f would give di = −10 and m = 2: a virtual, upright, enlarged image.
Common mistakes
- Entering a negative focal length for an ordinary magnifying glass or concave mirror. Those are positive; only diverging lenses and convex mirrors take a negative
f. - Placing the object exactly at the focal length and expecting a number. The image is at infinity there, so the tool gives no result.
- Reading a negative magnification as 'smaller'. The minus sign only means inverted; the size is the absolute value, so −2 is twice as large and upside down.
- Mixing units, such as f in centimetres and the object distance in metres. Use the same unit for both, and the image distance comes back in that unit.
- Treating a negative image distance as an error. It is a valid answer meaning a virtual image on the same side as the object.
About this calculator
This calculator solves the thin lens/mirror equation, 1/f = 1/do + 1/di, relating focal length f, object distance do, and image distance di for a lens or curved mirror, and derives magnification as m = −di/do — a negative m means an inverted image, while |m| > 1 means the image is magnified relative to the object.
This single equation, with a sign convention distinguishing converging from diverging elements, predicts whether a lens or mirror produces a real or virtual image, upright or inverted, and how large — the exact same physics that determines how a camera lens focuses light onto a sensor, how a magnifying glass or telescope eyepiece works, and how a concave shaving mirror produces an enlarged upright image at close range.
Physics students working through optics problems, optical engineers designing camera and telescope systems, and photography and astronomy enthusiasts curious about how their equipment forms images all use this calculator, entering focal length and object distance.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
Two quick checks catch most input mistakes. With the object at twice the focal length, the image should also sit at twice the focal length with magnification -1: same size, inverted. With the object very far away, the image distance should land close to the focal length. If you see something else, recheck your signs. Note that this is the thin-lens, near-axis model, so thick lenses and aberrations are not covered. Are you working with a lens or a mirror?