Home › Calculators › Thin Lens Equation Calculator

Thin Lens Equation Calculator

Solve 1/f = 1/dₒ + 1/dᵢ for the image distance, object distance or focal length. You also get the magnification, whether the image is real or virtual, upright or inverted, its height, the lens power and a ray diagram drawn to scale.

Last updated:

Solve for

Positive for a converging (convex) lens, negative for a diverging (concave) lens

Distance from the object to the lens (positive)

Positive = real image on the far side; negative = virtual image on the object side

Used for the image height and the ray diagram

Enter your values to see the result.
Advertisement
Advertisement

How to use the Thin Lens Equation Calculator

  1. Choose what to solve for: image distance, object distance or focal length.
  2. Pick a length unit and enter the two known values. Use a negative focal length for a diverging lens.
  3. Add the object height if you want the image height.
  4. Read the result: distance, magnification and the image description.
  5. Check the ray diagram and the table to see how the image moves as the object moves.

Thin lens formulas

QuantityFormulaExample (f = 10 cm, dₒ = 30 cm)
Image distancedᵢ = 1 / (1/f − 1/dₒ) = f·dₒ / (dₒ − f)15 cm (real)
Object distancedₒ = f·dᵢ / (dᵢ − f)dᵢ = 15 cm → 30 cm
Focal lengthf = dₒ·dᵢ / (dₒ + dᵢ)30 × 15 / 45 = 10 cm
Magnificationm = −dᵢ/dₒ = hᵢ/hₒ−0.5 (inverted, half size)
Lens powerP = 1/f (f in m)+10 D
Newtonian formxₒ·xᵢ = f² (distances from the focal points)20 × 5 = 100

Where the image forms (converging lens)

Object positionImage positionImageEveryday example
Very far (∞)At FReal, inverted, point-sizedBurning glass, telescope objective
Beyond 2FBetween F and 2FReal, inverted, reducedCamera, the eye
At 2FAt 2FReal, inverted, same size1:1 copier / macro
Between F and 2FBeyond 2FReal, inverted, enlargedProjector, enlarger
At FAt infinityNo imageCollimator, spotlight
Inside FSame side as objectVirtual, upright, enlargedMagnifying glass

A diverging (concave) lens always forms a virtual, upright, reduced image between the lens and its focal point, which is why it is used to correct short-sightedness and in peepholes.

Drawing a ray diagram

Two rays from the top of the object are enough. A ray parallel to the axis bends through the far focal point (or appears to come from the near focal point for a diverging lens), and a ray through the centre of the lens passes straight through. Where the rays cross is the top of a real image; where their backward extensions cross is the top of a virtual image.

Frequently asked questions

What is the thin lens equation?

1/f = 1/dₒ + 1/dᵢ, where f is the focal length, dₒ the distance from the object to the lens and dᵢ the distance from the lens to the image. It holds for lenses whose thickness is small compared with these distances.

What sign convention does this calculator use?

The real-is-positive convention: object distances in front of the lens are positive, a positive image distance means a real image on the far side, a negative one means a virtual image on the object side, converging lenses have positive f and diverging lenses negative f.

How do I calculate magnification?

m = −dᵢ/dₒ = hᵢ/hₒ. A negative m means the image is inverted, a positive m means upright. |m| > 1 is enlarged and |m| < 1 is reduced. Example: dₒ = 30 cm and dᵢ = 15 cm give m = −0.5, an inverted image half the size.

When is the image real and when is it virtual?

For a converging lens the image is real and inverted when the object is farther than f from the lens, and virtual, upright and enlarged when it is closer than f (a magnifying glass). A diverging lens always gives a virtual, upright, reduced image of a real object.

What happens when the object is at the focal point?

The refracted rays leave parallel, so no image forms (dᵢ is infinite). This is how a collimator or a flashlight with the bulb at the focus works.

What is lens power in diopters?

Power P = 1/f with f in metres. A +2.5 D reading lens has f = 0.4 m; a −4 D lens is diverging with f = −0.25 m. Powers of thin lenses in contact add.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Telescope Magnification CalculatorTelescope magnification, exit pupil, max useful power and true field for any eyepiece.Depth of Field CalculatorNear and far focus limits, depth of field and hyperfocal distance for any camera or lens.Photon Energy CalculatorPhoton energy in eV and joules from wavelength or frequency, with momentum and color.Wavelength Frequency CalculatorConvert frequency to wavelength and back for light, radio or sound, with photon energy and band.Speed Distance Time CalculatorSolve for speed, distance or travel time and get your arrival time.Half Life CalculatorSolve radioactive decay for amount left, half-life, time or initial amount, with a curve.Kinetic Energy CalculatorSolve KE = ½mv² and PE = mgh for energy, mass, speed or height, with unit conversions.Projectile Motion CalculatorRange, max height, flight time and impact speed of a projectile, with an animated trajectory.Free Fall CalculatorFall time and impact velocity from a height, or height from time or speed, with a chart and table.Meeting Cost CalculatorWork out what a meeting really costs from attendees and salaries, with a live cost ticker.Velocity CalculatorSolve v = d/t and a = Δv/t for any variable, plus a SUVAT solver for any three kinematics values.Torque CalculatorSolve τ = r·F·sin θ for torque, force, lever arm or angle, and convert torque to power at any rpm.Acceleration CalculatorAcceleration from velocity change and time, distance and time, or force and mass.Force CalculatorSolve F = ma for force, mass or acceleration, plus weight on every planet.Density CalculatorSolve density, mass or volume with unit conversion and a table of common material densities.Momentum CalculatorCalculate momentum (p = mv), mass, velocity, impulse and momentum change with unit conversion.Potential Energy CalculatorGravitational PE = mgh and spring PE = ½kx²: solve for energy, mass, height, k or stretch.Power CalculatorCalculate power from work and time, force and velocity, or volts and amps, in W, kW and hp.PPI CalculatorPixel density (PPI), dot pitch and retina viewing distance from resolution and screen size.Download Time CalculatorHow long a file takes to download at your internet speed, or the speed you need.Pressure CalculatorSolve P = F/A for pressure, force or area in Pa, kPa, bar, psi and atm.Work CalculatorSolve W = F·d·cos θ for work, force, distance or angle in J, kWh and ft-lb.Hooke's Law CalculatorSolve F = kx for spring force, spring constant or extension, plus stored spring energy.Centripetal Force CalculatorCentripetal force and acceleration from mass, radius and speed or RPM: F = mv²/r.Gravitational Force CalculatorNewton's law of gravitation F = Gm₁m₂/r² for any two masses, with planet presets.Speed of Sound CalculatorSpeed of sound from air temperature or medium, and distance from an echo or thunder delay.Doppler Effect CalculatorObserved frequency from source and observer speeds, or source speed from a pitch shift.Specific Heat CalculatorSolve Q = mcΔT for heat energy, mass, specific heat or temperature change, with materials.Decibel CalculatorAdd dB levels, convert power or voltage ratios to dB, and find sound level at a distance.Bernoulli Equation CalculatorSolve Bernoulli's equation for pressure, velocity or height, with pipe continuity and flow.Buoyancy CalculatorBuoyant force from fluid density, volume and gravity, with a float or sink check.Escape Velocity CalculatorEscape and orbital velocity for any planet, moon or custom mass and radius.Friction Force CalculatorStatic and kinetic friction from material presets, normal force or mass and incline angle.Inclined Plane CalculatorForces, acceleration and push force for a mass on a slope with friction.Light Travel Time CalculatorHow long light or radio takes to reach the Moon, Sun, Mars, Voyager 1 or any distance.E=mc2 CalculatorConvert mass to energy and back with E=mc², in joules, kWh, eV and tons of TNT.Orbital Period CalculatorOrbital period from central mass and semi-major axis with Kepler's third law and presets.Pendulum Period CalculatorPendulum period and frequency from length and gravity, or length from period.Cpk CalculatorCp, Cpk, Pp, Ppk and ppm out of spec from your data or mean and standard deviation.Crosswind Component CalculatorCrosswind and headwind/tailwind components for any runway and wind, with gusts and a diagram.Drag Force CalculatorAerodynamic or hydrodynamic drag force and power from Cd, frontal area, speed and density.E85 Blend CalculatorHow many gallons of E85 and gas to add to hit a target ethanol blend like E30 or E50.Elastic Collision CalculatorGet final velocities after a 1D elastic collision, with momentum and kinetic energy checks.G-Force CalculatorCalculate g-force from turn speed and radius, a speed change over time, or any acceleration.Heat Transfer CalculatorConduction heat flow in W and BTU/h through one or more layers, with R-value and U-value.Helium Balloon Lift CalculatorHow much a helium balloon lifts in grams and how many balloons you need for a payload.Hydrostatic Pressure CalculatorGauge and absolute pressure at any depth in water, seawater, oil or a custom fluid.Impact Force CalculatorAverage impact force and g-force from mass, drop height or speed, and stopping distance/time.Impulse CalculatorFind impulse from force × time or momentum change, or solve for average force or time.Inverse Square Law CalculatorFind light, sound or radiation intensity at a new distance, or the distance for a target.Lever CalculatorEffort force, load or arm length for class 1, 2 and 3 levers, with mechanical advantage.Lightning Distance CalculatorTap at the flash and again at the thunder to see how far away lightning struck, in miles and km.Magnetic Declination CalculatorFind magnetic declination, inclination and field strength for any place and date (WMM2025).Map Radius ToolDraw circles of any radius around points on a map, with multiple rings and a share link.MTBF CalculatorMTBF, failure rate, availability and mission reliability from operating hours and failures.Pipe Pressure Drop CalculatorDarcy-Weisbach pressure drop and head loss with Reynolds number and Colebrook friction factor.Refrigerant PT ChartPressure-temperature chart for R-410A, R-32, R-454B, R-22, R-134a, R-404A and more.Reynolds Number CalculatorReynolds number and laminar, transitional or turbulent regime for pipes, ducts, plates and spheres.RMS Voltage CalculatorConvert peak, peak-to-peak, RMS and average voltage for sine, square and triangle waves.Spring Rate CalculatorCompression spring rate from wire size, coil diameter, coils and material, plus solid height.Standard Atmosphere (ISA) CalculatorISA 1976 temperature, pressure, density, speed of sound and viscosity at any altitude to 86 km.Steam Table CalculatorSaturated and superheated steam properties: enthalpy, entropy, volume and quality (IAPWS-IF97).Superheat and Subcooling CalculatorFind superheat, subcooling and target values from gauge pressures and line temperatures.Thermal Expansion CalculatorLinear, area or volume expansion from size, temperature change and material coefficient.Top of Descent CalculatorWhen to start descending: distance and time to top of descent, required fpm, 3-degree rule.True Airspeed CalculatorTrue airspeed, Mach number and density altitude from IAS/CAS, pressure altitude and OAT.Valve Cv CalculatorSize a valve: required Cv or Kv for liquid, gas or steam, or flow and pressure drop from Cv.Water Heating Time CalculatorHow long to heat water: time, energy and cost from volume, temperatures and heater power.
See all 88 Physics Calculators →