Physics calculator

Lens Formula Calculator

Calculate focal length, image distance and lens power from the thin lens formula with a clearly labelled sign convention.

Last reviewed: July 21, 2026Physics formula engine v3.0.0

Physics calculator

Lens Formula Calculator

Enter values, select units and calculate locally. Results use SI internally and show rounded display values.

Decimal.js physics math

Mode

Find focal length from object and image distances.

Focal length inputs

Result and visual stay hidden until you choose Calculate.

Formula and assumptions

Primary formula

1/f = 1/v - 1/u; m = v/u; P = 1/f in metres.

Input assumptions

Distances are signed by the displayed convention. Distance denominators cannot be zero. Lens power uses focal length in metres.

Precision note

Physics calculators convert compatible inputs into SI units before calculating. Decimal.js is used for arithmetic where practical; trigonometric angle factors are rounded for display.

Physics calculation flow

Parse

Read labelled inputs, selected units and calculation mode from the calculator card.

Convert

Convert compatible values to SI base or derived units without calling external services.

Calculate

Apply the selected deterministic mechanics formula and validate against NaN, Infinity and invalid divisors.

Label

Display the result, supporting unit rows, formula steps, warnings and dynamic visual below the input card.

What Lens Formula Calculator does

Use this calculator for simplified convex or concave thin-lens exercises with signed object and image distances.

The calculator is deterministic and runs from manual inputs only. It is a physics formula tool, so it should not be confused with a unit converter that only changes labels after a value is already known.

Formula and variables

1/f = 1/v - 1/u; m = v/u; P = 1/f in metres.

The calculator converts supported units into SI base or derived units for the actual calculation, then formats the result in the selected display unit.

  • f is focal length
  • u is object distance
  • v is image distance
  • m is magnification
  • P is lens power in dioptres

Worked examples

Use the examples below to check expected order of operations and unit handling before applying the tool to your own values.

  • u = -30 cm and v = 60 cm gives f = 20 cm
  • f = 10 cm and u = -30 cm gives v = 15 cm
  • f = 0.5 m gives P = 2 D

Unit conversions

Length, time, mass, area, volume, speed, force, pressure, density, frequency, energy and power units reuse the central NexaCalc conversion registry. Acceleration, angle and spring-constant units use the same SI-first convention where applicable.

The displayed conversion rows are supporting context. They do not change the physical assumptions of the selected formula.

Common mistakes

Most errors come from mixing physical quantities that sound similar in everyday language or choosing a unit that belongs to a different dimension.

  • Mixing sign conventions.
  • Using centimetres directly for dioptres.
  • Treating a thin-lens diagram as a full optical design.

Assumptions and limitations

This page is intended for educational and planning calculations, not professional engineering certification.

This calculator uses idealized physics formulas and the input values you provide. Real systems may require additional effects such as friction, drag, rotation, deformation, losses or measurement uncertainty.

  • Distances are signed by the displayed convention.
  • Distance denominators cannot be zero.
  • Lens power uses focal length in metres.
  • The thin-lens formula assumes paraxial rays and a thin lens.
  • Real lenses may need aberration, thickness and wavelength corrections.

Frequently asked questions

What is the lens formula?

Lens Formula Calculator uses 1/f = 1/v - 1/u; m = v/u; P = 1/f in metres. The result is calculated from the values and units entered in the form.

Which sign convention does this calculator use?

Use this calculator for simplified convex or concave thin-lens exercises with signed object and image distances. Distances are signed by the displayed convention.

How do I calculate focal length from object and image distance?

Lens Formula Calculator uses 1/f = 1/v - 1/u; m = v/u; P = 1/f in metres. The result is calculated from the values and units entered in the form.

What is the difference between convex and concave lenses?

Lens Formula Calculator is formula-based. Use the related calculator when the question changes physical quantity, and use Conversion tools only when the value is already known.

What does negative object distance mean?

Lens Formula Calculator allows signed results only where the physics quantity can carry direction or reference-sign meaning. Divisors such as time, mass and gravity are validated before calculation.

How is magnification calculated?

Lens Formula Calculator uses 1/f = 1/v - 1/u; m = v/u; P = 1/f in metres. The result is calculated from the values and units entered in the form.

What is lens power in dioptres?

Use this calculator for simplified convex or concave thin-lens exercises with signed object and image distances. Distances are signed by the displayed convention.

Why must focal length be in metres for dioptres?

Use this calculator for simplified convex or concave thin-lens exercises with signed object and image distances. Distances are signed by the displayed convention.

What assumptions does the thin lens formula make?

Lens Formula Calculator uses 1/f = 1/v - 1/u; m = v/u; P = 1/f in metres. The result is calculated from the values and units entered in the form.

When should I use the Mirror Formula Calculator?

Lens Formula Calculator uses 1/f = 1/v - 1/u; m = v/u; P = 1/f in metres. The result is calculated from the values and units entered in the form.

References

  • NIST Special Publication 811, Guide for the Use of the International System of Units. Relevance: SI unit symbols and derived-unit naming. Last verified: July 21, 2026. Source.
  • BIPM, The International System of Units SI Brochure. Relevance: SI base and derived units used in mechanics, fluids, waves and optics. Last verified: July 21, 2026. Source.
  • OpenStax University Physics Volume 1. Relevance: introductory formulas for motion, force, work, energy, momentum, fluids, waves and optics. Last verified: July 21, 2026. Source.
  • NIST CODATA internationally recommended values. Relevance: physical constants for electricity, modern physics, gravitation and radiation formulas. Last verified: July 21, 2026. Source.
  • OpenStax University Physics Volume 2. Relevance: electric circuits, capacitance, magnetic force and electromagnetic waves. Last verified: July 21, 2026. Source.
  • OpenStax University Physics Volume 3. Relevance: photons, nuclear decay and blackbody radiation concepts. Last verified: July 21, 2026. Source.

Physics references verified for SI units, mechanics, fluids, waves, sound and optics formulas on July 21, 2026.

Educational disclaimer

This calculator provides mathematical results from the values, conventions and methods you enter. Verify important academic, engineering or professional work independently.