Physics / Optics
Thin Lens and Mirror Equation Calculator (with Ray Diagram)
Find where a lens or curved mirror forms an image: enter the focal length and object distance to get the image distance, magnification, and whether the image is real or virtual and upright or inverted, with a ray diagram.
Thin Lens and Mirror Equation Calculator (with Ray Diagram): The tool solves 1/f = 1/do + 1/di for the image distance and works out the magnification as −di ÷ do. An object 30 cm from a converging lens of focal length 10 cm forms a real, inverted image 15 cm on the other side, half the size. Moved to 5 cm, inside the focal length, it gives a virtual, upright image twice the size, as in a magnifying glass. Runs 100% locally in your browser with zero server file uploads.
- Category
- School & study tools
- Runs
- In your browser
- Cost
- Free · no sign-up
- Availability
- Ready to use
Runs entirely in your browser
The thin lens equation 1/f = 1/do + 1/di links the focal length with the object and image distances, and the magnification is −di ÷ do. With the convention used here, a real image has a positive distance and forms on the far side of a lens, and a negative distance means a virtual image you see through the lens. The same equation holds for curved mirrors, with a concave mirror converging. Diverging lenses always give a smaller, upright, virtual image.
Cameras and eyes
A camera lens forms a real, inverted image on the sensor; focusing moves the lens so that 1/f = 1/do + 1/di holds for the subject's distance. For lens choices across sensor sizes, see the crop factor calculator.
Power in dioptres
Opticians give lens power in dioptres, 1 ÷ focal length in metres: a +2.5 D reading lens has a focal length of 40 cm.
How to use it
- Choose a converging or a diverging lens or mirror.
- Enter the focal length and the object distance.
- Read the image distance and magnification, and look at the ray diagram.
Privacy & limitations
Everything is calculated in your browser.
Related tools
Frequently asked questions
What is a real image?
One where light really meets, so it can be caught on a screen, like a projector's picture. A virtual image, as in a mirror or magnifying glass, only appears to be there.
Which sign convention is used?
Real is positive: converging lenses and concave mirrors have positive focal lengths, and a negative image distance means a virtual image.
What happens at the focal point?
The rays leave parallel, so no image forms: the image is said to be at infinity.
Free tool · runs in your browser · no account required