The mirror equation
The positions of object and image satisfy $\frac{1}{s_o} + \frac{1}{s_i} = \frac{1}{f}$ and the magnification is $M = -\frac{s_i}{s_o}$, with signs that say whether an image is real or virtual and upright or inverted.
From AP Physics 2.