Use this mirror equation calculator to solve for object distance, image distance, or focal length, then see what the answer means (real or virtual image, upright or inverted). It also shows the same result in both a no-negatives Beginner view and a signed Physics class view to help you avoid sign mistakes.
Advanced options
How to use our Mirror Equation Calculator
- Pick Solve for to choose what you want to find: image distance (di), object distance (do), or focal length (f).
- Choose Sign mode: Beginner (no negatives) if you want to type positive distances and select locations with dropdowns, or Physics class if your class uses signed distances.
- Select Mirror type (concave or convex). In Physics class mode, this sets the sign of focal length unless you override it.
- Choose the Distance unit (cm, m, in, etc.). Use the same unit for every distance you enter.
- Enter the known distances required for your Solve for choice. In Beginner mode, also choose whether each item is in front of or behind the mirror.
- (Optional) Enter Object height (h0) to get image height (hi).
- (Optional) Open Advanced options to pick a number display style, change the Auto scientific threshold, or enter signed values directly in Physics class mode.
- Click Calculate.
- Read Image type and Beginner vs Physics class summary to confirm your answer matches your homework sign convention.
Definitions
Object distance (do): How far the object is from the mirror along the principal axis. In Beginner mode you enter a magnitude and choose in front vs behind.
Image distance (di): How far the image is from the mirror. Real images form in front of the mirror; virtual images appear behind it. The sign depends on the sign mode.
Focal length (f): Distance from the mirror to the focal point (where parallel rays meet for a concave mirror). In Physics class mode, concave and convex mirrors use opposite signs [2].
Mirror equation: The relationship between do, di, and f for a spherical mirror: 1/f = 1/do + 1/di [1].
Magnification (m): Size and orientation change of the image. Using the same sign convention, m = -di/do. If m is positive the image is upright; if negative it is inverted.
Radius of curvature (R): For a spherical mirror, R = 2f (same sign as f in Physics class mode) [1].
Real vs virtual image: A real image can be formed on a screen (light rays actually meet). A virtual image cannot be projected on a screen (rays only appear to come from a point).
Methodology
What the calculator solves
You provide any two of the three main values (do, di, f). The calculator uses the spherical mirror equation to solve the missing one [1]. It then computes magnification, image height (if h0 is provided), radius of curvature, and an image-type interpretation.
Sign modes (how negatives are handled)
Beginner (no negatives): You type positive magnitudes for do, di, and f. You also choose locations (in front or behind the mirror) for the object and image. The calculator internally converts those choices into signed values for the formulas, then converts back to clear English (for example, "12 cm behind the mirror").
Physics class (signed): You enter signed distances using one consistent Cartesian-style convention (details shown in the Advanced options). Mirror type sets the focal length sign by default (concave and convex have opposite f signs) [3]. If you use the signed override, that entered f sign is used instead.
Core equations
1/f = 1/do + 1/di
di = 1 / ( (1/f) - (1/do) )
do = 1 / ( (1/f) - (1/di) )
f = 1 / ( (1/do) + (1/di) )
Extra outputs
m = -di/do
hi = m * h0
R = 2*f
Image type interpretation
The calculator uses the sign of di (under the active sign mode) to label real versus virtual, and the sign of m to label upright versus inverted. It also reports whether the image is magnified or reduced using |m|.
Special cases and validation
Zero distances are blocked: do and di cannot be 0 because they appear in denominators.
Object at the focal point: If (1/f - 1/do) equals 0, the solved di is not finite (image at infinity). The calculator shows di as N/A and explains that rays leave parallel [1].
Plane mirror option: If you enable plane mirror mode, the calculator treats f as infinity and uses the plane-mirror result. In Physics class mode this is di = -do. In Beginner mode it becomes equal distance behind the mirror (same magnitude as do) [1].
Hidden inputs are ignored: Beginner-only direction dropdowns are not used in Physics class mode, and signed fields are not used in Beginner mode, to prevent mixed-convention mistakes.
Number display: Plain mode avoids scientific notation. Scientific mode always uses it. Auto mode switches to scientific when abs(value) is very large or very small based on your threshold.