Thin lens equation calculator

Enter the focal length (positive for converging, negative for diverging) and the object distance to see where the image forms, its size and orientation.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter focal length (negative for diverging) and object distance.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

1 / f = 1 / dₒ + 1 / dᵢ, so dᵢ = 1 / (1 / f − 1 / dₒ), and magnification m = −dᵢ / dₒ.

Example

Inputs: Focal length (negative for diverging) = 10 cm, Object distance = 30 cm. Result: Image distance: 15 cm; Magnification: -0.5 ×; Image type: Real (behind the lens).

Limits and caveats

  • It assumes a thin lens and rays near the axis, with no aberrations or lens thickness.
  • It uses the common sign convention: a positive image distance means a real image on the far side of the lens.

Questions about this tool

When is a converging lens image virtual?

When the object is closer to the lens than its focal point, as with a magnifying glass.

Does it work for concave mirrors?

Yes. The same equation applies to spherical mirrors, with focal length equal to half the radius of curvature.

What does a negative magnification mean?

The image is upside down relative to the object.