Fraction Calculator: How It Works
Fraction arithmetic follows four rules, and only one of them is genuinely awkward: addition, which requires a common denominator. Everything else — multiplication, division, simplification — is more straightforward than the decimal equivalent.
The four operations
| Operation | Rule | Example |
|---|---|---|
| Add / subtract | Common denominator, then combine numerators | ⅔ + ¼ = 8/12 + 3/12 = 11/12 |
| Multiply | Numerators together, denominators together | ⅔ × ¼ = 2/12 = ⅙ |
| Divide | Multiply by the reciprocal | ⅔ ÷ ¼ = ⅔ × 4/1 = 8/3 |
| Simplify | Divide both parts by their GCD | 18/24 → ¾ (GCD 6) |
Finding a common denominator
Any common multiple works; the least common multiple keeps the numbers smallest. Multiplying the denominators together always works and sometimes produces larger numbers than necessary — 1/6 + 1/8 with denominator 48 gives 8/48 + 6/48 = 14/48 = 7/24, while using the LCM of 24 gives 4/24 + 3/24 = 7/24 directly.
Why dividing flips the second fraction
Dividing by a number is multiplying by its reciprocal, and this is not a trick — it follows from what division means. Asking '⅔ ÷ ¼' asks how many quarters fit into two-thirds. Since four quarters fit into one whole, two-thirds contains 4 × ⅔ = 8/3 of them. The flip is the arithmetic expressing that question.
Mixed numbers
To convert 3¾ to an improper fraction: (3 × 4) + 3 = 15, so 15/4. To go back, divide: 15 ÷ 4 = 3 remainder 3, giving 3¾.
Do all arithmetic in improper form and convert to mixed only at the end. Attempting to add mixed numbers directly is where most errors happen.
Simplifying properly
Divide numerator and denominator by their greatest common divisor. Euclid's algorithm finds it quickly: repeatedly replace the larger number with the remainder of dividing it by the smaller, until the remainder is zero. For 18 and 24: 24 mod 18 = 6, 18 mod 6 = 0, so the GCD is 6.
Fractions versus decimals
Fractions are exact; decimals often are not. One third is 0.333… forever, and any decimal representation is an approximation. This matters more than it sounds: 0.1 + 0.2 in most programming languages gives 0.30000000000000004, because neither value has an exact binary representation. Financial and scientific software frequently uses rational or fixed-point arithmetic specifically to avoid this.
A fraction terminates as a decimal only when its denominator, in lowest terms, has no prime factors other than 2 and 5. That is why 1/8 = 0.125 exactly while 1/3 and 1/7 repeat forever.
Where fractions stay standard
- Cooking — recipes scale by fractions naturally.
- Construction — imperial measurements are fractional by convention.
- Music — note durations are halves, quarters, eighths.
- Probability — often clearer as a ratio of outcomes than as a decimal.