Thin Lens Equation Calculator
Solve for object distance, image distance, or focal length, then interpret image type, orientation, and magnification using the standard thin-lens sign convention.
Inputs
Live results
Calculation detail
| Quantity | Symbol | Value | Role and interpretation |
|---|---|---|---|
| Object distance | dₒ | 75 cm | Known positive distance from the object to the lens. |
| Image distance | dᵢ | 150 cm | Calculated positive distance, so the image is real. |
| Focal length | f | 50 cm | Known positive focal length, so the lens is converging. |
| Magnification | |M| | 2.00× | The image is twice the object's linear size. |
How to use the Thin Lens Equation Calculator
What this calculator does
This calculator applies the thin-lens identity 1/dₒ + 1/dᵢ = 1/f to a single ideal lens. It can solve for Object distance, Image distance, or Focal length from the other two distances. It also reports the absolute Magnification and classifies the Lens type, Image type, Orientation, and Relative size. The model is intended for the thin-lens approximation and a real object placed in front of the lens; it does not model lens thickness, aberrations, wavelength-dependent dispersion, multi-element systems, or measurement uncertainty. OpenStax provides a detailed explanation of the equation and sign convention in its university physics section on thin lenses.
When to use it
Use the calculator when checking a classroom optics problem, estimating where a projected image will form, selecting a focal length for a simple bench setup, or comparing a converging lens with a diverging lens. It is also useful for checking whether a proposed image is real or virtual and whether it should be upright, inverted, enlarged, reduced, or approximately the same size as the object.
How to calculate
- The calculator opens with a ready-to-use demonstration: Object distance = 75 cm, Focal length = 50 cm, and Solve for = Image distance. The first result is already calculated, and the example Excel workbook is immediately available.
- Choose the missing quantity under Solve for. That field becomes calculated and the other two distance fields become editable. Enter only ordinary decimal notation with a period as the decimal separator; commas, scientific notation, and unit text inside the field are rejected.
- Select a Distance unit. Millimeters, centimeters, meters, and inches are supported. A unit change converts every populated distance rather than merely relabeling it, so the optical geometry and magnification remain the same.
- Read the primary result and the four result cards, then use the classifications and the Calculation detail table to interpret the sign and size relationship.
- Select Download Excel to export the current validated model as a real .xlsx workbook. Reset clears the demonstration and all distance values; after reset, Excel export is disabled until a complete valid pair is entered again.
Input guide
Solve for is required and accepts one of three choices: Image distance, Focal length, or Object distance. For example, select Image distance when the object is 75 cm from a 50 cm lens. Changing this control changes which equation rearrangement is used. A common mistake is entering a value in the disabled calculated field instead of switching the solve target.
Distance unit is required and applies to all three distances. It accepts mm, cm, m, or in. For example, 75 cm converts to 0.75 m. Changing the unit does not change the physical setup. Do not mix units between fields; convert them through this control instead.
Object distance is required whenever it is a known value and must be a finite number greater than zero because this calculator assumes a real object. A realistic example is 75 cm. Increasing the object distance while holding a positive focal length fixed generally moves a real image toward the focal plane. Zero, a negative value, an empty field, a comma decimal such as 1,5, or scientific notation such as 1e3 is rejected.
Image distance is required whenever it is a known value and may be positive or negative, but not zero. A positive example is 150 cm for a real image; a negative example is – 30 cm for a virtual image. The sign directly determines Image type. When solving for focal length or object distance, a common mistake is removing the minus sign from a virtual-image distance.
Focal length is required whenever it is a known value and may be positive or negative, but not zero. A positive example is 50 cm for a converging lens; – 10 cm represents a diverging lens. Its sign drives Lens type. When solving for image distance, Object distance cannot equal a positive Focal length because the ideal image has no finite image plane in that boundary configuration.
Output guide
The primary value is whichever quantity is selected under Solve for. Object distance, Image distance, and Focal length are shown in the selected unit and are exact consequences of the entered ideal-model values, subject only to display rounding. Magnification is the positive size factor |dᵢ|/dₒ: 1.00× means equal size, more than 1 means enlarged, and less than 1 means reduced. Lens type is Converging for positive focal length and Diverging for negative focal length. Image type is Real for positive image distance and Virtual for negative image distance. Orientation follows the signed linear magnification – dᵢ/dₒ: real images in this scope are inverted, while virtual images are upright. Relative size summarizes the absolute magnification as Diminished, Same size, or Magnified. The four summary pills repeat the active solve target, lens class, image class, and scale factor for quick scanning. The Calculation detail table lists Quantity, Symbol, Value, and Role and interpretation; it is a transparent audit trail rather than a separate calculation.
Worked example
With Object distance 75 cm and Focal length 50 cm, solve for Image distance: dᵢ = f·dₒ / (dₒ – f). Substitution gives 50 × 75 / (75 – 50) = 3,750 / 25 = 150 cm. The absolute Magnification is |150| / 75 = 2.00×. Because the focal length is positive, the lens is Converging. Because the image distance is positive, the image is Real and therefore Inverted under this convention. Since 2.00 is greater than 1, Relative size is Magnified. These values match the first-open result cards, table, summary pills, and workbook checkpoints.
Formula, signs, and practical interpretation
The thin-lens equation balances three reciprocal distances. For a converging lens, a real object located beyond the focal point produces a positive image distance. If that same object moves inside the focal length, the denominator in dᵢ = f·dₒ/(dₒ – f) becomes negative and the image becomes virtual. A diverging lens has a negative focal length and, for the real-object cases covered here, typically produces a negative image distance and an upright diminished image. The OpenStax worked examples for image formation by lenses show these sign changes numerically.
Magnification is reported as an absolute size factor because it answers “how many times larger or smaller?” Orientation is shown separately. In a signed convention, linear magnification is m = – dᵢ/dₒ. A negative signed value corresponds to an inverted image, while a positive signed value corresponds to an upright image. Keeping size and orientation separate avoids the common error of treating a negative magnification as a negative physical size.
Assumptions and common mistakes
- Use one consistent distance unit. The equation is unit-independent only when all three distances share the same unit.
- Preserve the sign of image distance and focal length. Signs encode physical meaning, not merely arithmetic direction.
- Do not use zero for any lens distance. Reciprocal terms would not be defined.
- Do not expect the ideal result to include spherical aberration, chromatic aberration, lens thickness, aperture effects, or a compound optical train.
- Check experimental setups with ray tracing or direct measurement. Oregon State University's thin-lens approximation overview explains why the equation treats refraction as occurring in one optical plane.
For real hardware, the calculated distance is a model-based estimate. Manufacturing tolerances, principal-plane offsets, object thickness, wavelength, and alignment can shift the best-focus position. Use the result as a quantitative starting point and verify it experimentally when precision matters.