My Calculator

Lens Formula Calculator

Calculate image distance, object distance or focal length using the thin lens formula. Get complete solution steps, magnification and a labelled live ray diagram.

Image distance, di15 cm
Lens formula1/f = 1/do + 1/di
Magnification, m = −di/do-0.5
Image naturereal, inverted
Image size for 1 cm object0.5 cm

Thin Lens Ray Diagram and Values

All key distances and the calculated image are drawn directly on this live diagram.

CONVEX THIN LENSFFf = 10 cmOBJECTdo = 30 cmREAL IMAGEdi = 15 cmm = −di / do = -0.5inverted image

Step-by-Step Solution

Here's exactly how this answer was calculated, one step at a time.

Given: f = 10 cm, do = 30 cm, di = 15 cm

  1. Step 1: Write the thin lens formula

    For a converging thin lens, use positive object distance and allow image distance to be negative for a virtual image.

    1/f = 1/do + 1/di
  2. Step 2: Rearrange for image distance

    di = f × do / (do − f)
  3. Step 3: Substitute the known values

    di = 10 × 30 / (30 − 10)
  4. Step 4: Calculate the image distance

    di = 15 cm (real, inverted image)

The lens formula result is:

15 cm

Free Lens Formula Calculator

This Lens Formula Calculator solves the thin lens equation for image distance, object distance, or focal length. Enter any two known values in centimetres and select the unknown. The calculator rearranges the lens formula, substitutes your figures, gives the answer with units, calculates magnification, and presents a ray diagram with the object, lens, focal points and image labelled clearly.

It is designed for school physics, CBSE and GCSE revision, laboratory work, camera and microscope basics, and quick optics homework checks. The illustrated result is especially useful because an answer in centimetres alone does not reveal whether the image is real or virtual, upright or inverted, enlarged or diminished.

Lens Formula and Meaning of Symbols

The thin lens formula used here is 1/f = 1/do + 1/di. In this equation, f is focal length, do is the positive distance from the object to the lens, and di is image distance. For a converging convex lens, a positive di represents a real image on the far side of the lens; a negative di represents a virtual image on the object side.

Rearrange the formula to di = fdo/(do − f) when finding image distance, do = fdi/(di − f) when finding object distance, and f = dodi/(do + di) when finding focal length. Keep every length in the same unit. Centimetres are convenient for classroom questions, while metres are usually preferred in optical power calculations.

How to Use This Lens Formula Calculator

First choose the quantity you need: image distance, object distance, or focal length. Then enter the two available values. The calculator immediately applies the matching rearranged equation and shows every solution step. It also calculates magnification using m = −di/do, so you can relate the numerical distance result to the apparent size and orientation of the image.

Always check the denominator before interpreting an answer. When do equals f for a converging lens, the outgoing rays are parallel and the image is at infinity. A finite image distance cannot be calculated in that special case. If the object is inside the focal length, di becomes negative; that is a valid virtual-image result, not an error.

Lens Formula Worked Example

Suppose a convex lens has focal length f = 10 cm and an object is do = 30 cm from the lens. Use di = fdo/(do − f). Substitution gives di = 10 × 30/(30 − 10) = 300/20 = 15 cm. The image forms 15 cm on the opposite side of the lens, so it is a real image.

Magnification is m = −15/30 = −0.5. The negative sign means the image is inverted, and its magnitude 0.5 means the image height is half the object height. The value-labelled ray diagram makes this outcome visual: the rays meet after the lens and the inverted red image appears between F and 2F.

Convex Lens Image Formation

A convex or converging lens is thicker at its centre and bends parallel rays toward a focal point. When an object is farther than the focal length, refracted rays physically meet on the other side. The image is real and inverted, and it may be smaller, equal in size, or larger depending on object position.

When the object is beyond 2F, the image lies between F and 2F and is diminished. At 2F, the image is also at 2F and equal in size. Between F and 2F, the image is beyond 2F and magnified. These standard ray-diagram cases are direct consequences of the same lens formula.

Virtual Images and the Focal Point

Place an object between a convex lens and its focal point and the rays leave the lens diverging. Your eye traces those rays backward to an apparent image on the object side. The image distance is negative in this sign convention, and the image is virtual, upright and magnified. A magnifying glass operates in this way.

The focal point is therefore a boundary between two different image behaviours. At the focal point itself, rays exit parallel and no screen can catch a finite image. A lens formula calculator helps avoid memorising each case separately: the sign and size of its answer identify the optical behaviour automatically.

Magnification Formula for Lenses

Linear magnification is m = hi/ho = −di/do, where hi is image height and ho is object height. The magnitude tells how many times larger or smaller the image is. For example, |m| = 2 means twice as tall, while |m| = 0.25 means one quarter as tall.

The sign contains useful information. Negative magnification corresponds to an inverted real image, and positive magnification corresponds to an upright virtual image in this convention. Distance and magnification belong together: calculate di first, then use the ratio to predict image size without drawing a full-scale diagram.

Lens Sign Convention and Units

Different textbooks may use a Cartesian sign convention, a real-is-positive convention, or a simplified distance convention. This calculator uses positive object distance and the converging-lens form 1/f = 1/do + 1/di. It reports a negative image distance for a virtual image, which is physically meaningful and makes the diagram easier to understand.

Do not mix centimetres and metres within one calculation. Convert first: 1 m = 100 cm. A focal length of 0.20 m is 20 cm. Lens power is measured in dioptres and equals 1/f when f is in metres; a 0.20 m converging lens has power +5 D.

Uses of the Thin Lens Formula

The lens formula is used in cameras, projectors, microscopes, telescopes, spectacles, magnifiers and many scientific instruments. A camera lens shifts its lens elements to focus objects at different distances onto a sensor. A projector uses a real, enlarged image to place a sharp picture on a screen.

Human eyes also use a variable-focus lens system. The eye lens changes shape slightly to focus light on the retina, while corrective spectacles add lens power to compensate for focusing differences. Real optical devices can have several lenses, but the thin lens equation is the essential starting model.

Accuracy and Limits of the Lens Formula

The thin lens formula assumes a lens is thin compared with its focal length and that rays stay close to the optical axis. This paraxial approximation is excellent for most classroom problems. Real lenses may show chromatic aberration, spherical aberration, distortion, thickness effects and reflection losses.

For professional imaging design, use lens-maker equations, principal planes, ray-tracing software and manufacturer data. Do not use a simple educational result as the sole specification for medical optics, laser equipment, safety eyewear or precision imaging systems. It remains a powerful and reliable tool for basic optical geometry.

Ray Diagram Rules for a Convex Lens

A ray diagram is a visual proof of the lens formula result. Start with the principal axis, draw the lens vertically, and mark equal focal distances on both sides. From the top of the object, draw one ray parallel to the principal axis; after the lens it travels through the far focal point. Draw a second ray through the optical centre; in the thin-lens approximation it continues in a straight line.

Where the refracted rays meet is the top of a real image. If the rays diverge after the lens, extend them backward with dashed lines; their apparent meeting point is a virtual image. The diagram in this calculator follows those rules and updates the displayed focal length, object distance, image distance, magnification and image orientation as you change the values.

Common Lens Formula Mistakes

The most common mistake is using a memorised formula without deciding which distances are known. Write the symbols f, do and di beside the values before rearranging. Another frequent error is forgetting brackets in di = fdo/(do − f). The denominator is the complete difference do minus f, not just f. This matters greatly when the object is close to the focal point.

Students also sometimes treat negative image distance as an impossible physical length. It is a sign-convention result that identifies the image side and virtual nature. Finally, check whether the answer is sensible: for a convex lens with an object far away, the real image should approach the focal plane; when the object moves toward f from outside, the real image moves farther away and grows larger.

Quick Revision Checklist

For every thin lens problem, use this order: identify a converging or diverging lens; convert all lengths to one unit; write 1/f = 1/do + 1/di; rearrange only for the missing variable; substitute with brackets; and state the result with a unit. Then calculate m = −di/do if image height, orientation, or size is relevant.

Interpret the answer in words. A real image has positive di in this calculator and can be projected on a screen. A virtual image has negative di and cannot be projected in the same way. A negative magnification means inverted, while a positive magnification means upright. This short check turns a correct calculation into a complete physics answer.

Lens Formula FAQ Summary

Use 1/f = 1/do + 1/di for a thin converging lens, keep units consistent, and calculate magnification with m = −di/do. A positive image distance indicates a real image on the far side of the lens; a negative value indicates a virtual image. The live diagram connects the formula values to the rays and image location.

Frequently Asked Questions

What is the lens formula?

For a thin converging lens, 1/f = 1/do + 1/di.

What does f mean in the lens formula?

f is the focal length: the distance from the lens to its focal point.

Why is image distance sometimes negative?

A negative di represents a virtual image on the same side as the object in this sign convention.

What happens when object distance equals focal length?

Rays emerge parallel and the image is at infinity.

What is lens magnification?

m = −di/do; its magnitude gives size ratio and its sign gives orientation.

Can I use cm in the lens formula?

Yes, provided focal length, object distance and image distance all use the same unit.

Does a real image form on a screen?

Yes. Real rays meet at the image position, so a screen can capture the image.

Is the thin lens formula exact for every lens?

It is an approximation best suited to thin lenses and paraxial rays.