When working on graphic documentation of heritage, digitization, or simply scientific photography, one of the most relevant aspects of our work concerns the relationship of dimensions between the image and the scene, so that it can serve as evidence of certain geometric aspects of our scene, work, artifact, etc…
For this purpose, in photography there is a series of calculations around what is known as lens magnification factors, through which it is possible to deduce the size relationship of the subjects contained in our image in relation to reality.
This information regarding the magnification or scale factor of an image is extremely common in the world of macro photography since often the native magnification of our lens must be corrected when working with the well-known extension tubes.
There are various ways to determine the magnification factor of a lens or a lens set plus one or more extension tubes. In this article, we will review the possible methods to achieve these calculations and be able to attach them to our images in the form of metadata in order to perfectly document this factor.
Knowing the magnification of our lens experimentally:

The technique is very simple and is based on photographing at the minimum possible distance, or any other distance we wish to study, allowed by our optics, a ruler or tape measure divided in millimeters. Once our image is developed, it is enough to count the millimeters we have been able to cover along the width of our image.

Next, we must inform ourselves about the width of our sensor; for example, typical Nikon APS sensors usually have about 23.6 mm in their width. In this way, we can perform the following calculation if our image has covered a horizontal surface of 159mm and 60mm respectively:
Ma = 23.6mm / 159mm = 0.148
Since I used a 50mm lens and these lenses usually have a magnification of 0.15x, our calculations are quite close to the theoretical value.
Similarly, if we insert a 12mm extension tube, the calculations would be:
Ma = 23.6mm / 60mm = 0.39
Which, as we will see below, closely approximates the theoretical values we will obtain in the following section
Knowing the magnification of a lens from the focusing distance:
Although there is a relationship known as the Thin Lens equation, which describes the magnification factor, the difficulty we have is that, in many cases, neither the focal length provided by the manufacturer of our equipment is precise, nor is it fixed for all focusing distances. Thus, the longer our lens is, we can experience variations of this focal length of up to 25% during focus adjustment. Therefore, theoretically anticipating the results of our lens is not especially feasible depending on the optics used, although we can approximate it relatively. The following equation is a simplification of that equation:
For this, we will use the following variables:
f = Focal length d = Focusing distance in mm r = sqrt ( (d² / 4) - f * d) g = (d / 2) + r
So that the magnification will be given by:
Ma = f / (g - f)
Thus, for a 50mm lens and a focusing distance of 0.45m, we would have the following results:
r = sqrt ( (450² / 4) - 50 * 450) = 167.7 g = (450 / 2) + 167.7 = 392.7 Ma = 50 / ( 392.7 - 50 ) = 0.145
Therefore, we have managed to get quite close to the magnification value obtained in the previous point.
Calculating the magnification of an extension tube for macro photography
Once the magnification factor of our lens is known, either experimentally or from the focusing distance, we can proceed to calculate how a given extension tube influences that magnification:
For this, we can use the formula:
Ma’ = ( ( Ma * f ) + Tex ) / f
where Ma is the magnification of our lens calculated in the previous point, f the focal length, and Tex the length of the extension tube; in this way, we obtain:
Ma’ = (( 0.145 * 50 ) + 12mm ) / 50 Ma’ = 0.38
Thus, we have approximated quite well the value obtained by the experimental method of the first point.
To shorten these calculations, you can use the online magnification factor calculator
Metadata
In fact, the magnification factor of a lens can be easily deduced from the EXIF metadata of the image, the “Subject Distance” field, which can be located through Photoshop in the unformatted file information or through the exiftools tool. Since in the EXIF we have the focusing distance and the focal length of our lens, the magnification is easy to deduce.
However, if we have used an extension tube or a combination of several, such information cannot be deduced, since the characteristics of our extension tube are not reflected in the EXIF. It will be necessary to calculate them manually and reflect them through some metadata field of our image, in order not to lose the reference to the magnification factor, as any possible dimensional information of the subjects in our image would be lost.
Although it is an elementary concept, it is worth remembering that focusing distance calculations are made from the object to the focal plane of our camera, which is indicated by the symbol that can be seen in the image on the left.
Interpreting the data
The magnification factor simply indicates how many times larger our object is in reality compared to that represented in our image, hence it is usually expressed as 0.15x
Another way to express this value is in the form of a scale factor or ratio such that:
1 / 0.38 = 2.63
Thus, it would be expressed as a scale factor 1: 2.6
