Lens & Mirror Equation Calculator – Optics Made Easy

Calculate focal length, object distance, or image distance using the lens/mirror equation with this interactive physics tool.

Object Distance (dₒ) cm
Image Distance (dᵢ) cm
Focal Length (f) cm
Result
Using equation: 1/f = 1/dₒ + 1/dᵢ
Focal Length (f) = 20 cm
Image is real and inverted.

Ray diagram for a convex lens with object beyond 2F. Image is real, inverted, and reduced.

How to Use the Calculator
  1. Select the quantity you want to calculate (f, dₒ, or dᵢ) from the dropdown in the left panel.
  2. Enter the other two known values in the input fields.
  3. Choose the appropriate optical element (lens or mirror type).
  4. Select your preferred units (cm or m).
  5. Click "Calculate" or the result will update automatically.
  6. Review the result and check the ray diagram for visualization.
Understanding the Results

The lens/mirror equation relates the focal length (f), object distance (dₒ), and image distance (dᵢ):

1/f = 1/dₒ + 1/dᵢ

Sign conventions are important in optics:

  • Positive image distance (dᵢ): Real image (formed on the opposite side of the lens)
  • Negative image distance (dᵢ): Virtual image (formed on the same side as the object)
  • Positive focal length (f): Converging lens or concave mirror
  • Negative focal length (f): Diverging lens or convex mirror
Example Calculations

Click on any example to load it into the calculator:

Scenario Object Distance (dₒ) Image Distance (dᵢ) Focal Length (f)
Convex lens, object beyond 2F 30 cm 60 cm 20 cm
Concave lens, virtual image 15 cm -30 cm -10 cm
Convex lens, object at 2F 20 cm 20 cm 10 cm
Concave mirror, object beyond C 40 cm 13.33 cm 10 cm
Convex mirror, virtual image 0.5 m -0.2 m -0.33 m