Back to Physics calculators

Lens & Mirror Equation — with steps and ray diagram

Solve the thin lens and spherical mirror equation in classroom-ready form: compute image distance dᵢ, magnification, and image height while the ray diagram updates in sync with every change.

Designed for optics classes and homework checks, the workspace keeps the sign convention visible, records the derivation steps, and exports CSV when you need a quick lab or worksheet handout.

Other languages 日本語 | English | 简体中文 | 繁體中文 | 繁體中文(香港) | Español | Español (México) | Português (Brasil) | Português (Portugal) | Bahasa Indonesia | Tiếng Việt | 한국어 | Français | Deutsch | Italiano | Русский | हिन्दी | العربية | বাংলা | اردو | Türkçe | ไทย | Polski | Filipino | Bahasa Melayu | فارسی | Nederlands | Українська | עברית | Čeština
Inputs
Advanced: Lensmaker & mirror radius helpers

Provide n, R₁, and R₂ to compute the lensmaker focal length f = 1 / ((n−1)(1/R₁ − 1/R₂)). For mirrors, the helper reports f = R/2.

Keyboard shortcuts: Ctrl+Enter runs the calculation, Ctrl+S exports the CSV, Ctrl+L copies the share URL.

Result summary

How it's calculated

    Ray diagram

    The canvas plots the optical axis, focal points, object arrow, image arrow, and the three principal rays. Virtual rays are dashed for easy differentiation.

    How to use this calculator effectively

    Pick the correct device first: lens or mirror, then choose whether it is converging/concave or diverging/convex. Enter focal length, object distance, and object height to see the image position, magnification, and ray diagram update together.

    How it works

    The calculator applies the thin lens or spherical mirror equation with the Gaussian sign convention. It then derives image distance, magnification, and image height from the same solved state so the numeric results and ray diagram stay consistent.

    When to use

    Use it for classroom demonstrations, homework checks, and quick optics intuition. It is especially useful when you want to compare how sign changes, object position, or focal length affect whether the image is real, virtual, upright, or inverted.

    Common mistakes to avoid

    Interpretation and worked example

    For a converging lens with the object outside the focal length, the image distance becomes positive and the image is real. Move the object inside the focal length and the result flips to a virtual upright image, which is a fast way to check whether your sign choices make physical sense.

    See also

    FAQ

    How do I know if the image is real or virtual?

    The sign convention follows the Gaussian Cartesian rule: dᵢ > 0 indicates a real image on the outgoing side, whereas dᵢ < 0 marks a virtual image on the object side. The magnification sign shows whether the image is upright (m > 0) or inverted (m < 0).

    What ray diagram does the tool draw?

    We plot the parallel ray through the focus, the ray that heads toward the focus and exits parallel, and the central ray. Dashed segments denote virtual extensions so diverging lenses and convex mirrors remain easy to follow.

    What should I check first after I enter values?

    Confirm the selected element type and the focal-length sign first, then check whether the ray diagram and the real/virtual label agree with the same scenario.

    Why can lens or mirror optics results differ from nearby tools?

    Differences usually come from sign convention, focal length, object distance, and image interpretation. Match those assumptions before comparing this result with another CalcBE page, spreadsheet, or external tool.

    How should I judge the reliability of the result?

    Use the displayed result as reliable for the stated sign convention, focal length, object distance, and image interpretation. For official reporting, regulated work, or purchasing decisions, verify the inputs against the source document or provider rule you must follow.

    How to use Optics Lens Calculator effectively

    What this page is for

    Use this page to solve lens or mirror relationships from focal length, object distance, and image distance. Start by confirming the sign convention.

    Input checks

    Check whether distances are measured from the lens or mirror and whether the image is real or virtual. Sign errors are the main source of wrong optics results.

    Workflow

    A practical sequence is to solve the missing distance, then review magnification and image orientation.

    Common mistakes

    Avoid mixing conventions from different textbooks in one calculation. The formulas can look similar while signs differ.

    How to read the result

    Interpret image distance and magnification together. They explain both where the image forms and how its size or orientation changes.

    How it’s calculated

    • We solve the thin-lens or mirror equation with the Gaussian sign convention and then derive magnification from m = −dᵢ/dₒ.
    • The summary reports image distance, image height, and real/virtual plus upright/inverted classification from one consistent solve.
    • The ray diagram uses the same solved geometry, so the plotted rays and the numeric result stay in sync.