{
    "name": "Thin Lens Equation Calculator",
    "url": "https://calculators.geekmidst.com/calculators/optical-lens-equation-calculator",
    "markdown": "https://calculators.geekmidst.com/calculators/optical-lens-equation-calculator.md",
    "category": "Science & engineering",
    "description": "Solve the thin lens equation 1/f = 1/do + 1/di for image distance, object distance or focal length, with magnification, image type and lens power.",
    "summary": "For a thin lens, 1/f = 1/do + 1/di links focal length, object distance and image distance. Enter two and get the third, plus how large the image is and whether it is real or virtual.",
    "also_called": [
        "Lens formula calculator",
        "Lensmaker image calculator"
    ],
    "applies_to": "Worldwide",
    "last_updated": "2026-10-29",
    "computation": "Results are computed in the visitor’s browser on the HTML page. This API describes the calculator; it does not compute results.",
    "inputs": [
        {
            "name": "solve_for",
            "label": "Find",
            "type": "segmented",
            "default": "image",
            "options": {
                "image": "Image distance",
                "object": "Object distance",
                "focal": "Focal length"
            }
        },
        {
            "name": "focal",
            "label": "Focal length f",
            "type": "number",
            "default": "10",
            "unit": "cm",
            "shown_when": {
                "solve_for": [
                    "image",
                    "object"
                ]
            }
        },
        {
            "name": "object",
            "label": "Object distance do",
            "type": "number",
            "default": "30",
            "unit": "cm",
            "shown_when": {
                "solve_for": [
                    "image",
                    "focal"
                ]
            }
        },
        {
            "name": "image",
            "label": "Image distance di",
            "type": "number",
            "default": "15",
            "unit": "cm",
            "shown_when": {
                "solve_for": [
                    "object",
                    "focal"
                ]
            }
        }
    ],
    "outputs": [
        {
            "key": "image",
            "label": "Image distance di",
            "format": "number"
        },
        {
            "key": "object",
            "label": "Object distance do",
            "format": "number"
        },
        {
            "key": "focal",
            "label": "Focal length f",
            "format": "number"
        },
        {
            "key": "magnification",
            "label": "Magnification m = −di/do",
            "format": "multiple"
        },
        {
            "key": "image_type",
            "label": "Image",
            "format": "text"
        },
        {
            "key": "power",
            "label": "Lens power",
            "format": "number"
        }
    ],
    "formula": {
        "text": "1/f = 1/do + 1/di;  m = −di ÷ do;  P (dioptres) = 1 ÷ f (in metres)",
        "variables": {
            "f": "focal length (+ converging, − diverging)",
            "do": "object distance from the lens",
            "di": "image distance (+ real, − virtual)",
            "m": "magnification (negative = inverted)",
            "P": "optical power in dioptres"
        }
    },
    "worked_example": {
        "inputs": {
            "solve_for": "image",
            "focal": "10",
            "object": "30",
            "image": "15"
        },
        "steps": [
            "1/di = 1/f − 1/do = 1/10 − 1/30 = 2/30.",
            "di = 30 ÷ 2 = 15 cm.",
            "m = −15 ÷ 30 = −0.5, so the image is inverted and half size.",
            "P = 1 ÷ 0.10 m = 10 D."
        ],
        "result": "An object 30 cm from a 10 cm converging lens forms a real, inverted, half-size image 15 cm behind the lens."
    },
    "interpretation": "A positive image distance means a real image you can project on a screen; a negative one means a virtual image seen by looking through the lens, as with a magnifying glass. All three distances must use the same unit; lens power assumes centimetres.",
    "assumptions": [
        "Thin lens in air, paraxial (small-angle) rays, real-is-positive sign convention.",
        "Distances are in centimetres for the dioptre output."
    ],
    "limitations": [
        "Thick lenses, lens systems and large-angle rays need principal planes or ray tracing.",
        "Virtual objects (from a preceding lens) are not handled."
    ],
    "rules": null,
    "faqs": [
        {
            "question": "What if the object is exactly at the focal point?",
            "answer": "The rays leave parallel and the image is at infinity, so there is no finite answer."
        },
        {
            "question": "Which sign convention is this?",
            "answer": "Real-is-positive: object distance positive on the incoming side, image distance positive on the far side, converging focal lengths positive."
        }
    ],
    "sources": [],
    "related": [
        {
            "name": "Frequency and Wavelength Calculator",
            "url": "https://calculators.geekmidst.com/calculators/frequency-wavelength-calculator"
        },
        {
            "name": "Photon Energy Calculator",
            "url": "https://calculators.geekmidst.com/calculators/photon-energy-calculator"
        }
    ],
    "disclaimer": null,
    "publisher": "GM¹X CalcVerse"
}