Calculator Input
Formula Used
The calculator uses the thin lens equation:
Rearranging for focal length gives:
It also computes lens power and magnification:
- Power: P = 1 / f, where f is in meters.
- Magnification: m = -di / do.
How to Use This Calculator
- Enter the object distance as a positive value.
- Enter the image distance using optics sign convention.
- Choose your preferred distance unit.
- Select decimal places and graph resolution.
- Optionally add a label for your setup.
- Press Calculate Focal Length.
- Review focal length, power, magnification, and lens type.
- Export your results as CSV or PDF if needed.
Example Data Table
Use any example below to test the calculator quickly.
| Example | do | di | f | Power | Magnification | Lens Type |
|---|---|---|---|---|---|---|
| Example 1 | 30 cm | 60 cm | 20 cm | 5.00 D | -2.00 | Converging lens |
| Example 2 | 50 cm | -25 cm | -50 cm | -2.00 D | 0.50 | Diverging lens |
| Example 3 | 100 cm | 25 cm | 20 cm | 5.00 D | -0.25 | Converging lens |
| Example 4 | 24 cm | -12 cm | -24 cm | -4.17 D | 0.50 | Diverging lens |
FAQs
1. What formula does this calculator use?
It uses the thin lens equation, 1/f = 1/do + 1/di. The page also rearranges it to f = (do × di) / (do + di) for direct focal length calculation.
2. Why can image distance be negative?
A negative image distance represents a virtual image under the chosen sign convention. This commonly happens with diverging lenses or when an object lies inside a converging lens focal length.
3. What does a positive focal length mean?
A positive focal length indicates a converging lens. These lenses bring parallel light rays together and can produce real images when the object is placed beyond the focal point.
4. What does a negative focal length mean?
A negative focal length indicates a diverging lens. These lenses spread light outward and usually form virtual, upright, and reduced images for real objects.
5. Why did I get an infinite focal length warning?
That appears when do + di becomes zero in the denominator. Mathematically, the lens behaves like an aphocal limit, so the focal length cannot be represented as a finite number.
6. What is lens power in diopters?
Lens power is the reciprocal of focal length in meters. Stronger converging lenses have larger positive power, while diverging lenses have negative power.
7. What does magnification tell me?
Magnification describes image size and orientation. A positive value means upright, a negative value means inverted, and the absolute value shows whether the image is enlarged or reduced.
8. Can I use this for mirrors too?
This page is designed for thin lenses. Mirror equations look similar, but sign conventions and interpretation can differ, so a dedicated mirror calculator is the safer choice.