# How do I calculate with fractions?

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.

- Page: https://www.acalculator.org/math/fraction-calculator
- JSON spec: https://www.acalculator.org/math/fraction-calculator.json
- Version: 08716e745067

## Default answer

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

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| a | First fraction | A fraction, mixed number, or whole number, such as 1/2, 1 1/2, or 3. |
| op | Operation | Add, subtract, multiply, or divide the first fraction by the second. |
| b | Second fraction | A fraction, mixed number, or whole number, such as 1/3, 2 1/4, or 5. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| result | Answer | The answer as one fraction in lowest terms, such as 5/6 or 7/4. |
| mixed | As a mixed number | The answer as a whole number and a proper fraction, such as 1 3/4. |
| decimal | As a decimal | The answer as a decimal. |
| steps | Working | How the answer is found, from the two fractions to lowest terms. |
| problem | Problem | The two fractions in lowest terms with the operation, written as the working writes them. |

## 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.

## Assumptions

- 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.

## Worked examples

1. a = 1/2, op = +, b = 1/3 gives result = 5/6, mixed = 5/6, decimal = 0.833333, steps = 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. a = 3/4, op = -, b = 5/6 gives result = -1/12, decimal = -0.083333, steps = 3/4 − 5/6 = 9/12 − 10/12 = -1/12. Source: hand calculation in content.mdx: 9/12 − 10/12 = −1/12.
3. a = 2/3, op = *, b = 9/4 gives result = 3/2, mixed = 1 1/2, decimal = 1.5, steps = 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. a = 5/8, op = /, b = 3/4 gives result = 5/6, steps = 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. a = 1 1/2, op = +, b = 2 2/3 gives result = 25/6, mixed = 4 1/6, decimal = 4.166667. Source: hand calculation in content.mdx: 3/2 + 8/3 = 9/6 + 16/6 = 25/6 = 4 1/6.
6. a = 7/10, op = /, b = -2/5 gives result = -7/4, mixed = -1 3/4, steps = 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.

## FAQ

### 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.

## Sources

- OpenStax, Prealgebra 2e, section 4.2 Multiply and Divide Fractions: https://openstax.org/books/prealgebra-2e/pages/4-2-multiply-and-divide-fractions
- OpenStax, Prealgebra 2e, section 4.5 Add and Subtract Fractions with Different Denominators: https://openstax.org/books/prealgebra-2e/pages/4-5-add-and-subtract-fractions-with-different-denominators
