Thin Lens Equation Calculator
Solve the lens formula for focal length, object distance, or image distance
Select the variable to solve for, enter the other two known values, and the calculator will find the unknown using the thin lens equation 1/f = 1/dₒ + 1/dᵢ. Magnification and image characteristics are computed automatically.
Thin Lens Equation Calculator
Solve the lens formula for focal length, object distance, or image distance
About the Thin Lens Equation Calculator
The thin lens equation is one of the foundational results of geometric optics, linking the three key distances in any imaging system: the object distance dₒ, the image distance dᵢ, and the focal length f of the lens through the elegant relation 1/f = 1/dₒ + 1/dᵢ. This calculator solves that equation for any of the three unknowns given the other two, making it a practical tool for students, optometrists, camera designers, and anyone working with optical systems.
A converging (convex) lens has a positive focal length and brings parallel light rays to a focus on the far side. When an object is placed farther from the lens than the focal point, a real, inverted image forms on the other side and can be projected onto a screen — the principle behind cameras, projectors, and the human eye. When the object is closer than the focal point, the lens acts as a magnifying glass, producing an enlarged virtual image on the same side as the object that appears upright to the observer.
A diverging (concave) lens has a negative focal length and causes parallel rays to spread outward as if they originated from a virtual focal point on the same side as the incoming light. Such lenses always produce a virtual, upright, and diminished image regardless of where the object is placed. Diverging lenses are commonly used in combination with converging elements to correct myopia (short-sightedness) in eyeglasses and to reduce aberrations in compound optical systems.
The linear magnification m = −dᵢ/dₒ tells you both the size and orientation of the image. A negative magnification means an inverted image; a positive magnification means an upright image. The absolute value gives the size ratio: |m| = 2 means the image is twice as tall as the object.
This calculator uses the real-is-positive Cartesian sign convention, which is the most common convention in introductory physics and engineering optics courses. Object distances are positive for real objects on the incoming-light side of the lens. Image distances are positive for real images (formed on the outgoing side) and negative for virtual images (same side as object). Focal lengths are positive for converging lenses and negative for diverging lenses. Using the correct sign for f is essential — entering f = −10 cm instead of f = 10 cm completely changes the nature of the image.
Beyond the thin lens formula itself, the calculator interprets the results: whether the image is real or virtual, upright or inverted, and magnified or diminished. These characteristics determine how the optical element can be used in a practical system and are essential knowledge for anyone designing telescopes, microscopes, cameras, or projectors.
Thin Lens Equation Examples
These examples cover common optics scenarios involving converging and diverging lenses.
| Lens Setup | Result | Notes |
|---|---|---|
| Solve for dᵢ: dₒ = 30 cm, f = 10 cm (converging lens) | dᵢ = 15 cm, m = −0.5 (real, inverted, diminished) | Object placed at 3F produces a real, inverted image at 1.5F on the opposite side of the lens. |
| Solve for dᵢ: dₒ = 5 cm, f = 10 cm (magnifying glass) | dᵢ = −10 cm, m = 2 (virtual, upright, magnified) | Object inside focal length of a converging lens yields a virtual, upright, and magnified image — the principle behind a magnifying glass. |
| Solve for dᵢ: dₒ = 30 cm, f = −10 cm (diverging lens) | dᵢ = −7.5 cm, m = 0.25 (virtual, upright, diminished) | A diverging (concave) lens always produces a virtual, upright, and diminished image regardless of object position. |
| Solve for f: dₒ = 20 cm, dᵢ = 20 cm | f = 10 cm (object at 2F) | When object and image distances are equal, the object is at 2F and the image is the same size as the object. |
How to use the thin lens equation calculator
- Choose which quantity to solve for — image distance dᵢ, object distance dₒ, or focal length f — by clicking the corresponding button.
- Enter the two known values in the enabled input fields. Use positive distances for real objects/images and negative distances for virtual objects/images or diverging lenses.
- Click Calculate to instantly see the unknown value, the linear magnification m = −dᵢ/dₒ, and the image characteristics (real/virtual, upright/inverted, magnified/diminished).
- Use the example preset buttons to load classic scenarios such as a magnifying glass, a camera lens, or determining focal length.
- Click Reset to clear all fields and start a new calculation.
Thin Lens Equation FAQ
What is the thin lens equation?
The thin lens equation is 1/f = 1/dₒ + 1/dᵢ, where f is the focal length of the lens, dₒ is the distance from the lens to the object, and dᵢ is the distance from the lens to the image. It applies to any ideal thin lens — converging (positive f) or diverging (negative f) — and assumes the lens thickness is negligible compared with the object and image distances.
What is magnification and how is it calculated?
Linear magnification m = −dᵢ/dₒ describes how the image size compares with the object size. A magnitude greater than 1 means the image is magnified; less than 1 means diminished. A negative sign indicates the image is inverted relative to the object. For example, m = −2 means the image is twice the size of the object and upside-down, as seen in a camera or projector.
How do I identify a real versus virtual image?
A real image forms where light rays actually converge on the opposite side of the lens from the object; dᵢ > 0 for a real image. A virtual image appears to diverge from a point on the same side as the object; dᵢ < 0. Real images can be projected onto a screen; virtual images cannot, but they can be seen by looking through the lens, as in a magnifying glass or a camera viewfinder.
What happens when the object is placed at the focal point?
When dₒ = f, the lens equation gives 1/dᵢ = 0, meaning the image forms at infinity — the refracted rays are parallel and never converge or diverge. In practice, this means no well-defined image is formed. Flashlights and searchlights exploit this geometry to produce a parallel beam of light.
Can I use this calculator for mirrors?
The same mirror equation 1/f = 1/dₒ + 1/dᵢ applies to concave and convex mirrors with a different sign convention. For mirrors, f = R/2 where R is the radius of curvature, f > 0 for concave mirrors and f < 0 for convex mirrors. You can use this calculator as a mirror equation calculator by entering the appropriate sign for f.
What is the sign convention used in this calculator?
This calculator uses the real-is-positive convention (also called the Cartesian sign convention). Object distances dₒ are positive when the object is on the incoming-light side of the lens. Image distances dᵢ are positive when the image forms on the outgoing-light side (real image) and negative when on the same side as the object (virtual image). Focal lengths are positive for converging lenses and negative for diverging lenses.