40
cm
-1
×
40
cm
40
cm
20
cm
-1
1
1
×
40
cm
-1
×
40
cm
40
cm
20
cm
-1
1
1
×
The Lens Calculator uses the thin lens equation to determine the relationship between focal length, object distance, and image distance for converging and diverging lenses. This fundamental optics tool is essential for understanding how lenses form images in cameras, eyeglasses, microscopes, and telescopes.
The thin lens equation $$\frac{1}{f} = \frac{1}{d_o} + \frac{1}{d_i}$$ connects three key parameters of any thin lens system. By knowing any two values, you can calculate the third and determine the magnification and nature of the resulting image.
This calculator applies the thin lens equation, one of the cornerstone formulas in geometric optics:
$$\frac{1}{f} = \frac{1}{d_o} + \frac{1}{d_i}$$
Where:
The magnification is calculated as:
$$M = -\frac{d_i}{d_o}$$
A negative magnification indicates an inverted image, while a positive magnification indicates an upright image. When |M| > 1 the image is magnified; when |M| < 1 it is diminished.
For a converging lens (f > 0): if the object is beyond the focal point (do > f), a real inverted image forms on the opposite side. If the object is within the focal length (do < f), a virtual upright magnified image forms on the same side as the object.
For a diverging lens (f < 0): the image is always virtual, upright, and diminished regardless of object position. This is why diverging lenses are used to correct nearsightedness.
The thin lens equation assumes the lens thickness is negligible compared to the focal length and object/image distances. This approximation works well for most everyday optical systems but breaks down for thick lenses or very short focal lengths where the lensmaker's equation with principal planes must be used instead.
The calculated value shows whichever parameter you chose to solve for — image distance, object distance, or focal length — in centimeters. A positive image distance means the image forms on the opposite side of the lens from the object (real image), while a negative image distance means it forms on the same side (virtual image).
The magnification tells you both the size ratio and orientation of the image. M = −2 means the image is twice as large and inverted. M = +0.5 means the image is half the size and upright. The image type description summarizes whether the image is real or virtual, inverted or upright, and magnified or diminished.
Inputs
Results
An object placed 60 cm from a lens with f = 20 cm forms a real inverted image at 30 cm. Since 1/20 = 1/60 + 1/30, the image is diminished with M = −0.5.
Inputs
Results
An object at 10 cm from a 20 cm focal length lens produces a virtual image at −20 cm (same side as object). The magnification M = +2 means the image is upright and twice the size — this is how a magnifying glass works.
The thin lens equation is $$\frac{1}{f} = \frac{1}{d_o} + \frac{1}{d_i}$$ where f is the focal length, do is the object distance, and di is the image distance. It describes how thin lenses form images and is the foundation of geometric optics for lens systems.
A negative image distance (di < 0) means the image is virtual — it forms on the same side of the lens as the object. Virtual images cannot be projected onto a screen but can be seen by looking through the lens, as with a magnifying glass.
Magnification is M = −di/do. The negative sign means that when di is positive (real image), M is negative (inverted). When di is negative (virtual image), M is positive (upright). The absolute value |M| gives the size ratio.
When do = f, the thin lens equation gives 1/di = 0, meaning di → ∞. The light rays emerge parallel and never converge to form an image. This principle is used in collimators and flashlights to produce parallel beams.
Yes. For diverging lenses, enter a negative focal length. The calculator will show that the image distance is always negative (virtual) and the magnification is always positive and less than 1 (upright, diminished).
This calculator uses the standard sign convention: distances measured in the direction of light propagation are positive. Object distance do is always positive for real objects. Image distance di is positive for real images (opposite side from object) and negative for virtual images. Focal length f is positive for converging lenses and negative for diverging lenses.
Roboculator Team
The Roboculator Team explains calculations, planning tools, and practical formulas in clear language for real-life situations.
How helpful was this calculator?
Be the first to rate!
Mirror Equation Calculator
Geometric Optics Calculators
Magnification Calculator
Geometric Optics Calculators
Focal Length Calculator
Geometric Optics Calculators
Lens Maker Equation Calculator
Geometric Optics Calculators
Snell's Law Calculator
Geometric Optics Calculators
Index of Refraction Calculator
Geometric Optics Calculators