Lens Equation Calculator Formula
Understand the math behind the lens equation calculator. Each variable explained with a worked example.
Formulas Used
Image Distance
image_distance = 1 / (1/focal_length - 1/object_distance)Magnification
magnification = -(1 / (1/focal_length - 1/object_distance)) / object_distanceVariables
| Variable | Description | Default |
|---|---|---|
focal_length | Focal Length(cm) | 10 |
object_distance | Object Distance(cm) | 30 |
How It Works
Thin Lens Equation
The thin lens equation relates object distance, image distance, and focal length.
Formula
1/f = 1/d_o + 1/d_i
Positive focal length for converging lenses, negative for diverging. Magnification: M = -d_i / d_o. Negative M means inverted image.
Worked Example
An object 30 cm from a converging lens with focal length 10 cm.
focal_length = 10object_distance = 30
- 011/f = 1/do + 1/di
- 021/10 = 1/30 + 1/di
- 031/di = 1/10 - 1/30 = 3/30 - 1/30 = 2/30
- 04di = 15 cm
- 05M = -15/30 = -0.5 (inverted, half size)
Ready to run the numbers?
Open Lens Equation Calculator