Calculation Results
This page explains the thin-lens formula and shows how to compute focal length, image distance, or object distance. It also shows magnification and gives clear worked examples for converging (convex) and diverging (concave) lenses.
Core formula (thin lens)
The lens formula is:
1/f = 1/v + 1/u
Where:
- f = focal length of the lens (same units as u and v)
- u = object distance from the lens
- v = image distance from the lens
Magnification
Linear magnification (height ratio):
m = − v / u
Negative magnification means the image is inverted relative to the object. Positive means upright.
Sign conventions (simple, classroom)
Use consistent signs. A common practical convention that works for classroom problems:
- Take distances measured from the lens. Use the same direction as positive for both u and v. In many textbook problems, object is left of lens and u is positive.
- For a converging (convex) lens, focal length
fis positive. For a diverging (concave) lens,fis negative. - Real images have positive
v(on the opposite side to the object in many setups). Virtual images have negativev.
If you follow one consistent sign rule, the formula gives correct algebraic results. If uncertain, use the algebraic rearranged forms below and interpret the sign of the result (positive = real, negative = virtual).
Solve for any variable
Find image distance (v)
v = 1 / (1/f − 1/u)
Find object distance (u)
u = 1 / (1/f − 1/v)
Find focal length (f)
f = 1 / (1/v + 1/u)
Worked examples
Example 1 — Converging lens (real, inverted image)
Given: focal length f = 10 cm (convex), object distance u = 30 cm.
Compute image distance:
1/v = 1/f − 1/u = 1/10 − 1/30 = (3 − 1)/30 = 2/30 = 1/15
v = 15 cm (positive → real image on opposite side)
Magnification: m = −v/u = −15/30 = −0.5 → image is inverted and half the object height.
Example 2 — Diverging lens (virtual, upright image)
Given: focal length f = −10 cm (concave), object distance u = 20 cm.
Compute image distance:
1/v = 1/f − 1/u = −1/10 − 1/20 = −(2 + 1)/20 = −3/20
v = −20/3 ≈ −6.67 cm (negative → virtual image on same side as object)
Magnification: m = −v/u = −(−6.67)/20 = 0.333 → upright and one-third the object height.
Example 3 — Find focal length from u and v
Given: u = 25 cm, v = 50 cm.
1/f = 1/v + 1/u = 1/50 + 1/25 = 1/50 + 2/50 = 3/50
f = 50/3 ≈ 16.67 cm
Practical notes
- The thin-lens formula assumes the lens thickness is small compared with u and v. For thick lenses use principal planes.
- Keep units consistent (cm with cm, m with m).
- If algebra gives a negative focal length, you have a diverging lens.
- Compute magnification to know image orientation and size. Negative m = inverted, positive m = upright.
Common mistakes
- Mixing units for u, v, and f.
- Using the wrong sign convention partway through the calculation. Stick to one rule.
- Confusing real and virtual images — always check the sign of v.
- Applying thin-lens formula to thick lens without taking principal planes into account.
FAQ
What does a negative image distance mean?
A negative v indicates a virtual image. That image appears on the same side of the lens as the object and cannot be projected onto a screen.
When is the image real or virtual?
For a converging lens, if the object is outside the focal length (u > f) the image is real. If the object is inside the focal length (u < f) the image is virtual and upright. For a diverging lens the image is always virtual for real objects.
How do I find magnification and image height?
Use m = −v/u. Then image height = m × object height. The sign gives orientation (negative = inverted).
Can I use metres and centimetres together?
Yes, but convert one so all distances use the same unit before plugging into the formula.
Does the formula work for mirrors?
The mirror formula is similar (1/f = 1/v + 1/u) but sign conventions differ. Treat mirrors and lenses separately and follow the correct sign rules.
What if I get divide-by-zero when computing v?
That happens when 1/f − 1/u = 0, i.e. u = f. In that case the image forms at infinity (parallel rays) — no finite image distance.
How precise should I be?
Two or three significant figures are usually fine for classroom work. Use more precision for optical design tasks.
Can I combine multiple lenses?
Yes. For simple thin lens combinations separated by distance, compute the image from the first lens, treat it as the object for the next lens (using its distance from that lens), and continue stepwise. For many lenses use matrix (ray-transfer) methods.
Does wavelength matter?
Yes. Lenses have different focal lengths slightly for different wavelengths (chromatic aberration). For basic calculations, treat f as given for the operating wavelength or use an average value.
Is orientation important for sign?
Always state and follow a single sign convention. Inconsistent orientations are the main source of error.
How to check my result?
Check units and reasonableness: a converging lens with object far away should give v ≈ f. For u near f, v should be large. For diverging lenses expect negative v and small |v| relative to u.
Can I get a quick calculator script?
I can add a small JavaScript snippet that accepts two inputs and computes the third, plus magnification. Say the word and I’ll include it in the page.