GCF and LCM Calculator

Enter between 2 and 6 whole numbers to find their Greatest Common Factor (GCF) and Least Common Multiple (LCM) simultaneously. Fill in Number 1 and Number 2 at minimum — up to Number 6 — and get back the GCF, LCM, and the prime factorization of each number.

Results

Greatest Common Factor (GCF)

--

Least Common Multiple (LCM)

--

Prime Factorizations

--

Results Table

Frequently Asked Questions

What is the GCF (Greatest Common Factor)?

The GCF, or Greatest Common Factor, is the largest positive integer that divides evenly into all numbers in a given set. For example, the GCF of 24 and 56 is 8, because 8 is the largest number that divides both 24 and 56 without a remainder.

What is the LCM (Least Common Multiple)?

The LCM, or Least Common Multiple, is the smallest positive integer that is divisible by all numbers in a set. For example, the LCM of 24 and 56 is 168, meaning 168 is the smallest number that both 24 and 56 divide into evenly.

How do I calculate the GCF?

The most common methods are prime factorization and the Euclidean algorithm. With prime factorization, break each number into its prime factors and multiply together all the primes they share. For 24 (2×2×2×3) and 56 (2×2×2×7), the shared factors are 2×2×2 = 8.

How do I calculate the LCM?

Using prime factorization, find the prime factors of each number and take the highest power of every prime that appears across all numbers. For 24 (2³×3) and 56 (2³×7), the LCM is 2³×3×7 = 168. Alternatively, you can use the formula: LCM(a,b) = (a × b) / GCF(a,b).

What is the GCF of 8, 36, and 12?

The GCF of 8, 36, and 12 is 4. The prime factorizations are 8 = 2³, 36 = 2²×3², and 12 = 2²×3. The only common prime factor shared by all three is 2², which equals 4.

How many numbers can I enter into this calculator?

You can enter between 2 and 6 numbers. At minimum, fill in Number 1 and Number 2. Fields for Numbers 3 through 6 are optional — any blank fields are simply ignored in the calculation.

What is the relationship between GCF and LCM?

For any two positive integers a and b, their GCF and LCM are related by the formula: GCF(a,b) × LCM(a,b) = a × b. This means if you know the GCF, you can find the LCM quickly by dividing the product of the two numbers by their GCF.

Can the GCF ever be larger than the LCM?

No. The GCF is always less than or equal to the LCM. The GCF is always less than or equal to the smallest number in the set, while the LCM is always greater than or equal to the largest number. They are only equal when all numbers in the set are identical.

More Math Tools