← All Calculators

GCF & LCM Calculator

Find the Greatest Common Factor (GCF) and Least Common Multiple (LCM) of two or more integers.

GCF & LCM formulas

GCF (prime factors)Multiply the common primes, each to its lowest power
LCM (prime factors)Multiply every prime, each to its highest power
ShortcutLCM(a, b) = a × bGCF(a, b)
Euclidean algorithmGCF(a, b) = GCF(b, a mod b), until the remainder is 0

Worked examples

  1. Find the GCF and LCM of 48 and 180.

    1. 48 = 24 × 3, 180 = 22 × 32 × 5
    2. GCF = 22 × 3 = 12
    3. LCM = 24 × 32 × 5 = 720 (check: 48 × 180 ÷ 12 = 720)

    Answer: GCF = 12, LCM = 720

  2. Euclidean algorithm for GCF(180, 48).

    1. 180 = 3 × 48 + 36
    2. 48 = 1 × 36 + 12
    3. 36 = 3 × 12 + 0 → stop

    Answer: GCF = 12

  3. Buses leave every 12 and 18 minutes. When do they next leave together?

    1. LCM(12, 18) = 36

    Answer: In 36 minutes

Tips & common mistakes

  • GCF simplifies fractions; LCM finds common denominators.

GCF vs LCM in plain English

The greatest common factor (GCF) — also called the greatest common divisor (GCD) or highest common factor (HCF) — is the largest number that divides into all of your numbers evenly. The least common multiple (LCM) is the smallest number that all of your numbers divide into.

Three ways to find them

  • List the factors (good for small numbers): factors of 12 are 1, 2, 3, 4, 6, 12 and of 18 are 1, 2, 3, 6, 9, 18 — the biggest shared one is 6.
  • Prime factorization: 48 = 24 × 3 and 180 = 22 × 32 × 5. The GCF takes each shared prime at its lowest power: 22 × 3 = 12. The LCM takes every prime at its highest power: 24 × 32 × 5 = 720.
  • Euclid’s algorithm (fastest for big numbers): replace the larger number by the remainder of dividing it by the smaller, until the remainder is 0. 180 ÷ 48 leaves 36; 48 ÷ 36 leaves 12; 36 ÷ 12 leaves 0 — so the GCF is 12.

Shortcut for two numbers: LCM(a, b) = a × b ÷ GCF(a, b). For 48 and 180: 8,640 ÷ 12 = 720.

Where you actually use them

  • GCF — simplifying fractions (48/180 ÷ 12 = 4/15), splitting things into equal groups, tiling a floor with the largest square tile.
  • LCM — adding fractions (common denominator), finding when repeating events line up again (buses every 12 and 18 minutes meet every 36 minutes).

GCF and LCM of common number pairs

NumbersGCFLCM
8 and 12424
12 and 18636
15 and 25575
16 and 24848
18 and 24672
20 and 301060
24 and 361272
27 and 369108
36 and 4812144
42 and 5614168
48 and 18012720
60 and 7212360

Frequently asked questions

What is the GCF of 12 and 18?

The GCF of 12 and 18 is 6. The factors of 12 are 1, 2, 3, 4, 6, 12 and the factors of 18 are 1, 2, 3, 6, 9, 18; the largest one they share is 6.

Is GCF the same as GCD and HCF?

Yes. Greatest common factor (GCF), greatest common divisor (GCD) and highest common factor (HCF) are three names for the same thing.

How do you find the LCM from the GCF?

For two numbers, LCM = (a × b) ÷ GCF. For example, the GCF of 48 and 180 is 12, so the LCM is 48 × 180 ÷ 12 = 720.

What is the GCF of two prime numbers?

The GCF of two different prime numbers is always 1, and their LCM is simply their product. Numbers whose GCF is 1 are called relatively prime or coprime.

Can the GCF be larger than the smallest number?

No. The GCF can be at most the smallest number, and it equals the smallest number only when that number divides all the others.

How do you find the GCF of three or more numbers?

Find the GCF of the first two, then the GCF of that result with the next number, and so on. For 24, 36 and 60: GCF(24, 36) = 12, then GCF(12, 60) = 12.

Related calculators