Fraction Calculator
Add, subtract, multiply and divide fractions, with the working shown.
The first box is for the whole part of a mixed number such as 1 1/2. Leave it empty for a plain fraction.
1 1/2 + 2/3 =
13/6
- Mixed number
- 2 1/6
- Decimal
- ≈ 2.16666667
- Exactly 2.1(6): the digits in brackets repeat
Working
- 1.
Write every number as a fraction
1 1/2 = 3/2
- 2.
Bring both to the common denominator 6
3/2 = 9/6 and 2/3 = 4/6
- 3.
Add the numerators
9/6 + 4/6 = 13/6
- 4.
Simplify
13 and 6 share no factor, so 13/6 is in lowest terms
- 5.
Take out the whole part
13 ÷ 6 = 2 remainder 1, so 13/6 = 2 1/6
Between decimals and fractions
For digits that repeat, write 0.(3), or end with dots: 0.333...
3/8
The digits that repeat are put in brackets.
0.(142857)
The block of 6 digits in brackets repeats for ever.
The four rules
Adding. Fractions can only be added when they count the same kind of part, so both are first rewritten with the same denominator. The calculator uses the least common denominator, the smallest number that both denominators divide into. For 1/4 + 1/6 that is 12: 1/4 = 3/12 and 1/6 = 2/12, which add up to 5/12. Multiplying the two denominators works as well, but leaves more to tidy up afterwards: 6/24 + 4/24 = 10/24, which still has to be brought down to 5/12.
Subtracting goes the same way, with the numerators subtracted: 3/4 − 1/6 = 9/12 − 2/12 = 7/12.
Multiplying needs no common denominator. Multiply the numerators, multiply the denominators: 2/3 × 3/4 = 6/12 = 1/2.
Dividing is multiplying by the second fraction turned upside down: 3/4 ÷ 2/5 = 3/4 × 5/2 = 15/8, or 1 7/8.
A mixed number is turned into a single fraction before any of this: 1 1/2 is (1 × 2 + 1)/2 = 3/2. A minus sign in front of a mixed number covers all of it, so −1 1/2 is −3/2 and not −1 + 1/2.
How simplifying works
A fraction is in lowest terms when no number other than 1 divides both the top and the bottom. To get there, divide both by their greatest common divisor. For 84/126 that is 42, which gives 2/3.
The divisor is found with Euclid's algorithm: divide the larger number by the smaller, keep the remainder, and repeat with the smaller number and that remainder until nothing is left over. 126 ÷ 84 leaves 42, and 84 ÷ 42 leaves 0, so the answer is 42. The GCD and LCM calculator shows those steps for any pair of numbers.
Fractions as decimals
A fraction in lowest terms has a decimal that ends only if its denominator is built from the factors 2 and 5 alone: 3/8 = 0.375 and 7/20 = 0.35. With any other denominator the digits repeat. The repeating block is written in brackets:
| Fraction | Decimal |
|---|---|
| 1/3 | 0.(3) |
| 5/6 | 0.8(3) |
| 1/7 | 0.(142857) |
| 22/7 | 3.(142857) |
The block of a fraction with denominator d is never longer than d − 1 digits. That can still be a lot: 1/97 repeats after 96 digits. The converter shows up to 1,000 digits.
Decimals as fractions
A decimal that ends is a fraction over a power of ten: 0.375 = 375/1000 = 3/8.
A repeating decimal is a fraction too. Write the repeating block in brackets, as in 0.(3) or 0.1(6), and the answer is exact. The rule behind it: a block of k digits is that block divided by k nines, so 0.(142857) = 142857/999999 = 1/7.
If you type dots after the digits, as in 0.333..., the calculator has to guess what follows. It picks the fraction with the smallest denominator whose decimal starts with those digits, here 1/3. For 3.14159... that gives 355/113, which shows the limit of the method: it cannot know that you meant π, which is not a fraction at all.
A decimal without dots is taken at face value, so 0.67 is 67/100. When a much simpler fraction rounds to the same digits, it is mentioned underneath: 2/3 in this case.
Exactness
The fractions are worked out with whole numbers of unlimited length, so nothing is rounded along the way, however long the numerators get. Only the decimal shown next to a result is rounded, to eight places.