Formulas
| What | Formula | Example |
|---|---|---|
| GCD | Euclid’s method | GCD(12, 18) = 6 |
| LCM | a × b ÷ GCD | 12 × 18 ÷ 6 = 36 |
| Check | GCD × LCM = a × b | 6 × 36 = 216 = 12 × 18 |
Euclid’s method, step by step
Divide the larger number by the smaller. If the remainder is 0, the divisor is the GCD. Otherwise make the old divisor the new dividend and the remainder the new divisor, and divide again. For 12 and 18: 18 ÷ 12 leaves remainder 6; then 12 ÷ 6 leaves 0. So the GCD is 6.
Examples
12 and 18: GCD 6, LCM 36.
5 and 7: both prime, so GCD 1 and LCM 35.
48 and 180: 180 ÷ 48 leaves 36; 48 ÷ 36 leaves 12; 36 ÷ 12 leaves 0. GCD 12, LCM = 48 ÷ 12 × 180 = 720.
84 and 126: 126 ÷ 84 leaves 42; 84 ÷ 42 leaves 0. GCD 42, LCM 252.
Adding 5/12 + 7/18: the LCM of 12 and 18 is 36. 5/12 = 15/36 and 7/18 = 14/36, so the sum is 29/36.
Simplifying 48/180: divide top and bottom by the GCD 12 to get 4/15.
Where it helps in real life
- Events that coincide: two buses reach a stop every 12 and 18 minutes. If they arrive together now, they next arrive together after 36 minutes (the LCM).
- Equal pieces: to cover a 12 ft × 18 ft floor with square tiles, the largest tile side is 6 ft (the GCD), which needs 2 × 3 = 6 tiles. If that size is not available, pick a smaller common divisor.
Common mistakes
- Treating the product as the LCM. 12 × 18 = 216 is not the LCM. Divide the product by the GCD to get 36.
- Mixing up the two. The GCD is never larger than the smaller number; the LCM is never smaller than the larger number. If your answer breaks this, something is off.
- Entering decimals or fractions. The tool accepts only whole numbers of 1 or more. Zero and negatives give no result.
- Matching denominators with the product alone. It works, but the numbers get bigger; using the LCM keeps the sum small.
For exam students
In Bangladeshi textbooks LCM and GCD are usually taught by prime factorisation or the division method. Use the calculator to check your answer, but write the steps in the exam. To verify a result, use GCD × LCM = a × b.
More: where they are used and why it works
LCM aligns denominators when adding fractions; GCD simplifies them. LCM also tells when repeating events coincide.
Seeing it through factors: 12 = 2 × 2 × 3 and 18 = 2 × 3 × 3. The common part is 2 × 3 = 6, the GCD. For the LCM, take each prime the maximum number of times it appears: 2 × 2 × 3 × 3 = 36.
Why Euclid’s method is practical: factorising big numbers is hard, but the remainder method finishes in a few steps. 84 and 126 need only two. The calculator uses this method, so large inputs give instant answers.
Special cases: equal numbers (9 and 9) give GCD 9 and LCM 9. If one number is 1, the GCD is 1 and the LCM is the other number. If the GCD is 1 the numbers are called coprime, like 15 and 28, and their LCM is the product, 420.