Optics Lens Calculator
Calculate image distance, magnification, and image properties using the thin lens equation (1/f = 1/do + 1/di).
About this calculator
This calculator applies the thin lens equation, 1/f = 1/do + 1/di, which relates a lens's focal length (f) to how far an object sits from the lens (do, "Object Distance") and where the lens forms its image (di, "Image Distance"). Rearranged for di, the equation used here is di = (f × do) / (do − f). A positive Focal Length models a converging (convex) lens -- the kind used in magnifying glasses, camera lenses, and the eye's own lens -- while a negative Focal Length models a diverging (concave) lens, such as those used to correct nearsightedness. Image Distance follows the standard sign convention: positive means the image forms on the far side of the lens from the object, where it can be projected onto a screen (a "real" image); negative means the image forms on the same side as the object, where light rays only appear to diverge from it (a "virtual" image, the kind you see when looking through a magnifying glass held close to a page).
Magnification is computed as −di/do: its sign sets Orientation (positive is upright, negative is inverted relative to the object), and its absolute value sets Relative Size (greater than 1 is enlarged, less than 1 is reduced, exactly 1 is the same size). Neither input dominates Image Distance's sensitivity across this calculator's full declared ranges: because both Focal Length and Object Distance sit in the denominator (do − f), how strongly each one moves the result depends on how close the current values are to the singularity described below, and either input's proportional effect can be larger depending on where in its range you're sampling. Note that the equation has a mathematical singularity when Object Distance equals Focal Length (the denominator do − f hits zero): physically, that's the condition under which parallel rays emerge from the lens and no finite image forms at all.
Inputs
Results
Image Distance
15 cm
≈ 2 credit cards
Magnification
-0.5
How to Use This Calculator
- Enter Object Distance and Focal Length.
- Review Image Distance (cm) and Magnification.
- Use Image Type and Orientation to inform your decision.
- Use the chart to visualize the results and explore different scenarios by adjusting inputs.
How the result changes with Focal Length
| Focal Length | Image Distance | Magnification |
|---|---|---|
| 5 | 6 cm | -0.2 |
| 7.5 | 10 cm | -0.33 |
| 15 | 30 cm | -1 |
| 25 | 150 cm | -5 |
What each input means
- Object Distance
- Distance from the object to the lens center. Must be positive.
- Focal Length
- Focal length of the lens. Positive for converging (convex) lenses, negative for diverging (concave) lenses.
How this is calculated
Worked example, using the default values
- Identify Input Parameters2 parametersObject Distance = 30, Focal Length = 10 = 2 input(s) provided
- Calculate Image DistanceImage Distance = di15 = 15
- Calculate MagnificationMagnification = −(Image Distance / Object Distance)-0.5 = -0.5
- Calculate Image TypeImage Type = Real if Image Distance > 0, else VirtualReal = Real
- Calculate OrientationOrientation = Upright if Magnification > 0, else InvertedInverted = Inverted
Engine last updated . Checked against 1 independently-derived test — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.
Frequently Asked Questions
What's the difference between a real and a virtual image here?
Image Type is "Real" whenever Image Distance comes out positive, meaning the image forms on the opposite side of the lens from the object -- light rays actually converge there, so a real image can be projected onto a screen or captured on a camera sensor. Image Type is "Virtual" whenever Image Distance is negative, meaning the image forms on the same side as the object; light rays only appear to diverge from that point, the way a magnifying glass creates an enlarged image you can only see by looking through the lens, never project onto a wall.
Why does a negative Focal Length matter for the result?
Focal Length's sign tells the calculator whether you're modeling a converging (convex, positive focal length) or diverging (concave, negative focal length) lens. Diverging lenses -- used in some corrective eyewear and certain camera designs -- always produce a virtual, upright, reduced image of a real object, regardless of how far away the object sits, because the thin lens equation with a negative f can never produce a positive Image Distance for a positive Object Distance.
Does either input affect Image Distance more than the other?
Not consistently -- neither Focal Length nor Object Distance dominates Image Distance's sensitivity across this calculator's full declared ranges. Which one matters more at any given moment depends on how close the current values sit to the singularity at Object Distance = Focal Length, where the denominator (do − f) approaches zero and sensitivity to both inputs spikes sharply. Near this calculator's shipped default values Focal Length happens to have the larger effect, but sampled across the full input range Object Distance actually comes out ahead more often -- so don't treat either input as the unconditionally dominant one; the answer depends on where you are in the range.
What happens if Object Distance equals Focal Length?
The thin lens equation's denominator (Object Distance − Focal Length) goes to zero, which is the classic "object at the focal point" case: rays leaving the lens emerge parallel and never converge to form a finite image at any distance. This calculator won't hit that exact case from its default inputs, but it's worth knowing as the mathematical edge of the model -- image distance grows without bound as Object Distance approaches Focal Length from either side.
Does changing the object's distance always make the image bigger or smaller in the same direction?
No -- the relationship isn't monotonic across the lens's full working range. Near typical operating points moving the object farther away changes magnification one way, but because the equation passes through the singularity at Object Distance = Focal Length, the trend can reverse elsewhere in the input range. Treat Magnification as a precise answer for your specific entered values rather than assuming a simple "farther object, smaller image" rule holds everywhere.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Diffraction Grating Calculator
Calculate diffraction angles for each order using d sin(θ) = mλ. Find the maximum observable order and angular dispersion.
PhysicsSnell's Law Calculator
Calculate the refraction angle when light passes between two media using Snell's law: n₁ sin(θ₁) = n₂ sin(θ₂). Includes critical angle and Fresnel reflectance.
NanotechnologyThin Film Thickness Calculator
Film thickness from deposition rate and time, with optical properties.
AstronomyTelescope Magnification
Calculate telescope magnification, true field of view, exit pupil, and resolution from focal length, eyepiece, and apparent field of view.
OptometryLens Thickness Calculator
Estimate center and edge thickness of eyeglass lenses based on prescription power, lens index, and frame size.
More in Science & Physics.