How to use it
- Type the decimal: 0.75, −2.5, .5, 0.(3), 0.12(45) or 0.3333…
- Read the simplest fraction and, for improper fractions, the mixed number.
- Follow the working: the power-of-ten step (or the 10ⁿx − x subtraction for repeating decimals) and the gcd reduction.
- Use the inch table for the nearest ruler fraction and the denominator table to see how close 1/3, 1/5, 1/12 or 1/100 come.
- Change the denominator limit if you need a simpler approximation of a long decimal, then copy the result or the link.
Example
0.1(6): let x = 0.1(6). The block has 1 digit after 1 fixed digit, so 100x = 16.(6) and 10x = 1.(6). Subtracting, 90x = 16 − 1 = 15, so x = 15/90; gcd(15, 90) = 15 gives 1/6. For 2.625: 2625/1000, gcd 125, = 21/8 = 2 5/8 – and on a 1/8 in ruler that is exact. For 0.3 the exact fraction is 3/10, but the nearest sixteenth is 5/16 = 0.3125 and the nearest 64th is 19/64 = 0.296875.
Method
terminating: 0.d₁d₂…dₖ = d₁d₂…dₖ / 10ᵏ, then divide by gcd
repeating: x = 0.a₁…aₚ(b₁…b_q)
(10^(p+q) − 10^p) · x = a₁…aₚb₁…b_q − a₁…aₚ
x = (a₁…aₚb₁…b_q − a₁…aₚ) / (10^p · (10^q − 1)), then divide by gcd
approximation: best fraction with denominator ≤ N by the Stern–Brocot / continued-fraction search
ruler: nearest n/d = round(x · d) / d for d = 2, 4, 8, 16, 32, 64Numerators and denominators are arbitrary-precision integers, so inputs with dozens of digits convert exactly. The “…” input form needs the repeating block typed at least twice (0.1666… works, 0.16… does not) because the shortest period is detected from the ending digits. Approximations use the decimal value of the input (double precision, about 15 significant digits), which is ample for the denominator limits allowed.
Sources: Wolfram MathWorld – Repeating decimal, Wolfram MathWorld – Stern–Brocot tree.
Questions
- Is 0.999… really equal to 1?
- Yes. With x = 0.(9), 10x − x = 9.(9) − 0.(9) = 9, so x = 1. The calculator returns 1/1 for 0.(9).
- Why does 0.1 convert to 1/10 but my calculator shows 0.1000000000000001?
- This tool reads the digits you type, not a binary floating-point value, so 0.1 is exactly 1/10. The long tail you see elsewhere is the binary approximation of 0.1.
- How do I read 0.3 on a tape measure?
- The nearest sixteenth is 5/16 (0.3125, about 0.0125 in or 0.3 mm over). For finer work the nearest 32nd is 10/32 = 5/16 as well, and the nearest 64th is 19/64 = 0.2969.