Lens Equation Calculator
Find image distance and magnification for a lens.
Results update as you type.
How it works
The thin lens equation is the foundation of optics for lenses, and this calculator uses it to find where an image forms and how large it is. You enter the focal length of the lens and the distance from the object to the lens, and it returns the image distance, the magnification, and whether the image is real or virtual. The equation states that the reciprocal of the focal length equals the reciprocal of the object distance plus the reciprocal of the image distance, which the calculator rearranges to solve for the image distance. The magnification is minus the image distance divided by the object distance; a negative magnification means the image is inverted and real, while a positive value means it is upright and virtual. Using standard sign conventions, a positive focal length is a converging lens and a negative one is diverging. This calculation is essential for designing and understanding cameras, eyeglasses, magnifying glasses, microscopes, telescopes, and projectors, where knowing image position and size is critical. A special case arises when the object sits exactly at the focal point: the image forms at infinity, which the calculator flags. This tool lets students and enthusiasts explore how moving an object or changing a lens affects the image. Enter the focal length and object distance to find the image distance, magnification, and type.
1/f = 1/do + 1/di ; magnification = −di/do
The thin lens equation relates the focal length, object distance, and image distance: the reciprocal of the focal length equals the sum of the reciprocals of the object and image distances. Solving for the image distance and computing minus the image distance over the object distance gives the magnification and whether the image is real or virtual.
Source:Optics
We review all our tools from time to time to ensure accuracy.
Worked example
How to use this calculator
- 1
Enter your values
Enter focal length (f) and object distance (do).
- 2
Adjust the options
Fine-tune any options to match your situation.
- 3
Read your result
Image distance (di) updates instantly as you type — no button to press.
Frequently asked questions
What is the thin lens equation?
The thin lens equation states that the reciprocal of the focal length equals the reciprocal of the object distance plus the reciprocal of the image distance. It relates where an object is placed to where its image forms through a lens. Combined with the magnification formula, it describes the size and orientation of the image.
What do positive and negative magnification mean?
Magnification is minus the image distance divided by the object distance. A negative value means the image is inverted, which for a converging lens indicates a real image that can be projected on a screen. A positive value means the image is upright and virtual, appearing on the same side as the object and unable to be projected.
What is the difference between real and virtual images?
A real image forms where light rays actually converge and can be projected onto a screen, appearing inverted with a converging lens. A virtual image forms where rays only appear to diverge from, cannot be projected, and appears upright, like the enlarged image seen through a magnifying glass. The calculator identifies which type your setup produces.
What sign convention does this use?
This calculator uses the common convention where a positive focal length denotes a converging lens and a negative focal length a diverging lens, object distances are positive for real objects, and a positive image distance indicates a real image on the opposite side. Following a consistent sign convention is essential for interpreting the results correctly.
What happens if the object is at the focal point?
When the object sits exactly at the focal length of a converging lens, the outgoing rays become parallel and the image forms at infinity, meaning no finite image distance exists. The calculator detects this case and reports that the image is at infinity, which corresponds to how a collimator produces a parallel beam of light.