Skip to content
Tutorials Center
My learning

Topics

Lesson 13 of 38 ยท Integers and Rational Numbers

Fraction Arithmetic

Learn what fractions mean, how to find equivalent fractions, and how to add, subtract, multiply and divide fractions and mixed numbers, with code checks.

A fraction describes part of a whole. In 3/4, the denominator 4 says into how many equal parts the whole is cut, and the numerator 3 says how many parts you have. Fractions are also division: 3/4 is 3 รท 4. Together with integers, fractions form the rational numbers, so this lesson completes your toolkit for arithmetic with signed numbers.

Types of fractions

  • Proper fraction: numerator smaller than denominator (3/4), value below 1.
  • Improper fraction: numerator at least the denominator (7/4), value 1 or more.
  • Mixed number: a whole number and a fraction, 1 3/4, which equals 7/4.

Convert mixed to improper: 1 3/4 = (1 ร— 4 + 3)/4 = 7/4. Convert improper to mixed by dividing: 7 รท 4 = 1 remainder 3, so 1 3/4.

Equivalent fractions

Multiply or divide the numerator and denominator by the same non-zero number and the value stays the same: 1/2 = 2/4 = 3/6 = 50/100. To get the simplest form, divide by the greatest common factor (see GCF and LCM).

Adding and subtracting fractions

With a common denominator, add the numerators and keep the denominator: 2/9 + 5/9 = 7/9.

With different denominators, rewrite both using the least common denominator, the LCM of the denominators.

1/4 + 5/6:

  1. LCM(4, 6) = 12.
  2. 1/4 = 3/12 and 5/6 = 10/12.
  3. 3/12 + 10/12 = 13/12 = 1 1/12.

Subtraction works the same way: 5/6 โˆ’ 1/4 = 10/12 โˆ’ 3/12 = 7/12.

Python Add fractions step by step

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

A classic error is adding both tops and both bottoms: 1/4 + 5/6 is not 6/10. You can only add numerators once the denominators are equal.

Multiplying fractions

Multiply numerators together and denominators together: a/b ร— c/d = ac/bd.

2/3 ร— 4/5 = 8/15. You can simplify first by cancelling common factors: 3/8 ร— 4/9 = (3 ร— 4)/(8 ร— 9) = 12/72 = 1/6. A quick view: a third of three quarters is one quarter, 1/3 ร— 3/4 = 3/12 = 1/4. For mixed numbers, convert to improper fractions first: 1 1/2 ร— 2/3 = 3/2 ร— 2/3 = 1.

Dividing fractions

To divide by a fraction, multiply by its reciprocal (flip it): a/b รท c/d = a/b ร— d/c.

3/4 รท 2/5 = 3/4 ร— 5/2 = 15/8 = 1 7/8.

Why? Dividing by 2/5 asks how many fifths-pairs fit. Dividing by 1/2 doubles a number, and 2 is the reciprocal of 1/2. Likewise, 6 รท 1/3 = 18: there are 18 thirds in 6 wholes.

Python's fractions module does exact fraction arithmetic and is a good checker for hand calculations.

Python Exact fraction arithmetic

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Each result is automatically simplified. Compare them to your hand work.

Signed fractions

The sign rules for integers apply to fractions: โˆ’1/2 ร— 3/4 = โˆ’3/8, (โˆ’2/3) รท (โˆ’1/6) = 4. A negative fraction can place the sign in front, on the top or on the bottom: โˆ’1/2 = (โˆ’1)/2 = 1/(โˆ’2).

Python Comparing fractions

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

To compare by hand, write both fractions over a common denominator, or convert to decimals. 5/8 = 0.625 and 2/3 โ‰ˆ 0.667, so 5/8 < 2/3.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is 3/8 + 1/4?

    1/4 = 2/8, so 3/8 + 2/8 = 5/8. Adding the denominators (4/12) is a common mistake.
  2. 2. What is 2/3 ร— 9/10?

    (2 ร— 9)/(3 ร— 10) = 18/30 = 3/5 after dividing by 6.
  3. 3. What is 5/6 รท 1/3?

    5/6 ร— 3/1 = 15/6 = 5/2 = 2 1/2.
  4. 4. Write 2 3/5 as an improper fraction.

    2 ร— 5 + 3 = 13, so the fraction is 13/5.

Summary

  • A fraction is a part of a whole, and also a division: numerator over denominator.
  • Equivalent fractions come from multiplying or dividing top and bottom by the same number.
  • Add and subtract over a common denominator; multiply across; divide by multiplying by the reciprocal.
  • Convert mixed numbers to improper fractions before multiplying or dividing.
  • The integer sign rules also apply to fractions.

Next: Decimals, Fractions and Percents