The lens formula shows the relation between the distance of the object (u), the distance of the image (v) and the focal length (f). It is given as 1/v- 1/u= 1/f. The lens formula is the same for any spherical lens and any distance of the object from the lens. It is however necessary to use the sign convention properly.