Ultimate Calculator
Math

GCF and LCM Calculator

Find the greatest common factor and least common multiple of two or more whole numbers.

Greatest common factor

6

Least common multiple
180
  1. 12 = 2² × 3
  2. 18 = 2 × 3²
  3. 30 = 2 × 3 × 5
  4. GCF: multiply the primes they all share, using the lowest power of each.
  5. LCM: multiply every prime that appears, using the highest power of each.

The formula

LCM(a, b) = a × b ÷ GCF(a, b)

The greatest common factor (also called GCD or HCF) is the largest number that divides every number in the list. The least common multiple is the smallest number every one of them divides into. GCF simplifies fractions, and LCM finds common denominators.

How to use this calculator

  1. Enter whole numbers, separated by commas.
  2. Read the answer on the right. It updates as you type, and the numbered steps underneath show how it was worked out.

Worked example

Using Whole numbers, separated by commas: 12, 18, 30.

  1. 12 = 2² × 3
  2. 18 = 2 × 3²
  3. 30 = 2 × 3 × 5
  4. GCF: multiply the primes they all share, using the lowest power of each.
  5. LCM: multiply every prime that appears, using the highest power of each.

Greatest common factor: 6

Common questions

Is GCF the same as GCD?

Yes. Greatest common factor, greatest common divisor and highest common factor are three names for the same thing.

When do I need the LCM?

Whenever events repeat on different cycles or fractions need a common denominator. The LCM of the denominators is the least common denominator.