Simplify Your Workflow: Search MiniWebtool.
Add Extension
Home Page > Miscellaneous > Physics Calculators > Lens Equation Calculator

Lens Equation Calculator

Solve the thin-lens equation 1/f = 1/u + 1/v to find focal length, object distance, image distance, magnification, and image height. Identify whether the image is real or virtual, upright or inverted, magnified or reduced. Live ray-diagram preview, converging and diverging lenses, and unit support for mm, cm, and m.

Lens Equation Calculator
⚡ Quick examples
1 What do you want to solve?
We will solve for image distance v using the values above.
Converging lenses focus light (positive f). Diverging lenses spread light (negative f).
2 Lens and distances
All distances and heights use this unit.
cm
Enter as a positive number — sign comes from the lens type.
cm
Distance from the lens to the object (always positive).
cm
Positive for real images, negative for virtual images.
3 Object height (optional)
cm
If you provide the object height, the calculator also returns the image height \(h_i = m \cdot h_o\). Leave blank to get magnification only.

Embed Lens Equation Calculator Widget

About Lens Equation Calculator

The Lens Equation Calculator solves the thin-lens equation \(\dfrac{1}{f} = \dfrac{1}{u} + \dfrac{1}{v}\) for any of the three variables — focal length \(f\), object distance \(u\), or image distance \(v\) — and returns the magnification, image height, lens power in diopters, and the full image properties (real or virtual, upright or inverted, magnified or reduced). The live ray diagram on the right shows the three principal rays so you can see at a glance how the lens forms the image.

How to Use This Lens Equation Calculator

  1. Pick which variable to solve for: image distance v, focal length f, or object distance u. The corresponding input field hides itself — fill in only the two known values.
  2. Choose Converging for a convex lens (positive focal length) or Diverging for a concave lens (negative focal length). Enter the focal length as a positive number — the calculator handles the sign automatically.
  3. Pick a length unit (mm, cm, or m) and enter the two known distances. Optionally enter the object height to also get the image height.
  4. Press Solve lens equation. The result panel shows the unknown distance, magnification, image properties pill row, the full ray diagram, and a step-by-step derivation in LaTeX-rendered math.
  5. Use the Quick examples chips at the top to load common scenarios (camera lens, projector, magnifying glass, microscope eyepiece, human eye, diverging lens, and the two "solve for f or u" variants).

What Makes This Lens Equation Calculator Different

Live ray-diagram preview Every change you make instantly redraws the ray diagram with the three principal rays so you can see the image form before submitting. No other lens-equation calculator on the web shows the image position and orientation live as you type.
Solve for any variable Most calculators only solve for image distance. This one solves for f, u, or v — useful for homework that asks "given the image is at 24 cm, what focal length does the lens need?"
Image-properties classifier The result row tells you in plain language whether the image is real or virtual, upright or inverted, magnified or reduced — with a verdict line explaining the physical scenario (camera, projector, magnifier, peephole, and so on).

The Thin-Lens Equation

The thin-lens equation, also called the Gaussian lens formula, relates the focal length of a thin lens to where the image forms for a given object position:

\[ \dfrac{1}{f} \;=\; \dfrac{1}{u} \;+\; \dfrac{1}{v} \]

Here \(f\) is the focal length of the lens, \(u\) is the object distance (always positive in the real-is-positive convention used by this calculator), and \(v\) is the image distance. A positive \(v\) means the image forms on the opposite side of the lens from the object — this is a real image that can be projected on a screen. A negative \(v\) means the image forms on the same side as the object — this is a virtual image that only the eye can see by tracing the rays backward.

Magnification

Linear (lateral) magnification \(m\) is the ratio of image height to object height. The thin-lens model gives it as:

\[ m \;=\; -\,\dfrac{v}{u} \;=\; \dfrac{h_i}{h_o} \]

The minus sign captures orientation: a positive \(m\) means the image is upright (same orientation as the object); a negative \(m\) means the image is inverted (flipped upside down). The absolute value \(|m|\) tells you the size ratio — bigger than 1 means magnified, smaller than 1 means reduced. A camera lens typically gives \(|m| \ll 1\) and a negative \(m\); a magnifying glass gives \(|m| > 1\) and a positive \(m\).

Image-formation Cases for a Converging Lens

Object positionImage distanceImage natureReal-world example
u → ∞ (very far)v ≈ fReal, inverted, point-likeCamera focusing on a distant landscape
u > 2ff < v < 2fReal, inverted, reducedCamera taking a portrait; human eye
u = 2fv = 2fReal, inverted, same sizePhotocopier 1:1 mode
f < u < 2fv > 2fReal, inverted, magnifiedSlide projector or overhead projector
u = fv = ∞Image at infinity (parallel rays)Searchlight or telescope eyepiece collimator
u < fv < 0 (virtual)Virtual, upright, magnifiedMagnifying glass; jeweler's loupe

Image-formation for a Diverging Lens

A diverging (concave) lens always produces a virtual, upright, reduced image, regardless of where you place the object. The image sits between the object and the lens, and the magnification is always positive and less than 1. This is why peepholes, door viewers, and the front element of a wide-angle camera attachment use diverging optics — they shrink the scene into a smaller upright view.

Lens Power and Diopters

Lens power \(P\) is the reciprocal of focal length when \(f\) is expressed in meters: \(P = 1/f\) with units of diopters (D). A short focal length corresponds to a strong lens with high power. Eyeglass and contact-lens prescriptions are written in diopters: +2 D corrects farsightedness using a converging lens of focal length 0.5 m, while −1 D corrects mild nearsightedness using a diverging lens.

Sign-Convention Reference

This calculator uses the real-is-positive convention common in introductory physics textbooks:

  • Object distance u: positive when the object is on the side of the incoming light (the usual case).
  • Image distance v: positive for a real image on the opposite side of the lens; negative for a virtual image on the same side as the object.
  • Focal length f: positive for a converging (convex) lens; negative for a diverging (concave) lens.
  • Magnification m: positive for an upright image; negative for an inverted image.
  • Object height \(h_o\): taken positive (above the axis); image height \(h_i\) shares the sign of m.

Frequently Asked Questions

Why does the focal length sometimes get auto-flipped? Many textbooks describe a diverging lens by its magnitude — "a 5 cm diverging lens" — and expect the student to apply the negative sign mentally. To make the calculator forgiving, if you pick the diverging type and enter a positive focal length, the sign is flipped for you. If you enter a negative focal length with the converging type, the calculator stops and asks you to fix the sign because that combination is genuinely contradictory.

What if the calculator says the image is at infinity? The object is sitting exactly at the focal point of the lens. The lens equation gives \(1/v = 1/f - 1/u = 0\), so v is undefined (or infinite). Physically, the outgoing rays are parallel and never converge to form a finite image. Move the object slightly closer to or farther from the lens.

Does this work for mirrors? The same equation form \(1/f = 1/u + 1/v\) applies to spherical mirrors with appropriate sign conventions, but the conventions are slightly different from the lens case. This calculator is built around the lens convention. For mirrors you would need a mirror-equation calculator that uses the mirror-specific signs.

What is the difference between linear and angular magnification? The calculator returns the linear (lateral) magnification \(m = -v/u\), which compares image and object heights for an object of finite size. Angular magnification compares the angle subtended by the image at the eye to the angle subtended by the object — that is the relevant quantity for telescopes and microscopes when comparing visual size, but it depends on viewing distance and is not the same as \(m\).

Reference this content, page, or tool as:

"Lens Equation Calculator" at https://MiniWebtool.com/lens-equation-calculator/ from MiniWebtool, https://MiniWebtool.com/

by miniwebtool team. Updated: 2026-05-17

Related MiniWebtools:

Physics Calculators:

Top & Updated:

Random PickerRandom Name PickerInstagram User ID LookupLine CounterFPS ConverterRelative Standard Deviation CalculatorSort NumbersMAC Address GeneratorBatting Average CalculatorRemove SpacesERA CalculatorImage ResizerFacebook User ID LookupFeet and Inches to Cm ConverterRandom Truth or Dare GeneratorWord to Phone Number ConverterMAC Address LookupSun, Moon & Rising Sign Calculator 🌞🌙✨Sum CalculatorBitwise CalculatorSlope and Grade CalculatorPercent Off CalculatorMP3 LooperWord Ladder GeneratorRandom Credit Card GeneratorRandom Quote GeneratorSquare Root (√) CalculatorAudio SplitterNumber of Digits CalculatorSHA256 Hash GeneratorInvisible Text GeneratorRoman Numerals ConverterAI Text HumanizerLog Base 10 CalculatorOPS CalculatorMaster Number CalculatorRandom IMEI GeneratorRandom Superpower GeneratorPhone Number ExtractorCm to Feet and Inches ConverterMerge VideosHalfway Date CalculatorVertical Jump Calculator📷 OCR / Image to TextOn Base Percentage CalculatorRandom Activity Generator⬛ Aspect Ratio CalculatorSlugging Percentage CalculatorRandom Poker Hand GeneratorFile Size ConverterSalary Conversion CalculatorSaturn Return CalculatorRandom Meal GeneratorRandom Fake Address GeneratorText FormatterBinary to Gray Code ConverterRandom Birthday GeneratorNumber to Word ConverterRandom Movie PickerCompound Growth CalculatorCaffeine Overdose CalculatorOctal CalculatorCompare Two StringsName Number CalculatorLeap Years ListWAR CalculatorRandom Loadout GeneratorCM to Inches ConverterLove Compatibility Calculator📅 Date CalculatorVideo to Image ExtractorRandom Writing Prompt GeneratorBCD to Decimal ConverterDecimal to BCD ConverterStair CalculatorAdd Text to ImageImage SplitterAdd Prefix and Suffix to TextConnect the Dots GeneratorImage CompressorQuotient and Remainder CalculatorPercent Growth Rate CalculatorFirst n Digits of PiAcreage CalculatorIP Subnet CalculatorBattery Life CalculatorRemove AccentArc Length CalculatorPER CalculatorTime Duration CalculatorBingo Card GeneratorDay of the Year Calculator - What Day of the Year Is It Today?YouTube Channel StatisticsGray Code to Binary ConverterMercury Retrograde CalendarURL Extractor🖱️ Click CounterWhat is my Lucky Number?Proportion CalculatorWHIP CalculatorRemove Leading Trailing SpacesMartingale Strategy CalculatorRandom Object GeneratorOutlier CalculatorSmall Text Generator ⁽ᶜᵒᵖʸ ⁿ ᵖᵃˢᵗᵉ⁾List of Prime NumbersVideo CompressorRandom User-Agent GeneratorSHA512 Hash GeneratorWhat is my Zodiac Sign?Astrological Element Balance CalculatorAI Language DetectorLottery Number GeneratorRandom Time GeneratorNumber ExtractorHeight Percentile CalculatorDay of Year Calendar🎰 Gacha Pity CalculatorWeight Loss CalculatorBinary to BCD ConverterBreak Line by CharactersLong Division CalculatorP/E Ratio CalculatorAngel Number CalculatorList RandomizerFlip VideoAI Punctuation AdderSteel Weight CalculatorRatio to Percentage CalculatorIP Address to Hex ConverterRandom Number PickerMorse Code GeneratorRandom Chess Opening GeneratorSocial Media Username CheckerSum of Positive Integers CalculatorVideo SplitterBonus CalculatorCone Flat Pattern (Template) GeneratorRandom Chord GeneratorModulo CalculatorRandom Emoji GeneratorPVIFA Calculator🔍 Plagiarism CheckerAI ParaphraserPVIF CalculatorSquare Numbers ListLife Path Number CalculatorMAC Address AnalyzerTrigonometric Equation SolverEmail ExtractorHypotenuse CalculatorBcrypt Hash Generator / CheckerPercent to PPM ConverterRandom PIN GeneratorTaco Bar CalculatorExponential Decay CalculatorAntilog CalculatorFraction CalculatorRandom Group GeneratorBoiling Point CalculatorYouTube Comment PickerYouTube Tag ExtractorCollage MakerShort Selling Profit CalculatorAdjust Video SpeedMandelbrot Set ExplorerRadical SimplifierColor InverterDestiny Number CalculatorRandom Tournament Bracket Generator🎮 Game Sensitivity ConverterGrade CalculatorMiter Angle CalculatorName RandomizerNumber RandomizerDecking CalculatorWord Scramble GeneratorRandom Name GeneratorLog (Logarithm) CalculatorPercentile CalculatorNonogram Generator (Picross)Coin FlipperDMS to Decimal Degrees ConverterFirst n Digits of eEstimation CalculatorFence CalculatorRandomize NumbersRock Paper Scissors GeneratorDice Roll Probability CalculatorBroken Link CheckerCatalan Number GeneratorConvolution CalculatorIP Address to Binary ConverterReverse VideoYouTube Earnings EstimatorUnit Rate CalculatorLongest Day of the Year🔊 Tone GeneratorSort Lines AlphabeticallyHex to BCD ConverterBCD to Binary ConverterBCD to Hex ConverterMedian CalculatorStandard Error CalculatorAverage CalculatorRemove Audio from VideoActual Cash Value CalculatorScientific Notation to Decimal ConverterLog Base 2 CalculatorRoot Mean Square CalculatorSHA3-256 Hash GeneratorAI Sentence ExpanderLbs to Kg ConverterHex to Decimal ConverterRandom String GeneratorAmortization CalculatorMarkup CalculatorDecimal to Hex ConverterInstagram Font GeneratorSocial Media Image Size GuideTikTok Money CalculatorTwitter/X Character CounterTwitter/X Timestamp ConverterYouTube Watch Time CalculatorTwitch Earnings CalculatorYouTube Shorts Monetization CalculatorFacebook Ad Cost CalculatorSocial Media ROI CalculatorSocial Media Post Time OptimizerCTR CalculatorROAS CalculatorInfluencer ROI CalculatorForce CalculatorAcceleration CalculatorVelocity CalculatorMomentum CalculatorProjectile Motion CalculatorKinetic Energy CalculatorPotential Energy CalculatorWork and Power CalculatorDensity CalculatorPressure CalculatorIdeal Gas Law CalculatorFree Fall CalculatorTorque CalculatorHorsepower CalculatorDilution CalculatorChemical Equation BalancerStoichiometry CalculatorPercent Yield CalculatorEmpirical Formula CalculatorTitration CalculatorMole/Gram/Particle ConverterIrregular Polygon Area CalculatorFrustum CalculatorTorus Calculator3D Distance CalculatorGreat Circle Distance CalculatorCircumscribed Circle (Circumcircle) CalculatorInscribed Circle (Incircle) CalculatorAngle Bisector CalculatorTangent Line to Circle CalculatorHeron's Formula CalculatorCoordinate Geometry Distance CalculatorVolume of Revolution CalculatorSurface of Revolution CalculatorParametric Curve GrapherRiemann Sum CalculatorTrapezoidal Rule CalculatorSimpson's Rule CalculatorImproper Integral CalculatorL'Hôpital's Rule CalculatorMaclaurin Series CalculatorPower Series CalculatorSeries Convergence Test CalculatorInfinite Series Sum CalculatorAverage Rate of Change CalculatorInstantaneous Rate of Change CalculatorRelated Rates SolverOptimization Calculator (Calculus)Gradient Calculator (Multivariable)Divergence CalculatorCurl CalculatorLine Integral CalculatorSurface Integral CalculatorJacobian Matrix CalculatorNewton's Method CalculatorRREF Calculator (Row Echelon Form)Matrix Inverse CalculatorMatrix Multiplication CalculatorDot Product CalculatorCross Product CalculatorVector Magnitude CalculatorUnit Vector CalculatorAngle Between Vectors CalculatorNull Space CalculatorColumn Space CalculatorCramer's Rule CalculatorMatrix Diagonalization CalculatorQR Decomposition CalculatorCholesky Decomposition CalculatorMatrix Power CalculatorCharacteristic Polynomial CalculatorBayes' Theorem CalculatorF-Test / F-Distribution CalculatorHypergeometric Distribution CalculatorNegative Binomial Distribution CalculatorGeometric Distribution CalculatorExponential Distribution CalculatorWeibull Distribution CalculatorBeta Distribution CalculatorSpearman Rank Correlation CalculatorFisher's Exact Test CalculatorContingency Table CalculatorOdds Ratio CalculatorTip Splitter (Advanced)Lease vs Buy CalculatorHourly Rate Calculator (Freelancer)Invoice Late Fee CalculatorESPP CalculatorStock Split CalculatorOptions Probability CalculatorDollar to Gold ConverterBeam Load CalculatorPipe Flow CalculatorBolt Torque CalculatorGravel, Sand & Topsoil CalculatorRandom Sentence GeneratorRandom Paragraph GeneratorRandom Math Problem GeneratorRandom Bible Verse GeneratorRandom Cat/Dog Name GeneratorRandom Debate Topic GeneratorBody Recomposition CalculatorAlcohol Calorie CalculatorMedication Dosage CalculatorPace to Calories CalculatorHydration CalculatorTrain Meeting Problem SolverAge Word Problem SolverMixture Problem SolverWork Rate Problem SolverDistance-Speed-Time Triangle CalculatorCoin Word Problem SolverNumber Bonds GeneratorCarry and Borrow VisualizerTimes Tables QuizMental Math TrainerRoman Numeral Math SolverEgyptian Multiplication CalculatorVedic Math Tricks CalculatorRussian Peasant MultiplicationSoroban Abacus SimulatorAnnuity Payout CalculatorReverse Mortgage CalculatorVariable Annuity CalculatorFixed Indexed Annuity CalculatorBond Convexity CalculatorBond Duration Calculator (Macaulay & Modified)Forward Rate CalculatorMortgage Recast CalculatorTreasury Inflation-Protected Securities (TIPS) CalculatorStock Beta CalculatorTreynor Ratio CalculatorSortino Ratio CalculatorDoppler Effect CalculatorSpring Constant CalculatorPendulum Period CalculatorCentripetal Force CalculatorAngular Velocity CalculatorMoment of Inertia CalculatorSnell's Law CalculatorCoulomb's Law CalculatorElectric Field CalculatorMagnetic Field of Wire CalculatorLens Equation CalculatorA/B Test Significance CalculatorA/B Test Sample Size CalculatorConversion Rate CalculatorCustomer Lifetime Value (CLV) CalculatorCustomer Acquisition Cost (CAC) CalculatorChurn Rate CalculatorRetention Rate Cohort CalculatorNPS (Net Promoter Score) CalculatorPareto Chart GeneratorSix Sigma Process Capability CalculatorTessellation GeneratorSpirograph GeneratorVoronoi Diagram GeneratorDelaunay Triangulation GeneratorL-System Fractal GeneratorJulia Set GeneratorPolar Equation Plotter3D Surface PlotterSierpinski Triangle GeneratorcURL Command BuilderHTTP Status Code ReferenceUUID Validator/DecoderURL ParserQuery String BuilderSVG to React/JSX ConverterSCSS to CSS CompilerLess to CSS CompilerTypeScript PlaygroundJSON Schema GeneratorImage to ASCII Art ConverterImage to SVG TracerLipogram CheckerPangram CheckerAcronym GeneratorBackronym GeneratorPig Latin TranslatorEXIF Data Viewer/RemoverROT13 Encoder/DecoderAtbash Cipher ToolVigenère Cipher ToolPronunciation IPA ConverterHemingway-Style Readability EditorSentence Length Variance AnalyzerWord Frequency AnalyzerBusiness Days CalculatorAdd Business Days to DateDate Pattern GeneratorHow Long Until CalculatorHow Long Ago CalculatorBirthday Across Cultures CalculatorLunar Calendar ConverterHijri Calendar ConverterHebrew Calendar ConverterInsulin Sensitivity Factor CalculatorCarb-to-Insulin Ratio CalculatorLean Body Mass to Strength CalculatorOne-Mile Walk Test (Rockport) CalculatorCooper 12-Minute Run CalculatorFFMI CalculatorAPGAR Score CalculatorGlasgow Coma Scale CalculatorWells Score Calculator (DVT/PE)Tennis Score TrackerSoccer xG (Expected Goals) CalculatorCricket Run Rate CalculatorRugby Points CalculatorBoxing Punch Power CalculatorRace Time PredictorSwimming SWOLF CalculatorYoga Pose Hold TimerFishing Knot Strength CalculatorBike Gear Ratio CalculatorClimbing Grade ConverterWine Pairing SuggesterStandard Drink CalculatorCaffeine Half-Life TrackerSpice Substitution FinderDietary Restriction Recipe FilterMarinade Time CalculatorFermentation Time CalculatorSmoking Wood Pairing GuideFreelance Project Pricing CalculatorSaaS Pricing CalculatorSubscription Cost TrackerSide Hustle ROI CalculatorRemote Work Savings CalculatorCoffee Habit Cost CalculatorGym vs Home Workout Cost CalculatorLunch Cost CalculatorWealth Growth Visualizer1031 Exchange CalculatorRental Yield CalculatorCash-on-Cash Return CalculatorBRRRR Method CalculatorSection 8 Rent CalculatorRoommate Rent SplitterAirbnb Pricing OptimizerStatute of Limitations CalculatorSentence Reduction CalculatorSales Tax Nexus CheckerPatent Filing Fee CalculatorTrademark Class FinderWill Asset Distribution CalculatorWorkers' Compensation CalculatorStopping Distance CalculatorTrip Cost SplitterVehicle Weight Distribution CalculatorTrailer Tongue Weight CalculatorTire Tread Wear CalculatorEngine Compression Ratio CalculatorHeadlight Beam Distance CalculatorCat Litter Box CalculatorAquarium Heater Wattage CalculatorBird Cage Size CalculatorReptile Habitat UVB CalculatorPet Travel Crate Size FinderHorse Hay CalculatorCrochet Hook Size ConverterKnitting Needle Size ConverterKnitting Pattern CalculatorCross-Stitch Floss CalculatorQuilt Binding CalculatorOrigami Paper Size CalculatorPottery Clay Shrinkage CalculatorBeading Pattern CalculatorResin Casting Volume CalculatorEmbroidery Thread Length Calculator