All Over Tools logo
Tool Combiner
Analyze Tools Clean Tools Compare Tools Convert Tools Data Validation Extract Tools Format Tools Generate Tools Organize Tools Transform Tools
Audio Tools Font Tools Image Tools Subtitle Tools Video Tools
Archive Tools Document Tools Ebook Tools File Management Tools PDF Tools Presentation Tools
Config Tools Database Tools Dataset Tools JSON Tools Parser Tools Spreadsheet Tools XML Tools
Business Calculators Construction Calculators Date And Time Calculators Education Calculators Financial Calculators Food Calculators Health Calculators Math Calculators Science Calculators Sports Calculators Statistics Calculators
Blog About Us Contact Us

Optics Calculator

Solve the thin-lens/mirror equation for image distance, object distance, magnification, and focal length; convert optical power; and relate wavelength to frequency. Pick a mode and see the formula, sign convention, steps, and warnings behind every result.

Sign convention: distances are measured from the lens/mirror; d₀ is positive for a real object; f is positive for a converging device and negative for a diverging device; dᵢ is positive for a real image and negative for a virtual image. Select the value to calculate in Solve for; that field is hidden automatically, so enter the other known value.

How to use the Optics Calculator

Choose a calculation mode, fill the fields that remain visible, and select Calculate. The Result section lists the value, formula steps, sign convention, and any warnings. Copy result and Download result (.txt) keep that displayed calculation as text.

  1. Choose a mode in Calculation mode: Lens/mirror image distance, magnification & focal length, Optical power ↔ focal length, or Wavelength ↔ frequency.
  2. Select the unknown in that mode's Solve for control. The matching input field is hidden.
  3. Enter the visible values and choose the unit for each one.
  4. Choose Calculate to show the result, steps, and warnings.
  5. Choose Copy result or Download result (.txt) to keep the calculation, or choose Reset to clear the form.

How to calculate lens or mirror image distance

Set Device to Lens or Mirror, then choose Type: Converging (convex lens / concave mirror) or Diverging (concave lens / convex mirror). In Solve for, choose Image distance (dᵢ), Object distance (d₀), or Focal length (f). The calculator uses 1/f = 1/d₀ + 1/dᵢ and m = −dᵢ/d₀.

Select a unit in Distance unit. Enter Object height (h₀, optional) when image height is needed.

Device: Lens
Object distance (d₀): 20 cm
Focal length (f): 10 cm
Image distance (dᵢ): 20 cm
Magnification (m): −1

Under the displayed sign convention, d₀ is positive for a real object, f is positive for a converging device, dᵢ is positive for a real image, and positive m means upright. The result also states image type, orientation, size relationship, and a ray-diagram-style description.

How to calculate optical power

Choose Optical power (P) from focal length or Focal length (f) from optical power in Solve for. Enter the remaining value, select a Focal length unit, and use P = 1/f after conversion to meters. The result gives power in diopters (D) and the converted focal length.

Focal length (f): 25 cm
Optical power (P): 4 D

Focal length and optical power must be nonzero. A positive value represents a converging lens; a negative value represents a diverging lens.

How to calculate wavelength or frequency

Choose Frequency from wavelength, Wavelength from frequency, or Wave speed from wavelength & frequency in Solve for. Medium starts at Vacuum / air (n ≈ 1). Choose Custom refractive index to reveal Refractive index (n); the calculator then uses v = c/n. The relationship is v = λ × f.

Choose units in Wavelength unit and Frequency unit. With 500 nm in Vacuum / air (n ≈ 1), the frequency is about 599.585 THz.

What input checks and assumptions does it use?

Numeric inputs must be finite and have an absolute value no greater than 1e12. Values below 1e-9 in absolute value count as zero where zero is rejected. Object distance must be greater than zero; wavelength, frequency, refractive index, focal length, and optical power have their own checks.

Image mode warns about focal-point geometry, sign mismatches, and very large distances. It uses an ideal thin lens or single spherical mirror with a paraxial approximation. The calculator does not model lens thickness, multiple elements, dispersion, or aberrations. Wave speed mode warns when the calculated speed exceeds c.

Examples of calculations

For a convex lens, enter an object distance and focal length, then inspect image distance and magnification in the result. Choose Mirror to solve for focal length from object and image distances.

For a wave calculation, enter a wavelength in nm and choose a frequency unit such as THz. A custom refractive index changes the speed used in the wavelength-frequency calculation.

When another science calculator fits better

Use the Science Calculators category for work outside optics. The Wavelength Calculator covers the general wave equation with any two values. Choose the Physics Calculator for mechanics, energy, electrical, wave, or decay calculations.

Frequently asked questions

How do I calculate lens image distance?

Choose Lens in Device, enter Object distance (d₀) and Focal length (f), choose Image distance (dᵢ) in Solve for, and select Calculate. The result applies the thin-lens equation and reports magnification, image type, orientation, and steps.

Can I calculate optical power from focal length?

Choose Optical power (P) from focal length in Solve for, enter Focal length (f), and select Calculate. The calculator converts the focal length to meters and reports P in diopters.

How do I calculate wavelength from frequency?

Choose Wavelength from frequency in Solve for, enter Frequency (f), choose Frequency unit and Wavelength unit, and select Calculate. Vacuum / air uses c; Custom refractive index uses v = c/n.

Related Tools

46 views