GCF and LCM Calculator

Find the GCF and the LCM of a list of whole numbers at once.

Two or more, separated by commas or spaces

Try

Result

You entered8,  12,  208, \; 12, \; 20

GCF 4,  LCM 120\displaystyle \text{GCF } 4, \; \text{LCM } 120
Show the work
  1. Prime factorisation of each number

    Write each number as a product of primes, using a power where a prime repeats. The GCF and the LCM are both read off these prime powers.

    8=2312=22×320=22×5\begin{gathered} 8 = 2^{3} \\ 12 = 2^{2} \times 3 \\ 20 = 2^{2} \times 5 \end{gathered}
  2. Greatest common factor: lowest powers of shared primes

    The GCF takes only the primes that appear in every number, each to its lowest power. The shared prime is 22, so multiply them to those powers.

    22=42^{2} = 4
  3. Least common multiple: highest powers of every prime

    The LCM takes every prime that appears in any number, each to its highest power, so that each number divides it. The primes used are 22, 33, 55.

    23×3×5=8×3×5=120\begin{aligned} 2^{3} \times 3 \times 5 &= 8 \times 3 \times 5 \\ &= 120 \end{aligned}
  4. Result

    So the GCF is 44 and the LCM is 120120.

Worked examples