Fraction calculator
Exact arithmetic, in lowest terms, with the rounding labelled.
Write 3/4, 1 1/2,-5 or 0.75 — a decimal is read as the exact fraction its digits describe.
- Result5/6
- As a mixed number5/6
- As a decimal0.833333333333approx.
A third times three is exactly one
That sounds like it should go without saying. It doesn’t: a fraction calculator built the obvious way converts 1/3 to0.3333333333333333, multiplies, and reports0.9999999999999998. The rounding happens at the first step and every step after inherits it — on precisely the inputs a fraction calculator exists to handle.
Here the numerator and denominator are held as arbitrary-precision integers and nothing touches a floating-point number until a decimal is displayed. The same reasoning as thenumber base converter, and the same conclusion.
Which decimals are the whole story
A fraction has a terminating decimal exactly when the only primes dividing its denominator are 2 and 5 — the primes of base ten. So 3/4 is exactly 0.75 and 1/20 is exactly 0.05, while1/3 and 1/6 never finish. This page tests that directly rather than guessing from the length of the output, and marks the ones that don’t terminate approx. — the same label the number base converter uses for the same reason.
Typing a decimal works too, and it is read as the exact fraction its digits describe:0.75 becomes 3/4, not the nearest double to three quarters.