Thin Lens Equation Calculator
Focal Length · Object Distance · Image Distance
ephotonics
linkedin.com/company/ephotonics
Follow our page for weekly laser engineering guides, photonics tutorials, and new calculator releases directly in your feed.
Follow on LinkedInHow the Thin Lens Equation Works
Thin lens equation calculator determines where an optical image forms using the fundamental Gaussian lens formula. It relates the focal length of the lens to the distances of the object and the resulting image, while also calculating the lateral magnification.

Understanding the Variables:
- f Focal Length: The distance over which initially collimated rays are brought to a focus. (Positive for convex, negative for concave).
- do Object Distance: The physical distance from the center of the lens to the object.
- di Image Distance: The distance from the center of the lens to where the image forms.
- M Magnification: The ratio of the Image Height to the Object Height.
Optical Sign Convention Reference
- + di = Real Image (Forms on opposite side, can be projected onto a screen).
- − di = Virtual Image (Forms on same side, visible only by looking through the lens).
- |M| > 1 = Magnified (Image is larger than object).
- |M| < 1 = Reduced (Image is smaller than object).
- − M = Inverted (Image is upside down).
Why use a Thin Lens Calculator?
In optical engineering and photography, simply knowing the focal length ($f$) isn't enough. You need to know exactly where the image forms ($d_i$) and how big it will be ($M$). Whether you are setting up a machine vision camera, aligning a laser focusing lens, or just solving a physics problem, precise calculations save hours of trial and error on the optical bench.
Sign Convention Cheat Sheet
In optics, a single negative sign changes the physical meaning entirely. Use this table to interpret your results correctly.
| Variable | Positive (+) Meaning | Negative (-) Meaning |
|---|---|---|
| Focal Length (f) | Converging (Convex) Lens | Diverging (Concave) Lens |
| Image Distance (dᵢ) | Real Image (Projectable) | Virtual Image (In lens) |
| Magnification (M) | Upright Image | Inverted Image |
| Object Dist (dₒ) | Real Object (Standard) | Virtual Object (Complex) |
Real-World Engineering Applications
1. Machine Vision Setup
When inspecting parts on a conveyor belt, you have a fixed "Working Distance" (Object Distance). This calculator tells you exactly how far the sensor needs to be from the lens to get a sharp image, allowing you to design the mechanical housing before you even buy the camera.
2. Macro Photography
To take a macro shot of an insect, the lens moves very far from the sensor (large Image Distance). This calculator helps you determine the specific extension tube length (spacer) needed to achieve 1:1 or 2:1 magnification.
3. Laser Beam Focusing
Focusing a collimated laser beam to a tight spot requires understanding the image plane. If the input beam isn't perfectly collimated (finite Object Distance), the focal point shifts. This tool predicts that shift so you can place your target material accurately.
4. Telescope Eyepieces
Eyepieces act as magnifiers. By placing the "object" (the telescope's primary image) inside the focal length of the eyepiece, you create a massive Virtual Image. This calculator solves the Virtual Image distance ($d_i$ is negative) which your eye then focuses on.