Geometric Optics & Lens Refraction Calculator
Thin-lens image distance and magnification, with a ray diagram showing the parallel, focal and central rays forming a real or virtual image.
Thin-lens image distance and magnification, with a ray diagram showing the parallel, focal and central rays forming a real or virtual image.
A real, inverted, enlarged image 30 cm from the lens
1/15 + 1/dᵢ = 1/10 gives dᵢ = 30 cm, and m = −dᵢ/dₒ = -2. A positive image distance means the light really converges there — put a screen at that spot and the picture appears on it.
Real images are always inverted — that is not a coincidence
The magnification is m = −dᵢ/dₒ, and the object distance is always positive. So the sign of the image distance *is* the orientation: positive dᵢ forces a negative m, which is an inverted image. There is no fourth case to memorise — real-and-upright and virtual-and-inverted cannot happen with a single thin lens.
Where this sits among the standard cases
Object between f and 2f: a real, inverted, enlarged image beyond 2f on the far side. This is a projector.
Lens power: 10 dioptres
Power is 1/f with f in metres — 10 D for a 10 cm lens. Positive powers converge, and correct long-sightedness. It is the number on a spectacle prescription, and it is used instead of focal length because powers of stacked lenses simply add.
What the model leaves out
A lens of zero thickness, one wavelength of light, and rays close to the axis. Real lenses have thickness, focus different colours at different distances, and blur rays that arrive far from the centre. This is the right model for coursework and for understanding what a lens does — not for designing one.
Worked out in your browser — nothing is sent anywhere.
Save this result, change your inputs, and recalculate to compare scenarios side by side.
The subject sits well beyond 2f, so the sensor catches a small, real, inverted image — which the camera then flips for you.
Held inside the focal length, the same lens gives a virtual, upright, enlarged image instead.
Converging lenses for long sight, diverging for short sight, measured in dioptres so stacked powers add.
The slide sits just beyond the focal point, which throws a large real image across the room.
Two lenses in series: the first forms a real image, the second is used as a magnifier on it.
Ray diagrams and the lens equation, with the sign convention stated rather than assumed.
1/dₒ + 1/dᵢ = 1/f, where dₒ is the object distance, dᵢ the image distance and f the focal length. A converging (convex) lens has a positive focal length; a diverging (concave) one has a negative focal length. A positive image distance means a real image on the far side of the lens; a negative one means a virtual image on the same side as the object.
Light actually arrives at a real image, so a screen placed there catches a picture. At a virtual image no light arrives at all — the rays leave the lens still spreading apart, and the image is simply where your eye traces them back to. That is why you can project a slide onto a wall but cannot project what you see through a magnifying glass.
It follows from the algebra rather than being a separate rule. Magnification is m = −dᵢ/dₒ, and the object distance is always positive, so the sign of the image distance is the orientation. A real image has a positive dᵢ, which forces a negative m — inverted. There are only two combinations in the whole topic: real and inverted, or virtual and upright. Real-and-upright cannot happen with one thin lens.
Three rays from the tip of the object are enough, and any two of them fix the image. One travels parallel to the axis and then bends through the far focal point. One passes through the near focal point and emerges parallel to the axis. One goes straight through the centre of the lens unchanged. Where the three cross is the tip of the image; if they only cross when extended backwards, the image is virtual.
No image forms anywhere. Rays from a point at the focus emerge exactly parallel, so they never meet again and never appear to come from a common point either. The equation says the same thing: 1/dᵢ = 1/f − 1/dₒ = 0, so dᵢ is infinite. This is the arrangement used deliberately in a searchlight or a collimator, where parallel output is the whole objective.
Because the object is held closer to the lens than its focal length. In that arrangement the rays are still diverging after the lens, so the image is virtual, upright and enlarged, and it sits further away than the object — which lets your eye focus on something that would otherwise be too close to see sharply. Move the object past the focal point and the image flips over and becomes real.
It can only ever produce a virtual, upright, reduced image, closer to the lens than the object — no matter where you put the object. There are no cases to work through, which makes it the simplest lens to reason about. That single behaviour is what makes it useful for correcting short-sightedness, where the eye focuses light too soon and needs it spread out a little first.
The reciprocal of the focal length in metres, so a 10 cm converging lens is +10 D and a 50 cm one is +2 D. Spectacle prescriptions use power rather than focal length for a practical reason: when lenses are stacked, their powers simply add, while their focal lengths do not. A +2 D and a +3 D lens together behave as +5 D.
For a converging lens there are four regions. Beyond 2f gives a real, inverted, reduced image between f and 2f — a camera, and an eye. At exactly 2f the image is the same size, at 2f on the other side. Between f and 2f gives a real, inverted, enlarged image beyond 2f — a projector. Inside f gives a virtual, upright, enlarged image — a magnifying glass.
Lens thickness, the wavelength of the light, and rays that arrive far from the axis. Real lenses focus blue light slightly nearer than red (chromatic aberration) and focus edge rays nearer than central ones (spherical aberration), and both get worse at high magnification. The model is right for understanding what a lens does and for coursework; it is not enough to design one.