FreeToGenerate.com

100% free · no sign-up · everything in your browser

Whole numbers, fractions and mixed numbers: 5, 3/4, 1 1/2, -2 3/8.

Result
19/12
Mixed number
1 7/12
Exact decimal
1.58(3)
Repeating digits
1

The digits in brackets repeat forever.

Also available in: Español · Português · Français · العربية

Fraction calculator

Add, subtract, multiply and divide fractions and mixed numbers — and get the decimal exactly, with its repeating cycle shown rather than cut off.

What is a fraction calculator?

A fraction calculator does arithmetic on numbers written as one whole over another, rather than as decimals. Add 3/4 and 5/6 and the answer is 19/12 — a single exact value, which as a mixed number is 1 7/12. Nothing is approximated at any point, because a fraction is already the exact answer to the division it describes.

Working in fractions rather than decimals matters whenever the result has to stay exact: recipe scaling, timber and fabric measurements in inches, gear and pulley ratios, music note lengths, and every school exercise that asks for a fraction in lowest terms. It also matters because most fractions simply cannot be written as a decimal at all without an infinite tail.

This calculator takes whole numbers, fractions and mixed numbers in the same box — 5, 3/4, 1 1/2 and -2 3/8 all parse — reduces the answer to lowest terms, and shows the decimal in full.

How to use the fraction calculator

  1. Type the two values. Write a fraction as 3/4, a mixed number as 1 1/2 with a space, and a whole number on its own. Negatives work, and a negative mixed number negates the whole quantity: -2 3/8 means -19/8, not -13/8.
  2. Pick the operation. Add, subtract, multiply or divide. Results update as you type, with no button to press. Dividing by zero says so rather than showing a placeholder.
  3. Read the answer three ways. You get the fraction in lowest terms, the same value as a mixed number, and the exact decimal — with any repeating digits shown in brackets. A count of the repeating digits sits alongside, so 0 means the decimal genuinely ends.

The decimal every other calculator gets wrong

Fraction calculators all show a decimal next to the answer, and they truncate it. 1/7 becomes 0.142857143. That number is not 1/7 — read it back as a fraction and it is 142857143/1000000000, a different number that merely starts with the same digits. It is the one genuinely wrong figure these tools display.

It is also the ordinary case rather than an edge case. A fraction in lowest terms has a decimal that ends only when its denominator's sole prime factors are 2 and 5, since 10 is 2 times 5 — and those denominators thin out fast. Of the first 100 denominators, 15 give a terminating decimal. Of the first 1,000, only 29. Of the first 10,000, just 48, which is 0.48%. Almost every fraction you can write repeats forever.

So this page computes the expansion instead of rounding it: long division, carried on until a remainder recurs, which it must within as many steps as the denominator. The digits before the cycle are printed plainly and the cycle goes in brackets, so 19/12 shows as 1.58(3) and 22/7 as 3.(142857). The bracket is the whole difference between a decimal that is the fraction and a decimal that is near it.

Cycles get long. The period of 1/p for a full-reptend prime p is exactly p minus one, so 1/97 repeats with 96 digits and 1/983 with 982. The tool computes those in full; past a few thousand digits it stops and marks the result with an ellipsis rather than pretending it finished.

Honest limitations

The usual warning about floating point is overstated, and it is worth being precise instead. Over 20,000 random single operations on fractions with denominators under 100, doing the arithmetic in ordinary floating point and reading the result back recovers the exact answer every single time — zero failures. One sum, one product, one quotient: a decimal calculator will not let you down.

The damage is in accumulation. Chain five operations and 49.32% of results no longer recover the exact value; chain twenty and it is 100%. And the simplest round trip there is, dividing one by a number and multiplying it back, does not return exactly 1 for 1,178 of the 9,998 denominators from 2 to 9,999 — about one in eight. Exact arithmetic here is not defending against a broken single sum; it is defending against chains, against comparisons that should be equal and are not, and above all it is what makes the repeating cycle computable at all. You cannot recover a cycle from a number that has already been rounded.

What the tool does not do: it takes two values at a time rather than a whole expression, so there is no operator precedence to get wrong; it does not accept a decimal as input, since 0.333333 is genuinely ambiguous between a terminating decimal and a rounded third; and it has no opinion on how you should round the answer, because it never rounds it.

The expansion is checked against two facts it does not itself use: for a denominator of the form 2^a × 5^b × rest, the digits before the cycle number exactly max(a, b), and the cycle length is exactly the multiplicative order of 10 modulo rest. Both are computed independently, over several thousand fractions, together with a full reconstruction that reads each printed expansion back and requires the original value. Sixty-seven assertions in all.

Why is it free?

It is arithmetic on two numbers, and it runs in your browser as you type. Nothing is sent anywhere, there is no account, and there is no limit on how many sums you do.

The exact decimal is not held back for a paid tier either — it is the reason the page exists.