Fraction calculator

Add, subtract, multiply and divide fractions and mixed numbers exactly, simplify to lowest terms, and convert decimals (including repeating) to fractions.

Drafted with AI writing toolsUpdated Checked examples: 9

A fraction (3/4), mixed number (1 1/2), integer or decimal
Try
Result
19/12
Result: 19/12
As a mixed number
1 7/12
Decimal value
1.583333333333
Decimal with repeating block
1.58(3)
Numerator
19
Denominator
12

The sum of 3/4 and 5/6 is 19/12 (1 7/12 as a mixed number), which is 1.58(3) as a decimal.

Fraction bars (one box = 1 whole)

3/45/6= 19/12
How it's calculated S
  1. Least common denominator

    lcm⁡(4,6)=12\operatorname{lcm}(4, 6) = 12
  2. Rewrite over the common denominator

    34=912,56=1012\frac{3}{4} = \frac{9}{12},\qquad \frac{5}{6} = \frac{10}{12}
  3. Add the numerators

    9+1012=1912\frac{9 + 10}{12} = \frac{19}{12}
  4. Simplify

    1912\frac{19}{12}

    Already in lowest terms.

  5. As a mixed number

    1912=1712\frac{19}{12} = 1\tfrac{7}{12}

About the fraction calculator

Fractions are added or subtracted by rewriting both over their least common denominator, the LCM of the two denominators; they are multiplied by multiplying numerators and denominators, and divided by multiplying by the reciprocal of the second fraction. Every result is reduced to lowest terms by dividing top and bottom by their greatest common divisor, and the arithmetic is exact, so 1/3 stays 1/3 rather than 0.333….

Recipes, measurements in inches and homework are the usual reasons to reach for it. The default, 3/4 + 5/6, uses the common denominator 12: 9/12 + 10/12 = 19/12, which is 1 7/12 as a mixed number. Other modes simplify a fraction (84/126 reduces to 2/3 by dividing by 42) and convert decimals to fractions and back.

A fraction in lowest terms has a terminating decimal only when its denominator has no prime factors other than 2 and 5: 19/8 = 2.375, while 1/7 = 0.(142857) repeats every six digits. Brackets mark the repeating block, in the answers and in what you type.

How to write mixed numbers and repeating decimals

Write a mixed number, also called a mixed fraction, with a space between the whole number and the fraction: 2 1/2. Put only the repeating digits of a decimal in brackets: 0.(3) is 1/3, and 0.1(6), which is 0.1666…, is 1/6.

  • A minus sign covers the whole mixed number. -1 3/4 means −(1 + 3/4) = −7/4, not −1 + 3/4 = −1/4.
  • Bars and dots become brackets. Textbooks often mark the repeating block with a bar or dots above it; in brackets, 1/7 is 0.(142857).
  • Terminating decimals are exact. 2.375 is exactly 2375/1000, which reduces to 19/8, or 2 3/8.
  • Irrational numbers have no exact fraction. π and √2 never terminate or repeat, so a fraction such as 22/7 only approximates π.

How to add, subtract, multiply and divide fractions

Add or subtract fractions over a common denominator: 1/4 + 2/3 = 3/12 + 8/12 = 11/12. Multiply straight across: 2/3 × 3/4 = 6/12 = 1/2. To divide, multiply by the reciprocal of the second fraction: 3/4 ÷ 1/8 = 3/4 × 8/1 = 6. Finally, simplify by dividing top and bottom by their greatest common divisor.

The four rules in symbols, for fractions a/b and c/d:

  • Add or subtract: a/b + c/d = (ad + bc)/bd. Using the least common denominator instead of bd keeps the numbers smaller.
  • Multiply: a/b × c/d = ac/bd.
  • Divide: a/b ÷ c/d = a/b × d/c = ad/bc, which needs c ≠ 0.

Adding fractions with different denominators

Fractions can only be combined once they count the same size of piece. Work through 5/12 + 7/18:

  1. Find the least common denominator, the LCM of 12 and 18. Count up in multiples of the larger denominator until one divides by the smaller: 18, 36. Since 36 ÷ 12 = 3, the LCD is 36.
  2. Scale each fraction up to it: 5/12 = 15/36 (top and bottom × 3) and 7/18 = 14/36 (× 2).
  3. Add the numerators and keep the denominator: 15/36 + 14/36 = 29/36.
  4. Simplify. The GCD of 29 and 36 is 1, so 29/36 is already in lowest terms.

Two other routes reach the same LCD of 36: divide the product of the denominators by their GCD (12 × 18 ÷ 6), or take each prime factor at its highest power (2² × 3 and 2 × 3² give 2² × 3²).

The GCD and LCM calculator finds both values for larger denominators.

Mixed numbers add one decision. For 3 1/4 − 1 5/6, the quickest route converts both to improper fractions first: 13/4 − 11/6 = 39/12 − 22/12 = 17/12 = 1 5/12.

Keeping the whole numbers apart needs borrowing instead: 3 3/12 − 1 10/12 becomes 2 15/12 − 1 10/12 = 1 5/12.

Multiplying and dividing fractions

Multiplication needs no common denominator. Cancel shared factors diagonally first to keep the numbers small: in 8/15 × 25/32, the 8 and 32 share 8 and the 25 and 15 share 5, which leaves 1/3 × 5/4 = 5/12.

Multiplying straight through gives 200/480, and dividing by the GCD, 40, reaches the same 5/12.

A whole number is a fraction over 1: 3/5 × 7 = 3/5 × 7/1 = 21/5, or 4 1/5. Scaling a recipe by one and a half turns 2/3 cup of flour into 2/3 × 3/2 = 1 cup, and 3/4 teaspoon of salt into 9/8 = 1 1/8 teaspoons.

To divide, flip the divisor and multiply. The reciprocal of 5/13 is 13/5, so dividing by 5/13 means multiplying by 13/5. Convert mixed numbers first: 3/4 ÷ 1 1/2 = 3/4 ÷ 3/2 = 3/4 × 2/3 = 1/2.

Reading a division as "how many of these fit into that" is a quick check: 2 1/2 ÷ 1 1/4 = 5/2 × 4/5 = 2, and two pieces of 1 1/4 do make 2 1/2.

How to simplify a fraction

A fraction is in lowest terms when its numerator and denominator share no factor above 1. Dividing both by their greatest common divisor gets there in one step.

For large numbers, Euclid's algorithm (Elements, Book VII, Proposition 2) finds the GCD by repeated division. To simplify 462/1071:

  1. 1071 = 2 × 462 + 147
  2. 462 = 3 × 147 + 21
  3. 147 = 7 × 21 + 0

The last nonzero remainder, 21, is the GCD, so 462/1071 = 22/51. Canceling small primes in turn also works here, by 3 (154/357) and then by 7, but only because both numbers happen to have small factors.

Mixed numbers and improper fractions

A proper fraction has a numerator smaller than its denominator (3/8). An improper fraction does not (47/6), and a mixed number writes it as a whole number plus a proper fraction (7 5/6).

To turn an improper fraction into a mixed number, divide with remainder: 47 ÷ 6 = 7 remainder 5, so 47/6 = 7 5/6. To go back, multiply the whole number by the denominator and add the numerator: (7 × 6 + 5)/6 = 47/6.

How to convert a decimal to a fraction

A terminating decimal is a fraction over a power of ten. Write the digits over 10, 100 or 1,000 and simplify: 0.375 = 375/1000 = 3/8, and 13.5 = 135/10 = 27/2, or 13 1/2.

A repeating decimal takes one subtraction. For x = 0.666…, 10x = 6.666…, so 10x − x = 6, which gives 9x = 6 and x = 2/3.

Fraction to decimal chart

Inch measurements in halves, quarters, eighths and sixteenths all end within four decimal places. A fraction in lowest terms whose denominator is 2^a × 5^b ends after the larger of a and b places.

So 3/16, with 16 = 2⁴, needs four places (0.1875), and 7/40, with 40 = 2³ × 5, needs three (0.175).

FractionDecimalFractionDecimal
1/160.06259/160.5625
1/80.1255/80.625
3/160.187511/160.6875
1/40.253/40.75
5/160.312513/160.8125
3/80.3757/80.875
7/160.437515/160.9375
1/20.5

Denominators with any other prime factor give a decimal that repeats forever. Brackets mark the repeating block: 0.(09) means 0.090909….

FractionDecimalDigits in the repeating block
1/30.(3)1
2/30.(6)1
1/60.1(6)1
5/60.8(3)1
1/90.(1)1
1/110.(09)2
1/120.08(3)1
1/130.(076923)6
1/170.(0588235294117647)16

Common fraction mistakes

  • Adding across. 1/2 + 1/3 is not 2/5. Over the common denominator 6 it is 3/6 + 2/6 = 5/6. A sum of two positive fractions is larger than each of them, and 2/5 is smaller than 1/2.
  • Canceling terms instead of factors. In (2 + 3)/2 the 2s cannot be struck out to leave 3; the value is 5/2. Canceling works only on numbers that multiply the whole numerator and the whole denominator.
  • Flipping the wrong fraction. In a division, only the divisor, the second fraction, is inverted.
  • Comparing by the denominator alone. To compare 5/8 and 3/5, cross-multiply: 5 × 5 = 25 against 3 × 8 = 24, so 5/8 is larger, by exactly 1/40.
  • Typing a rounded decimal. 0.33 is exactly 33/100, not one third. For one third, use 1/3 or the repeating form 0.(3).

To express a fraction as a share of 100, the percentage calculator takes the numerator as the part and the denominator as the whole.

Fractions that compare two quantities, such as 3 parts sand to 1 part cement, are often easier to scale with the ratio calculator.

Worked examples

3/4 + 5/6

I want to
Calculate with two fractions
First fraction
3/4
Operation
+
Second fraction
5/6
Result
19/12
As a mixed number
1 7/12
Decimal with repeating block
1.58(3)
Decimal value
1.583333333333

Checked against: 19/12 = 1.58333… by hand

Mixed numbers 1 1/2 × 2 2/3

I want to
Calculate with two fractions
First fraction
1 1/2
Operation
×
Second fraction
2 2/3
Result
4
Numerator
4
Denominator
1

Checked against: Independent calculation

Negative result −3/8 − 5/12

I want to
Calculate with two fractions
First fraction
-3/8
Operation
−
Second fraction
5/12
Result
−19/24
Decimal value
-0.791666666667

Checked against: Independent calculation

2/3 ÷ 4/9

I want to
Calculate with two fractions
First fraction
2/3
Operation
÷
Second fraction
4/9
Result
3/2
As a mixed number
1 1/2

Checked against: Independent calculation

Questions

How do you add fractions with different denominators?

Rewrite both over the least common denominator, then add the numerators. For 3/4 + 5/6 the LCM of 4 and 6 is 12, so 3/4 = 9/12 and 5/6 = 10/12, and the sum is 19/12, or 1 7/12. Multiplying the denominators (4 × 6 = 24) also works but gives 38/24, which then has to be reduced by 2.

How do you divide fractions?

Multiply the first fraction by the reciprocal of the second. 2/3 ÷ 4/9 = 2/3 × 9/4 = 18/12, which reduces to 3/2, or 1 1/2. Dividing by a fraction smaller than 1 makes the result larger, which is why the answer exceeds 2/3. Dividing by zero, whether written 0 or 0/5, has no answer.

How do you simplify a fraction to lowest terms?

Divide the numerator and denominator by their greatest common divisor. For 84/126 the GCD is 42, so 84/126 = 2/3. A fraction is in lowest terms when that GCD is 1, as with 19/12. Cancelling common factors one at a time (2, then 3, then 7) reaches the same answer in more steps.

How do you convert a repeating decimal to a fraction?

Multiply by powers of 10 that line up the repeating block, then subtract. For x = 0.1666…, written 0.1(6), 100x − 10x = 16.666… − 1.666… = 15, so 90x = 15 and x = 1/6. A block of six repeating digits, as in 0.(142857), goes over 999999, and 142857/999999 reduces to 1/7.

How do you turn a mixed number into an improper fraction?

Multiply the whole number by the denominator, add the numerator, and keep the denominator. 2 2/3 becomes (2 × 3 + 2)/3 = 8/3, and 1 1/2 becomes 3/2. Converting both first is how mixed numbers are multiplied: 1 1/2 × 2 2/3 = 3/2 × 8/3 = 24/6 = 4.

About this calculator

ab±cd=a⋅Lb±c⋅LdL, L=lcm⁡(b,d)ab÷cd=ab×dc\begin{gathered} \frac{a}{b} \pm \frac{c}{d} = \frac{a\cdot\frac{L}{b} \pm c\cdot\frac{L}{d}}{L},\ L = \operatorname{lcm}(b, d) \\[10pt] \frac{a}{b} \div \frac{c}{d} = \frac{a}{b} \times \frac{d}{c} \end{gathered}

Sources

  1. Khan Academy — Fractions (arithmetic)
  2. Python fractions module — exact rational arithmetic

Checked against references

This calculator includes 9 worked examples with independently sourced answers. They run in the test suite, and you can run them here too.

Put this calculator on your site

Paste this where you want the calculator to appear. It is free to use, it stays in step with corrections made here, and the credit line below it links back so your readers can find the full version.

Height
Preview the embed

Keep the credit line. It is the only condition, and it is what keeps these calculators free.