Optics: Lens / Mirror Equation Calculator
Inputs
Equation: 1/f = 1/d₀ + 1/dᵢ
, magnification m = −dᵢ/d₀ = hᵢ/h₀
.
Default sign rules: f > 0 for converging (convex lens, concave mirror); f < 0 for diverging (concave lens, convex mirror).
Results
How to Use This Lens / Mirror Calculator
Pick an optical element and enter f (focal length), d₀ (object distance), and h₀ (object height) in your preferred units.
The calculator applies the thin lens / spherical mirror relation
1/f = 1/d₀ + 1/dᵢ
to solve for the image distance dᵢ, then computes the
magnification m = −dᵢ/d₀
and image height hᵢ = m·h₀
.
The signs tell you if the image is real or virtual and upright or inverted.
Sign Conventions at a Glance
- Converging elements: convex lens or concave mirror → f > 0.
- Diverging elements: concave lens or convex mirror → f < 0.
- Object distance d₀: positive for a real object in front of the element.
- Image distance dᵢ: lenses—dᵢ > 0 is real on the far side; mirrors—dᵢ > 0 is real in front of the mirror.
- Magnification: m < 0 inverted image; m > 0 upright image.
Common Scenarios
- Object at infinity (very large d₀): light is nearly parallel and the image forms at dᵢ ≈ f.
- Object at the focal point (d₀ = f): image is at infinity (collimated output) — useful for projectors and searchlights.
- Object inside the focal length of a converging lens (d₀ < f): image is virtual, upright, and magnified — a simple magnifier.
- Diverging lens: image is always virtual, upright, and reduced (useful for eyeglasses and peepholes).
- Concave mirror: behaves like a converging element; f > 0. For a spherical mirror, f = R/2, where R is the radius of curvature.
- Convex mirror: always forms a virtual, upright, reduced image behind the mirror — wide field of view.
Practical Tips
- Measure distances along the optical axis from the lens plane or mirror vertex. Keep units consistent (m, cm, or mm).
- If your goal is a particular image size, adjust d₀ to target m = hᵢ/h₀; the calculator shows m live.
- To “focus to a screen,” look for dᵢ > 0 (real image) and position the screen at that distance on the image side.
- For mirrors, remember that the real image forms in front of the mirror (same side as the object), while a virtual image appears behind the mirror.
Assumptions & Limitations
This tool uses the thin lens and spherical mirror models in the paraxial (small-angle) regime. It ignores thickness, aberrations, and aperture effects. Real optics may deviate, especially with large apertures or wide fields.
Educational use only — not for safety-critical design. For precise optical systems, consult detailed lens data and tolerances.