Optics Calculator — Lens, Mirror & Snell’s Law

Compute focal length, image distance, magnification, refraction and total internal reflection.

About this calculator

An optics calculator solves the thin lens equation, mirror equation, Snell's law of refraction, and angle calculations for total internal reflection. These cover the geometric optics problems found in introductory physics, photography (focal length, depth of field), and applied optics (microscopes, telescopes, eyeglasses).

Geometric optics treats light as straight-line rays — accurate when feature sizes are much larger than the wavelength of light. For diffraction, interference, and polarisation, you need wave optics.

Formula

\frac{1}{f} = \frac{1}{v} - \frac{1}{u} \;;\; n_1 \sin\theta_1 = n_2 \sin\theta_2

  • f — Focal length (positive: converging; negative: diverging)
  • u — Object distance from lens
  • v — Image distance from lens
  • n — Refractive index of medium

Worked example

Inputs: 10 cm focal length converging lens, object at 30 cm

  1. 1/f = 1/v − 1/u → 1/10 = 1/v − 1/(−30)
  2. 1/v = 1/10 − 1/30 = 3/30 − 1/30 = 2/30
  3. v = 15 cm (positive: real image on opposite side of lens)
  4. Magnification m = −v/u = −15/30 = −0.5 (image is half size, inverted)

Frequently asked questions

Why does light bend when entering glass?

Light travels slower in denser media (c/n where n is refractive index). When a wavefront hits glass at an angle, the part entering first slows down while the part still in air continues at full speed — bending the wavefront direction. Refractive indices: air 1.0, water 1.33, glass 1.5, diamond 2.42 (which is why diamonds sparkle: extreme refraction creates rainbow dispersion).

How does a magnifying glass work?

A converging lens with the object placed inside its focal length produces a virtual, upright, enlarged image. The brain perceives the image as if it were on the far side of the lens. The angular magnification is approximately 25 cm (the closest the unaided eye can focus) divided by the focal length: a 5 cm focal length lens gives 5× magnification.

Related calculators

Waves & Sound Electromagnetism Relativity

More calculators

EMI Calculator Mortgage Calculator SIP Calculator Compound Interest GST / VAT Calculator Salary Calculator Unit Converter Currency Converter Scientific Calculator Concrete Calculator Paint Calculator Tile Calculator Calorie / TDEE Body Fat Macro Calculator O-Ring Sizes Bolt & Nut Sizes Pipe Sizes Wire Gauge AWG Needle Gauge Chart IV Cannula Sizes Suture Sizes Catheter French Sizes Drug Dosage See all 90+ calculators ›