Mathematics RU

Solver

Fraction calculator with step-by-step working

Adding, subtracting, multiplying and dividing fractions, mixed numbers, brackets and powers, simplifying, comparing and converting to decimals, with every step explained.

Loading the solver…

How to type a problem

A fraction is written with a slash: $\frac{3}{4}$ is 3/4. A mixed number is the whole part, a space and a fraction: $2\tfrac{1}{3}$ is 2 1/3. Decimals take a point (or a comma, as in many countries), 0.25; a recurring part goes in brackets, 0.1(6) for $0.1\dot{6}$. Multiplication is a dot, an asterisk or a cross; division is ÷ or a colon. Brackets and powers ((2/3)^2) are fine too.

One rule is worth remembering: a slash between two numbers is a single fraction. So the solver reads 1/2 ÷ 3/4 as $\frac12 \div \frac34$, as in an exercise book, and not as “one divided by two, divided by three, divided by four”. Under the input field you can always see how your input was understood, so if something’s off, you’ll notice at once.

Besides calculating, the solver can simplify a fraction (simplify 42/56), turn a decimal into a fraction (0.375, 0.(3)), compare fractions (compare 3/4 and 5/7) and put several fractions in order (order 1/2, 2/3, 3/5).

How to calculate: four rules and the order of operations

Working out any problem with fractions comes down to a few rules. The solver applies them in the same order you would in an exercise book.

  1. Mixed numbers become improper fractions. $2\tfrac13 = \frac{2 \cdot 3 + 1}{3} = \frac73$: two wholes are six thirds, plus one more.
  2. Decimals become ordinary fractions. $0.25 = \frac{25}{100} = \frac14$. With ordinary fractions the answer is exact, with no rounding.
  3. The order of operations: first brackets, then powers, then multiplication and division, and finally addition and subtraction; operations of the same rank go from left to right.
  4. Addition and subtraction go through a common denominator. Multiplication: numerator times numerator, denominator times denominator. Division: multiply by the fraction turned upside down.
  5. Simplify the answer, and if you like, turn an improper fraction back into a mixed number.

Most of the work is in the common denominator. Any common multiple of the denominators will do, but the lowest one, their LCM, is the most convenient: the numbers are smaller, and at the end there’s almost nothing to simplify. The LCM of two denominators is quickly found through their GCD (in British schools, the HCF), and the GCD by Euclid’s algorithm; if you need to compute them separately, there’s the GCD and LCM solver.

Why the rules are what they are

The fraction $\frac{a}{b}$ is $a$ pieces, each of size $\frac1b$. You can only add pieces of the same size: two thirds and one third make three thirds, but “one half plus one third” isn’t an answer yet, it’s a question. So we cut both fractions into smaller pieces, the same for both. Cut a half into three parts and a third into two, and you get sixths: $\frac12 = \frac36$, $\frac13 = \frac26$, and now they can simply be counted.

The common denominator $N = \operatorname{lcm}(b, d)$, the smallest number divisible by both denominators. You can’t go smaller: one of the fractions couldn’t be cut evenly into such pieces. The extra factor for the first fraction, $k_1 = N \div b$: how many parts each of its pieces is cut into. Multiply the numerator and denominator by it, and the fraction doesn’t change. The extra factor for the second fraction, $k_2 = N \div d$: the same for it. Example: $\frac{5}{12} + \frac{7}{18}$. $\operatorname{lcm}(12, 18) = 36$, the factors are $36 \div 12 = 3$ and $36 \div 18 = 2$, so the sum is $\frac{5 \cdot 3 + 7 \cdot 2}{36} = \frac{15 + 14}{36} = \frac{29}{36}$. With the denominator $12 \cdot 18 = 216$ the answer comes out the same, $\frac{174}{216}$, but it still has to be simplified by $6$.

Multiplication has a different picture. Taking $\frac23$ of $\frac34$ means cutting $\frac34$ into three equal parts and taking two of them. In a drawing it’s a rectangle: divide a square into $3$ columns and $4$ rows, then shade $2$ columns and $3$ rows. Their overlap is $2 \cdot 3 = 6$ cells out of $3 \cdot 4 = 12$, that is, $\frac{2 \cdot 3}{3 \cdot 4} = \frac{6}{12} = \frac12$. Hence the rule “numerator times numerator, denominator times denominator”. It’s handy to cancel before multiplying, crosswise: in $\frac23 \cdot \frac34$ the threes cancel at once, leaving $\frac{2}{4} = \frac12$.

The upside-down fraction is the reciprocal: $\frac{c}{d} \cdot \frac{d}{c} = 1$. To divide means to find the number that gives back the dividend when multiplied by the divisor. Multiplying by $\frac{d}{c}$ does exactly that: $\left(\frac{a}{b} \cdot \frac{d}{c}\right) \cdot \frac{c}{d} = \frac{a}{b}$. Example: $\frac56 \div \frac{10}{9} = \frac56 \cdot \frac{9}{10} = \frac{1 \cdot 3}{2 \cdot 2} = \frac34$: the five and the ten cancel by $5$, the six and the nine by $3$. The rule only works if $c \ne 0$: you can’t divide by zero, and $\frac{0}{d}$ can’t be turned upside down.

All this is covered in detail, with strips and pies, in the chapter on fractions. It also explains why division “flips” a fraction if you see it as the question “how many times does the divisor fit into the dividend?”

Worked examples

Example 1. Different denominators

$\frac34 - \frac56$. The denominators are $4$ and $6$, and their LCM is $12$ (not $24$: twelve is already divisible by both). The extra factors: $12 \div 4 = 3$, $12 \div 6 = 2$.

$$\frac34 - \frac56 = \frac{9}{12} - \frac{10}{12} = \frac{9 - 10}{12} = -\frac{1}{12}.$$

The answer is negative, and that’s fine: $\frac56$ is bigger than $\frac34$ by one twelfth. A check by adding: $-\frac1{12} + \frac56 = -\frac1{12} + \frac{10}{12} = \frac9{12} = \frac34$.

Example 2. Mixed numbers

$2\tfrac13 \cdot 1\tfrac12$. First convert to improper fractions: $2\tfrac13 = \frac73$, $1\tfrac12 = \frac32$. You can’t multiply the whole parts and the fractional parts separately (a common mistake; more on it below).

$$\frac73 \cdot \frac32 = \frac{7 \cdot 3}{3 \cdot 2} = \frac72 = 3\tfrac12.$$

The threes cancelled before multiplying. An estimate: the answer should be a little more than $2 \cdot 1.5 = 3$. And so it is.

Example 3. The order of operations

$\left(\frac12 + \frac13\right) \cdot \frac65 - \frac14$. There are three operations: the bracket, the multiplication, the subtraction.

$$\frac12 + \frac13 = \frac36 + \frac26 = \frac56,\qquad \frac56 \cdot \frac65 = 1,\qquad 1 - \frac14 = \frac34.$$

If you subtract $\frac14$ from $\frac65$ first, you get a completely different number: multiplication comes before subtraction.

Example 4. A recurring decimal

$0.1(6) + \frac13$. Convert $0.1(6)$ into an ordinary fraction. Call it $x$ and shift the decimal point so that the same endless tail follows it: $100x = 16.(6)$ and $10x = 1.(6)$. Subtract: $90x = 15$, that is, $x = \frac{15}{90} = \frac16$.

$$\frac16 + \frac13 = \frac16 + \frac26 = \frac36 = \frac12 = 0.5.$$

Fractions and decimals

The solver also shows every answer as a decimal. Sometimes it terminates ($\frac38 = 0.375$), sometimes it goes on forever ($\frac16 = 0.1666\ldots$). Which one you get depends on the denominator of the fraction in lowest terms. If its prime factorisation contains only twos and fives, long division stops; if there are other primes, the digits go round in a cycle. There are only $q$ possible remainders when dividing by $q$, so sooner or later some remainder repeats, and the digits repeat after it.

The repeating block of digits, read as an ordinary number. As many nines as there are digits in the block. This is $10^k - 1$: shift the point by the length of the block and subtract the original number. Example: $0.(142857) = \frac{142857}{999999} = \frac17$. If there are digits before the repeating block, as in $0.1(6)$, add as many zeros after the nines as there are digits before the block, and from the number “up to the end of the block” subtract the number “up to the block”: $\frac{16 - 1}{90}$.

This is also where the famous $0.(9) = \frac99 = 1$ comes from: it isn’t “almost one” but another way of writing one itself.

Common mistakes

  • Adding the denominators. $\frac12 + \frac13 \ne \frac25$, if only because $\frac25$ is less than $\frac12$, and we added something to a half. The denominator is the size of the piece; it doesn’t add up when you add.
  • Finding a common denominator for multiplication. It isn’t wrong, but it’s three times the work. Multiplication and division don’t need a common denominator.
  • Multiplying mixed numbers part by part. $2\tfrac13 \cdot 1\tfrac12 \ne 2 \cdot 1 + \frac13 \cdot \frac12$: by the distributive law, each part would have to be multiplied by each part. It’s safer to convert to improper fractions.
  • Turning the wrong fraction upside down. When dividing, it’s the divisor, the second fraction, that gets flipped.
  • Cancelling terms. In $\frac{2 + 3}{2}$ the twos can’t be cancelled. Only factors cancel: the numerator and the denominator as a whole are divided by the same number.
  • Losing a minus. $\frac34 - \left(-\frac14\right) = \frac34 + \frac14 = 1$: subtracting a negative number means adding.
  • Not simplifying the answer. $\frac{6}{12}$ is right but not finished. The fraction in the answer should be in lowest terms; the solver always shows what it cancelled by.

See also

Where fractions come from, why the decimal form of a fraction always either terminates or recurs, and how the Stern–Brocot tree works, in which every fraction appears exactly once, are in the chapter on fractions. A common denominator is an LCM, and simplifying is dividing by the GCD; both are covered in the chapter on divisibility and the GCD and LCM solver. The prime factorisation solver will break a denominator into primes, and problems about shares and percentages go to the percentage solver.

Where this is explained

Other solvers