Mathematics & Statistics

Fractions Calculator

Add, subtract, multiply and divide fractions and mixed numbers; simplify; decimal to exact fraction.

Inputs

Calculate from

For a mixed number such as 1 ½. Leave empty for a plain fraction.

Result

Result (simplest form)
9/4
Mixed number
2 1/4
Decimal value
2.25
Exact decimal (repeating digits in brackets)
2.25
Working
3/2 + 3/4 (as improper fractions) a/b + c/d = (ad + bc) / bd = 9/4 in lowest terms

The result is 9/4 (2 1/4 as a mixed number), which is 2.25 as a decimal.

Educational estimate — check the assumptions below.

About this calculator

Fraction arithmetic done exactly — with whole numbers only, so there is no rounding at all. Enter plain fractions (3/4) or mixed numbers (1 ½), add, subtract, multiply or divide them, and get the answer in lowest terms, as a mixed number and as an exact decimal with any repeating digits marked. You can also simplify one fraction, or turn a decimal — including a repeating decimal such as 0.1666… — into an exact fraction.

For inch fractions and millimetres, use the Inch Fraction ↔ Decimal ↔ mm Converter.

Formula

Two fractions (+ − × ÷)

a/b ± c/d = (ad ± bc) / bd    a/b × c/d = ac / bd    a/b ÷ c/d = ad / bc

A mixed number w n/d is first written as (w·d + n)/d. The result is reduced by the greatest common divisor (Euclid’s algorithm).

Simplify one fraction

n/d = (n ÷ g) / (d ÷ g),   g = gcd(n, d)

Decimal → fraction

0.N(R) = ( NR − N ) ÷ ( 10k × (10r − 1) )

N is the non-repeating part with k digits and R the repeating part with r digits. A terminating decimal is simply its digits over a power of 10. The closest fraction within a denominator limit is found with continued fractions (best rational approximation).

Worked example

  • 1 ½ + ¾ = 3/2 + 3/4 = (3·4 + 3·2) / 8 = 18/8 = 9/4 = 2 ¼ = 2.25
  • Simplify 1 ½ → 3/2
  • 0.1(6) = (16 − 1) ÷ (10 × 9) = 15/90 = 1/6; 0.(3) = 3/9 = 1/3
  • 7/12 = 0.58(3)

Assumptions and limitations

  • Whole numbers, numerators and denominators must be integers up to 10¹² in size; the arithmetic is exact (BigInt), so results are never rounded.
  • A minus sign goes on the whole number (for mixed numbers) or on the numerator; denominators must be positive.
  • The exact decimal shows up to 60 digits after the point; a longer repeating part is cut off with “…”. The decimal value is rounded to 12 significant figures.

References

  • Euclid’s algorithm for the greatest common divisor.
  • Khinchin, A. Ya. Continued Fractions — best rational approximations.