Thin Lens Calculator


Calculate Parameter Value Unit
Focal Length
Object distance (s)
Image distance (s')



Light passing through a lens undergoes refraction, which means that it changes direction. This happens at each of the two surfaces of the lens. This tool can be used for "thin lenses" (ones which lens thickness is much smaller than the distances to the object and to the image). Other requirement is that the light rays are paraxial (rays which make a small angle to the optical axis of the system and lies close to the axis throughout the system.)

Focal points

An object that is located at the focal point will produce an image an infinity. In other words, any ray passing through the focal point, after passing through the lens will travel parallel to the principal axis (axis perpendicular to the lens). The red points on the ray diagram above are the focal points.

Converging and diverging lenses

A converging lens is one which the rays that enter it parallel to the axis converge toward the axis after exiting the lens. A diverging lens is one which these rays diverge away from the axis after exiting it. If the focal length is positive, then the lens is converging. If it is negative, then the lens is diverging.

Thin Lens Equation

The thin lens equation is:
    1/s + 1/s' = 1/f
    s :Distance from the object to the lens
    s':Distance from the lens to the image
    f :Focal length

Real and virtual images

Real images are those where light actually converges, whereas virtual images are found by tracing real rays that emerge from the lens backward to its apparent origin. Real images occur when objects are placed outside the focal length of a converging lens (s>f). If the lens is converging but the distance from the object to the lens is smaller than the focal length, the image will be virtual. Diverging lenses always produce virtual images. This calculator shows a ray diagram when the image is real.


The magnification m of an image is the ratio between the image and object height. It can be calculated by the formula:
    Magnification = -s' / s

If the magnification sign is positive, then the image is upright. If the sign is negative, then the image is upside-down.