Linear magnification calculator

Enter the image and object distances. The calculator divides y by x and you get linear magnification. y = 0.6 m at x = 0.3 m is p = 2: the image sits twice as far and is twice as large in this model. The same numbers on the lens page give f = 0.2 m.

Focal length from the same x and y: 1/f = 1/x + 1/y. Wave: λ = v/f. Photon: E = hc/λ.

Inputs

Result

Image distance y (m) and Object distance x (m). The result shows up here.

How it works

y, x p p = y/x p ← y, x
Linear magnification: image distance over object distance.

Linear magnification says how many times larger or smaller the image is than the object, measured along the optical axis. The formula is a ratio of distances: p = y/x. Field y is the image distance (numerator), field x is the object distance (denominator). A school magnifier uses a different rule, M = 25 cm/f + 1, and that one takes focal length, not a y and x pair.

Put a projector on the bench. Image 60 cm behind the lens, object 30 cm in front. y = 0.6 m, x = 0.3 m, p = 2. The image is twice as far and twice as large in this model. Flip the numbers: y = 0.1 m and x = 0.2 m give p = 0.5, image closer to the glass and smaller than the object. When y = x, for example both 0.4 m, p = 1 and the scale is one to one.

Both distances have to be positive and in the same unit. p is a pure number, so the meter/foot switch only changes the labels, not the result. The pair 2 m and 0.1 m gives p = 20, like a large screen. The pair 52 mm and 2 m gives p = 0.026, like a frame on a sensor. Beside p sits |p|; here they match, because p > 0.

On the form, y comes first because that is how the formula is written. Type the image, then the object, then Calculate. The calculator example 0.6 and 0.3 gives 2. A comma and a period both parse. The chart of p versus y at fixed x is a straight line: double y, double p.

Feed the same x and y into the lens page. At 0.6 m and 0.3 m you get f = 0.2 m there, because 1/0.3 + 1/0.6 = 5. Here you stay with the ratio. A minus sign for an inverted image appears in p in another convention. Here both distances are positive, so p is positive; you describe inversion in words.

A microscope multiplies objective and eyepiece magnifications. Here one y/x pair, one lens. p is not brightness: a twice-larger image is not twice the lumens.

How to use

  1. Type the image distance y. On a projector that is the lens-to-screen path, for example 0.6 m.
  2. Type the object distance x, for example 0.3 m. Both fields in the same unit from the label.
  3. Compute. 0.6 divided by 0.3 is p = 2. The image sits twice as far as the object and is twice as large in this model.
  4. Flip the scale if the image is closer to the glass: y = 0.1 m and x = 0.2 m give p = 0.5. When y = x, p is always 1.
  5. Open the same numbers on the lens page. 0.3 m and 0.6 m give f = 0.2 m there, not p.

Formula

p = y / x

x > 0, y > 0. p has no unit. This is not M = 25 cm/f + 1.

Letters in p = y/x

Linear magnification is a distance ratio: p = y/x. An image at 0.6 m with the object at 0.3 m is p = 2; those same numbers on the lens card give f = 0.2 m.

p
Dimensionless magnification. 0.6/0.3 = 2: the image is twice as large in this axial model.
y
Image distance in meters, the numerator. 60 cm behind the lens at x = 30 cm sets p = 2.
x
Object distance in meters, the denominator. This is not the loupe M = 25 cm/f + 1; here only the y, x pair counts.

Real-life examples

Example 1

y = 0.6 m, x = 0.3 m -> p = 2.

Example 2

y = 0.1 m, x = 0.2 m -> p = 0.5.

Example 3

y = 0.4 m, x = 0.4 m -> p = 1.

Example 4

y = 2 m, x = 0.1 m -> p = 20.

Example 5

y = 0.052 m, x = 2 m -> p = 0.026.

Example 6

y = 0.9 m, x = 0.3 m -> p = 3.

Example 7

y = 0.5 m, x = 0.5 m -> p = 1.

Example 8

y = 0.12 m, x = 0.04 m -> p = 3.

Ways to use this calculator

  • You compute p = 2 from y = 0.6 m and x = 0.3 m, then take the same numbers to the f page.
  • You compare a projector at p = 20 with a frame at p = 0.026 from 52 mm and 2 m.

Frequently asked questions

What is p at y = 0.6 m and x = 0.3 m?

p = 0.6 / 0.3 = 2. The same numbers on the lens page give f = 0.2 m.

Why is y the first field?

Because p = y/x. Numerator (image) first, denominator (object) second.

Which units do I type?

y and x in meters or in feet, both on the same scale. p is a number, no meter and no foot.

How is this different from a magnifier M = 25 cm/f + 1?

A magnifier takes focal length and a conventional 25 cm. The calculator uses a pair of distances y and x, with no f.

What if x is zero?

You would divide by zero. An object in the lens does not give a finite p.

Where is the minus sign (inverted image)?

In another convention p can be negative. Here y and x are positive, so p is positive. You describe inversion in words.

Does p = 2 mean twice as bright?

No. p is a ratio of distances (or linear size), not intensity. Twice y at the same x is a twice-larger image.

What p at y = 52 mm and x = 2 m?

y = 0.052 m, p = 0.052 / 2 = 0.026. A typical frame: the image is much smaller than the object.

Do feet instead of meters change p?

y and x convert together, so p stays. The result is a number.

Does a microscope use this same p?

A microscope multiplies objective and eyepiece. Here one y/x pair, one lens.

Knowledge sources

The formula is the school one. Units follow SI; NIST SP 330 and BIPM define the measures, not your result.

Page updated in 2026.