Fraction calculator

Add, subtract, multiply and divide fractions and mixed numbers, with the common denominator, the simplification and the decimal expansion.

How it works

To add or subtract fractions, first give them a common denominator. The smallest one is the least common multiple of the denominators: for $\frac{5}{12} + \frac{7}{18}$ it is $\operatorname{lcm}(12, 18) = 36$, so the sum is $\frac{15}{36} + \frac{14}{36} = \frac{29}{36}$. To multiply, multiply the numerators and the denominators (cancelling common factors across first keeps the numbers small); to divide, multiply by the reciprocal. Every result is brought to lowest terms by dividing numerator and denominator by their gcd.

A mixed number like $2\tfrac{1}{3}$ means $2 + \frac{1}{3} = \frac{7}{3}$. In the expression, type it with a space: 2 1/3. A decimal with $k$ digits after the point is a fraction over $10^k$, so $0.125 = \frac{125}{1000} = \frac{1}{8}$.

The decimal expansion comes from long division. Each step multiplies the remainder by 10 and divides by the denominator; since there are only finitely many possible remainders, one comes back and from then on the digits repeat: $\frac{1}{7} = 0.\overline{142857}$. The expansion stops exactly when the denominator, in lowest terms, has no prime factors other than 2 and 5.

Everything is calculated in your browser. Nothing you type leaves your device.