acalculator

How do I calculate with fractions?

Type two fractions and pick an operation. The answer comes in lowest terms, with the steps that get there.

Your numbers

Type 3/4 for three quarters, or 1 1/2 for one and a half.
Operation
Answer
5/6

1/2 + 1/3 = 5/6.

As a mixed number
5/6
As a decimal
0.833333
Working
1/2 + 1/3 = 3/6 + 2/6 = 5/6
Problem
1/2 + 1/3

Answer: 5/6. 1/2 + 1/3 = 5/6.

How to calculate

Adds, subtracts, multiplies, or divides two fractions exactly, and shows the answer in lowest terms, as a mixed number, as a decimal, and step by step.

Example with the default inputs (First fraction 1/2, Operation +, Second fraction 1/3): 1/2 + 1/3 = 5/6.

Method: a/b + c/d = (a × (L ÷ b) + c × (L ÷ d))/L with L the least common denominator; a/b × c/d = ac/bd; a/b ÷ c/d = a/b × d/c; then reduce by the greatest common factor.

  • All arithmetic is exact, with whole-number numerators and denominators of any size.
  • A mixed number such as 1 1/2 means 1 + 1/2; a minus sign applies to the whole number: −1 1/2 = −3/2.
  • Each fraction is put in lowest terms before the working is shown.
  • Dividing by 0 has no answer.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. First fraction 1/2, Operation +, Second fraction 1/3 gives Answer 5/6, As a mixed number 5/6, As a decimal 0.833333, Working 1/2 + 1/3 = 3/6 + 2/6 = 5/6.Source: hand calculation in content.mdx: 3/6 + 2/6 = 5/6; Python 3: fractions.Fraction(1, 2) + Fraction(1, 3) = 5/6
  2. First fraction 3/4, Operation −, Second fraction 5/6 gives Answer -1/12, As a decimal -0.083333, Working 3/4 − 5/6 = 9/12 − 10/12 = -1/12.Source: hand calculation in content.mdx: 9/12 − 10/12 = −1/12
  3. First fraction 2/3, Operation ×, Second fraction 9/4 gives Answer 3/2, As a mixed number 1 1/2, As a decimal 1.5, Working 2/3 × 9/4 = (2 × 9)/(3 × 4) = 18/12 = 3/2.Source: hand calculation in content.mdx: 18/12 = 3/2 = 1 1/2
  4. First fraction 5/8, Operation ÷, Second fraction 3/4 gives Answer 5/6, Working 5/8 ÷ 3/4 = 5/8 × 4/3 = 20/24 = 5/6.Source: hand calculation in content.mdx: 5/8 × 4/3 = 20/24 = 5/6
  5. First fraction 1 1/2, Operation +, Second fraction 2 2/3 gives Answer 25/6, As a mixed number 4 1/6, As a decimal 4.166667.Source: hand calculation in content.mdx: 3/2 + 8/3 = 9/6 + 16/6 = 25/6 = 4 1/6
  6. First fraction 7/10, Operation ÷, Second fraction -2/5 gives Answer -7/4, As a mixed number -1 3/4, Working 7/10 ÷ (-2/5) = 7/10 × (-5/2) = -35/20 = -7/4.Source: hand calculation in content.mdx: 7/10 × (−5/2) = −35/20 = −7/4

How it works

Each number you type (a fraction, a mixed number, or a whole number) is turned into an exact fraction in lowest terms: 1 1/2 becomes 3/2, and 4/2 becomes 2. The working starts from these reduced fractions. Then, for fractions a/b and c/d:

  • Add or subtract: find the least common denominator L, the least common multiple of b and d. Rewrite a/b as (a × L ÷ b)/L and c/d as (c × L ÷ d)/L, then add or subtract the numerators over L.
  • Multiply: a/b × c/d = (a × c)/(b × d).
  • Divide: a/b ÷ c/d = a/b × d/c, the first fraction times the reciprocal of the second. c must not be 0.

Last, the result is reduced to lowest terms: the numerator and the denominator are divided by their greatest common factor, and the denominator is made positive.

The calculator shows:

  • Answer: the result as one fraction in lowest terms (an improper fraction when it is more than 1, such as 25/6), or a whole number.
  • As a mixed number: the whole-number part and a proper fraction, such as 4 1/6. A negative answer is written with the minus sign in front: −1 3/4 means −(1 + 3/4).
  • As a decimal: the value of the answer, to 6 decimal places on screen.
  • The answer sentence and the Problem row write the two fractions as the working does: in lowest terms, as improper fractions (9/4, not 2 1/4), with a negative second fraction in brackets. For example: 2/3 × 9/4 = 3/2, −1/2 ÷ (−3/8) = 4/3, and 7/8 + (−5/4) = −3/8 (written with a plain hyphen on the page).
  • Working: each step from the two fractions to the answer. A step is left out when it would repeat the one before (for example when the fraction is already in lowest terms).

Assumptions

  • The arithmetic is exact: numerators and denominators are whole numbers of any size, with no rounding.
  • A mixed number such as 1 1/2 means 1 + 1/2. A minus sign applies to the whole mixed number: −1 1/2 = −3/2.
  • Dividing by 0 has no answer.

Worked examples by hand

1/2 + 1/3. The least common denominator of 2 and 3 is 6. 1/2 = 3/6 and 1/3 = 2/6, so the sum is 5/6, which is 0.833333 as a decimal.

3/4 − 5/6. The least common denominator of 4 and 6 is 12. 3/4 = 9/12 and 5/6 = 10/12, so the difference is −1/12 (−0.083333).

2/3 × 9/4. (2 × 9)/(3 × 4) = 18/12. The greatest common factor of 18 and 12 is 6, so the answer is 3/2, or 1 1/2 (1.5).

5/8 ÷ 3/4. Flip 3/4 to 4/3 and multiply: 5/8 × 4/3 = 20/24, which reduces by 4 to 5/6.

1 1/2 + 2 2/3. 1 1/2 = 3/2 and 2 2/3 = 8/3. Over 6: 9/6 + 16/6 = 25/6, which is 4 1/6 (4.166667).

7/10 ÷ (−2/5). 7/10 × (−5/2) = −35/20, which reduces by 5 to −7/4, or −1 3/4.

Other questions people ask

How do I add fractions with different denominators?

Rewrite both fractions over a common denominator, add the numerators, and simplify. For 1/2 + 1/3, the least common denominator is 6: 1/2 = 3/6 and 1/3 = 2/6, so the sum is 5/6.

How do I multiply fractions?

Multiply the numerators together and the denominators together, then simplify. 2/3 × 9/4 = 18/12, and dividing the top and bottom by 6 gives 3/2, or 1 1/2.

How do I divide fractions?

Multiply the first fraction by the reciprocal of the second (flip it upside down). 5/8 ÷ 3/4 = 5/8 × 4/3 = 20/24 = 5/6.

How do I simplify a fraction?

Divide the numerator and the denominator by their greatest common factor. 18/12 has a greatest common factor of 6, so it simplifies to 3/2. A fraction is in lowest terms when the only common factor of the top and bottom is 1.

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

Divide the numerator by the denominator. The whole-number part of the answer is the whole number, and the remainder goes over the denominator. 25/6 is 4 remainder 1, so 25/6 = 4 1/6.

Can I use mixed numbers or whole numbers?

Yes. Type 1 1/2 for one and a half, or 3 for three. The calculator turns each into an exact fraction in lowest terms first (1 1/2 = 3/2, 4/2 = 2), so there is no rounding in the answer. For a decimal, write it as a fraction: 0.25 is 25/100, which is 1/4.

How do I turn a fraction into a decimal?

Divide the numerator by the denominator. 5/6 = 5 ÷ 6 = 0.8333…, a repeating decimal. The calculator shows the decimal next to the fraction.