Calculate Lens Equation

Online calculator and formulas for calculating focal length, object distance and image distance

Lens Equation Calculator

Imaging Law

Calculates the missing optical imaging parameter: Focal length (f), Object distance (g) or Image distance (b).

cm
Distance between lens and image
cm
Distance between lens and object
cm
Distance of the focal point from the lens
Result

Example Calculations

Example 1: Calculate image distance
Problem:

An object is 30 cm in front of a converging lens with focal length 10 cm. How far is the image from the lens?

Given:
  • Object distance: g = 30 cm
  • Focal length: f = 10 cm
  • Find: Image distance b
Solution:

Lens equation:

\[\frac{1}{f} = \frac{1}{g} + \frac{1}{b}\]
\[\frac{1}{b} = \frac{1}{f} - \frac{1}{g}\]
\[\frac{1}{b} = \frac{1}{10} - \frac{1}{30} = 0.1 - 0.0333 = 0.0667\]
\[b = \frac{1}{0.0667} ≈ 15 \text{ cm}\]
Example 2: Calculate object distance
Problem:

A lens with focal length 8 cm produces an image at distance 24 cm. How far was the object?

Given:
  • Focal length: f = 8 cm
  • Image distance: b = 24 cm
  • Find: Object distance g
Solution:
\[\frac{1}{g} = \frac{1}{f} - \frac{1}{b}\]
\[\frac{1}{g} = \frac{1}{8} - \frac{1}{24} = 0.125 - 0.0417 = 0.0833\]
\[g = \frac{1}{0.0833} ≈ 12 \text{ cm}\]


Formulas of the lens equation

The lens equation (also called imaging law) describes the relationship between focal length, object distance and image distance of an optical lens. It is one of the most fundamental equations of geometric optics.

Lens equation (Imaging law)

The fundamental equation for optical imaging.

\[\frac{1}{f} = \frac{1}{g} + \frac{1}{b}\]
f = Focal length [cm]
g = Object distance [cm]
b = Image distance [cm]
Magnification

Size ratio of image to object.

\[m = \frac{b}{g} = -\frac{B}{G}\]
m = Magnification (negative: image inverted)
B = Image size, G = Object size
Calculate image distance

Rearrangement to calculate image distance.

\[b = \frac{1}{\frac{1}{f} - \frac{1}{g}} = \frac{f \cdot g}{g - f}\]
Valid when g > f (real image)
Calculate object distance

Rearrangement to calculate object distance.

\[g = \frac{1}{\frac{1}{f} - \frac{1}{b}} = \frac{f \cdot b}{b - f}\]
Reverse calculation from f and b
Calculate focal length

Rearrangement to calculate focal length.

\[f = \frac{1}{\frac{1}{g} + \frac{1}{b}} = \frac{g \cdot b}{g + b}\]
Calculation of lens properties from object distance and image distance
Important Rules
  • Converging lens (convex lens): f > 0. Produces real, inverted images when g > f.
  • Diverging lens (concave lens): f < 0. Produces only virtual, upright, reduced images.
  • Focal point: When g = f, then b = ∞ (image at infinity).
  • 2f point: When g = 2f, then b = 2f (image same size as object).
  • Virtual images: Occur when g < f (magnifying glass effect).

Detailed description of the lens equation

Physical Fundamentals

The lens equation describes how a lens images an object. It is the central tool of geometric optics and is used in numerous applications.

Focal length (f): The distance from the lens center to the focal point, where parallel incident rays are focused. Converging lenses have positive, diverging lenses have negative focal lengths.

Object distance (g): The distance between the object and the lens center.

Image distance (b): The distance between the produced image and the lens center.

Usage Instructions

Select with the radio buttons which parameter should be calculated. Enter the two known values and click "Calculate". All values are in centimeters.

Application Areas

Photography and Cameras

Calculation of focal lengths, focus distance and image size. Lens design for various focal lengths.

Microscopy and Telescopes

Design of lens systems, calculation of magnifications and depth of field for observation instruments.

Projectors and Displays

Calculation of projection distance, lens size and image size for optical systems.

Medical Devices

Endoscopes, surgical microscopes, laser eye surgery and other optical diagnostic and treatment systems.

Is this page helpful?            
Thank you for your feedback!

Sorry about that

How can we improve it?


More physics functions

Centrifugal ForceEfficiencyInclined plankW - hp converterPS - hp converterPower Force Displacement and TimePressure, Force and AreaTorqueWeight ForceWork, Force and DisplacementWork Power and TimeEnergy DensityKinetic EnergySpecific EnergyAcceleration by DistanceAcceleration by TimeAngular VelocityCircular MotionRotational SpeedSpeed, Distance and Time Free-FallTemperature in AtmosphereMach NumberSpeed of soundSound PressureBelt LengthGear RatioAngle of refraction