lifekit

Search tools

Type a tool name, then press Enter to open it.

GCD & LCM calculator

Find the greatest common divisor (GCF/HCF) and least common multiple of two or more numbers, with Euclidean algorithm and prime factor steps.

  • Free
  • Runs in your browser
  • Nothing is uploaded

How to use it

  1. Enter two or more whole numbers, one per box, or switch to Paste a list and type them separated by commas.
  2. Read the GCD (also called the GCF or HCF) and the LCM.
  3. Follow the steps: the Euclidean algorithm, then the prime factorization method with each number's factor tree.
  4. Copy the answer or press Reset to start again.

Private by design

Everything runs on your device. Nothing you enter or open here is uploaded.

Questions

Use the Euclidean algorithm: divide the larger number by the smaller and repeat with the remainder until it is 0, and the last non-zero remainder is the GCD. For 84 and 36: 84 = 2 × 36 + 12, then 36 = 3 × 12 + 0, so the GCD is 12.

Multiply the two numbers and divide by their GCD. For 84 and 36 that is 84 × 36 ÷ 12 = 252. With prime factors, take every prime that appears with its highest power.

Yes, they are three names for the same number. Greatest common divisor (GCD), greatest common factor (GCF) and highest common factor (HCF) all mean the largest whole number that divides every number in the set.

The GCD of 12 and 18 is 6 and the LCM is 36. 12 = 2² × 3 and 18 = 2 × 3², so the GCD is 2 × 3 = 6 and the LCM is 2² × 3² = 36.

For two numbers, GCD × LCM equals the product of the numbers. For 12 and 18, 6 × 36 = 216 = 12 × 18. This shortcut only works for two numbers, so with three or more, find the LCM two numbers at a time.