A 50 mm lens with the object at 250 mm
The default setup is a converging lens with a focal length of 50 mm, an object 250 mm in front of it, and an object 24 mm tall. The tool places the image 62.5 mm behind the lens, with a lateral magnification of -0.25, an image height of -6 mm, and an optical power of 20 diopters.
Checking it by hand takes one subtraction. The thin lens equation says 1/f equals 1/do plus 1/di, so 1/di equals 1/50 minus 1/250, and putting both over a common base gives 5/250 minus 1/250, or 4/250, and flipping it shows that di is 62.5 mm.
The rearranged form the tool uses, di equals f times do divided by (do minus f), gives the same thing: 50 times 250, divided by 250 minus 50. Magnification is minus di over do, so -62.5 over 250, which is -0.25. The image is a quarter the size of the object and the minus sign says it is upside down.
The first result line, Image Distance, is how far behind the lens the sharp image forms. Do not confuse it with the focal length, the 50 mm you typed in. The image distance only approaches the focal length when the object is very far away; at 250 mm it is already 12.5 mm further back.
Sign conventions behind the minus signs
The tool follows the common real-is-positive convention. A positive image distance means a real image on the far side of the lens, where light actually converges and you could put a screen or a sensor. A negative image distance means a virtual image on the same side as the object, which you can see by looking through the lens but cannot project.
Focal length is positive for a converging lens and negative for a diverging one, as the input label says. Object distance should be positive for an ordinary real object in front of the lens.
Magnification carries orientation. Negative means inverted, positive means upright. Its size gives the scale: 0.25 means a quarter size, 2.5 means two and a half times larger.
The Image Height line keeps that sign too, and its label says so: negative means inverted. For the default it reads -6 mm, a 6 mm image upside down. In the magnifier case below it reads a positive 60 mm, an upright image. Some optics courses use the opposite Cartesian convention, where distances to the left of the lens are negative; if yours does, your signs on do will differ but the physical answer is the same.
Inside the focal length: a virtual, magnified image
Move the object to 30 mm, closer to the lens than its 50 mm focal length. The tool now gives an image distance of -75 mm, a magnification of 2.5 and an image height of 60 mm, and the summary sentence says Virtual image.
By hand: 1/di equals 1/50 minus 1/30. That is 0.02 minus 0.0333, or minus 0.0133, and 1 divided by 0.0133 is 75. So di is -75 mm. Magnification is minus (-75) over 30, which is plus 2.5.
This is a magnifying glass. The lens cannot bring the rays to a focus, so they leave the lens still spreading, and your eye traces them back to an upright, enlarged image 75 mm behind the object on the same side. The closer the object gets to the focal point from inside, the larger and further away that virtual image becomes.
Move the object closer still and the magnification falls back toward 1. At 10 mm it is about 1.25. A hand lens works best with the object just inside the focal length, not pressed against the glass.
The points where image and object swap roles
Two object positions are worth knowing for a converging lens. At twice the focal length, 100 mm for the default lens, the image also forms at 100 mm and the magnification is exactly -1: same size, inverted. Entering 100 for the object distance confirms it.
Between f and 2f the image is real, inverted and larger than the object. At 75 mm the tool gives a magnification of -2 and an image height of -48 mm. This is the projector arrangement: a small slide just beyond the focal point throws a large image a long way off.
Beyond 2f the image is real, inverted and smaller, which is the camera arrangement. The default 250 mm object sits here, five times the focal length, with a quarter-size image.
At exactly the focal length the rays leave the lens parallel and no image forms at any finite distance. The tool recognises this case: with the object at 50 mm it returns an error explaining that the image is at infinity, rather than a number. Move the object even slightly either way and you get a real answer, but a very large one, because the image runs off toward infinity as the object approaches f.
Diverging lenses always give smaller, upright images
Enter -50 for the focal length and keep the object at 250 mm. The image distance comes out at -41.67 mm, the magnification at 0.17 (more precisely 0.1667), the image height at 4 mm and the power at -20 diopters.
By hand: 1/di equals -1/50 minus 1/250, which is -5/250 minus 1/250, or -6/250, which gives di of -41.67 mm. The magnification is 41.67 over 250, about one sixth.
Move the object in to 30 mm and the image is at -18.75 mm with a magnification of 0.63 (0.625 before rounding). However you place a real object, a single diverging lens gives a virtual, upright image that is smaller than the object and sits between the lens and its focal point.
That is why a diverging lens on its own cannot project anything. It is used to spread a beam, to correct short sight, or in combination with a converging lens to change the overall focal length of a system.
Comparing the 30 mm, 50 mm and 75 mm presets
Here the object stays at 250 mm and only the lens changes. A 30 mm lens forms the image at 34.09 mm with magnification -0.14 and an image 3.27 mm tall. The default 50 mm lens gives 62.5 mm and -0.25. A 75 mm lens gives 107.14 mm and -0.43, with an image 10.29 mm tall.
Longer focal length means a larger image of the same object, which is why telephoto lenses fill the frame. It also means the image forms further from the lens. The 75 mm lens needs its sensor 107.14 mm back, where the same lens focused far away would need only 75 mm.
That extra distance is focusing extension. For the default 50 mm lens, focusing on something at 250 mm instead of at infinity needs 12.5 mm of extra travel, the difference between 62.5 and 50. Close focus on real lenses is limited by how far the optics can move.
The powers drop as focal length grows: 33.33 D for the 30 mm lens, 20 D for 50 mm and 13.33 D for 75 mm.
What diopters mean and why the tool shows them
Optical power in diopters is 1 divided by the focal length in metres. A 50 mm lens has a focal length of 0.05 m, so its power is 1 over 0.05, which is 20 D. A diverging lens has negative power.
Opticians use diopters because the powers of thin lenses placed in contact add up. A +20 D lens pressed against a -5 D lens behaves roughly like a single +15 D lens, with a focal length of about 66.7 mm. Adding focal lengths directly would give nonsense.
To go the other way, from a spectacle prescription to the focal length box, divide 1 by the diopter value to get metres, then convert to millimetres. A prescription of +2.00 D is a half-metre lens, and -4.00 D is a diverging lens with a focal length of a quarter metre, so enter -250 mm. The real effect of glasses also depends on the distance from the lens to the eye, which this tool does not include.
A focal length of 0 is not a real lens, and the tool rejects it with an error. The power line is labelled to remind you that it expects the focal length in millimetres: it divides one thousand by the millimetre value, which is the same as 1 over the focal length in metres.
Where the thin lens model breaks down
The equation assumes a lens thin enough that its thickness can be ignored, light rays close to the axis, and the same medium, usually air, on both sides. Under those conditions it is very accurate for simple spectacle lenses, magnifiers and long focal length singlets.
Real camera lenses are thick, multi-element systems. For those, measure do and di from the front and rear principal planes rather than from the glass. The equation still holds between those planes, but the planes can sit well inside or even outside the lens barrel, so a tape measure from the front element will not match.
It also ignores aberrations. Spherical aberration, field curvature and chromatic aberration all blur the image away from the ideal point. The tool gives you where the paraxial image is, not how sharp it will be.
Object distance must be greater than zero, and a zero or negative entry produces an error. In a multi-lens system a negative object distance can stand for a virtual object, formed behind the lens by an earlier element. The tool does not handle that case, so if you are chaining lenses, work the second lens by hand when its object lies behind it.