What is an inch fraction calculator?
An inch fraction calculator converts a measurement written as a decimal number of inches into the nearest fractional inch — the form used on a tape measure or ruler — and, at the same time, into millimeters. Imperial rulers are divided into halves, quarters, eighths, sixteenths, and finer marks, so a decimal reading such as in is far easier to use once it is expressed as in.
The calculator takes two inputs: the decimal inch value and the precision (the largest denominator you want, such as , , , or ). It rounds to the closest mark at that precision, reduces the fraction to lowest terms, separates any whole-inch part, and shows the equivalent length in millimeters.
How does the calculator work?
First the decimal value is rounded to the nearest multiple of the chosen fractional step. With a denominator (for example ) and a decimal value , the total number of fractional units is
The whole-inch part and the remaining numerator are then
so the value is inches. The fraction is reduced by dividing numerator and denominator by their greatest common divisor :
The millimeter equivalent comes from the exact definition of the inch:
Worked examples
- in at precision: , giving in, and mm.
- in at precision: , giving in exactly.
- in at precision: , giving in.
- in at precision: , so and , giving in and mm.
Practical notes
- Choosing a finer precision (a larger denominator) gives a closer fraction but a less convenient one to read on a ruler. A coarser precision such as rounds more aggressively, so the displayed fraction may differ slightly from the exact decimal.
- Because mm per inch is an exact definition, the millimeter output is exact for the decimal you enter, independent of the fraction precision you pick.
- When the rounded fraction reduces to a whole number (for example in), the calculator shows only the whole-inch part and no fraction.