Conversion

Inch Fraction Calculator

Settings
Reset
Share
Save
Embed
Report a bug

Share calculator

Add our free calculator to your website

Please enter a valid URL. Only HTTPS URLs are supported.


Use as default values for the embed calculator what is currently in input fields of the calculator on the page.


Input border focus color, switchbox checked color, select item hover color etc.


Please agree to the Terms of Use.

Preview

Save calculator

Calculator Settings

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Share calculator

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 0.31250.3125 in is far easier to use once it is expressed as 5/165/16 in.

The calculator takes two inputs: the decimal inch value and the precision (the largest denominator you want, such as 1/81/8, 1/161/16, 1/321/32, or 1/641/64). 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 dd (for example d=16d = 16) and a decimal value xx, the total number of fractional units is

n=round(xd)n = \operatorname{round}(x \cdot d)

The whole-inch part and the remaining numerator are then

w=nd,p=nwdw = \left\lfloor \frac{n}{d} \right\rfloor, \qquad p = n - w \cdot d

so the value is wpdw \tfrac{p}{d} inches. The fraction pd\tfrac{p}{d} is reduced by dividing numerator and denominator by their greatest common divisor g=gcd(p,d)g = \gcd(p, d):

pd=p/gd/g\frac{p}{d} = \frac{p / g}{d / g}

The millimeter equivalent comes from the exact definition of the inch:

mm=x25.4\text{mm} = x \cdot 25.4

Worked examples

  • 0.50.5 in at 1/161/16 precision: n=round(0.516)=8n = \operatorname{round}(0.5 \cdot 16) = 8, giving 8/16=1/28/16 = 1/2 in, and 0.525.4=12.70.5 \cdot 25.4 = 12.7 mm.
  • 0.06250.0625 in at 1/161/16 precision: n=1n = 1, giving 1/161/16 in exactly.
  • 0.31250.3125 in at 1/161/16 precision: n=5n = 5, giving 5/165/16 in.
  • 1.251.25 in at 1/161/16 precision: n=20n = 20, so w=1w = 1 and p/d=4/16=1/4p/d = 4/16 = 1/4, giving 1141 \tfrac{1}{4} in and 1.2525.4=31.751.25 \cdot 25.4 = 31.75 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 1/81/8 rounds more aggressively, so the displayed fraction may differ slightly from the exact decimal.
  • Because 25.425.4 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 2.02.0 in), the calculator shows only the whole-inch part and no fraction.

Report a bug

This field is required.