Focal Length Calculator Formula
Understand the math behind the focal length calculator. Each variable explained with a worked example.
Formulas Used
Focal Length
focal_length = 1 / (1/object_distance + 1/image_distance)Lens Power
lens_power = 100 / (1 / (1/object_distance + 1/image_distance))Variables
| Variable | Description | Default |
|---|---|---|
object_distance | Object Distance(cm) | 30 |
image_distance | Image Distance(cm) | 15 |
How It Works
Focal Length
The focal length defines the converging or diverging power of a lens or mirror.
Formula
1/f = 1/d_o + 1/d_i
Lens power in diopters is D = 1/f (with f in meters). Positive focal length = converging lens; negative = diverging.
Worked Example
An object at 30 cm produces an image at 15 cm.
object_distance = 30image_distance = 15
- 011/f = 1/do + 1/di
- 021/f = 1/30 + 1/15
- 031/f = 0.0333 + 0.0667 = 0.1
- 04f = 10 cm
- 05Power = 100/10 = 10 diopters
Ready to run the numbers?
Open Focal Length Calculator