Fraction calculator

Work out fractions and mixed numbers and see each step: the common denominator, the simplifying and the decimal. It also simplifies a fraction, turns a decimal into a fraction and compares two fractions.

Type fractions like 3/4, mixed numbers like 1 1/2 (whole number, space, fraction), whole numbers or decimals.

How each operation works

  • Adding and subtracting need the same bottom number (denominator). The calculator uses the least common denominator, the smallest number both denominators divide into, rewrites each fraction over it, then adds or subtracts the top numbers (numerators).
  • Multiplying: multiply the tops together and the bottoms together. No common denominator needed.
  • Dividing: flip the second fraction upside down (its reciprocal) and multiply.
  • Simplifying: divide the top and bottom by their greatest common divisor (GCD), the largest number that divides both. The calculator finds it with Euclid's algorithm and shows each line.
  • Mixed numbers such as 2 3/4 are turned into improper fractions first: 2 × 4 + 3 = 11, so 2 3/4 = 11/4. Answers bigger than 1 are shown both ways.

Worked examples

  • 1 1/2 + 2 3/4: write them as 3/2 and 11/4. The least common denominator of 2 and 4 is 4, and 3/2 = 6/4. Then 6/4 + 11/4 = 17/4 = 4 1/4 = 4.25.
  • 5/6 − 1/4: the least common denominator of 6 and 4 is 12. 5/6 = 10/12 and 1/4 = 3/12, so the answer is 10/12 − 3/12 = 7/12 = 0.58333…, where the 3 repeats forever.
  • 2/3 × 9/10: (2 × 9)/(3 × 10) = 18/30. The GCD of 18 and 30 is 6, so 18/30 = 3/5 = 0.6.
  • 3/4 ÷ 1/8: flip 1/8 to 8/1 and multiply: (3 × 8)/(4 × 1) = 24/4 = 6. There are six eighths in three quarters.
  • Simplify 84/126: Euclid's algorithm gives 126 = 1 × 84 + 42, then 84 = 2 × 42 + 0, so the GCD is 42. 84 ÷ 42 = 2 and 126 ÷ 42 = 3: 2/3.
  • 0.375 as a fraction: three decimal places, so 375/1000. The GCD is 125, giving 3/8.
  • 0.1666… as a fraction (type 0.1(6)): (16 − 1)/90 = 15/90 = 1/6.
  • Which is bigger, 5/8 or 3/5? Cross-multiply: 5 × 5 = 25 and 3 × 8 = 24. 25 is bigger, so 5/8 > 3/5, by 1/40.

Repeating decimals

Every fraction is either a decimal that stops (3/8 = 0.375) or one that repeats a block of digits forever (1/7 = 0.142857142857…). A fraction in simplest form stops only when its denominator has no prime factors other than 2 and 5. The calculator writes the repeating block in brackets, so 7/12 is shown as 0.58(3), and finds blocks up to 120 digits long. For longer ones it gives the decimal rounded to 10 places.

To turn a repeating decimal back into a fraction, type it the same way. 0.(3) is 3/9 = 1/3, and 2.(142857) is 15/7.

Exact answers, even for big numbers

Most calculators and spreadsheets store numbers in a format that rounds whole numbers above 9,007,199,254,740,992 (253). This calculator works only with whole numbers of any size (JavaScript BigInt), so 1/9007199254740993 + 1/9007199254740993 comes out as exactly 2/9007199254740993. The only rounding is in the "≈" decimal, which is labelled.

FAQ

How do I type a mixed number?

Type the whole number, a space, then the fraction: 2 3/4. For a negative mixed number put the minus sign in front: -2 3/4 means −(2 + 3/4).

What is the least common denominator?

The smallest number that both denominators divide into evenly. For 6 and 4 it is 12. Using it keeps the numbers small, but any common denominator gives the same answer after simplifying.

How do I simplify a fraction?

Divide the top and the bottom by their greatest common divisor. For 84/126 the GCD is 42, so the fraction simplifies to 2/3. A fraction is in simplest form when the top and bottom share no factor except 1.

How do I divide fractions?

Flip the second fraction and multiply. 3/4 ÷ 1/8 = 3/4 × 8/1 = 24/4 = 6.

Can I use decimals?

Yes. A decimal such as 0.75 is turned into the exact fraction 3/4 before the calculation. For a repeating decimal, put the repeating digits in brackets: 0.(3) is 1/3.

Is anything I type stored?

No. Everything is worked out in your browser and nothing is saved.