GCF & LCM Calculator

Find the Greatest Common Factor and Least Common Multiple of up to 4 numbers, with complete step-by-step prime factorization working.

Enter up to 4 numbers

Greatest Common Factor
Least Common Multiple
Step-by-step working

What is the Greatest Common Factor (GCF)?

The GCF (also called the Greatest Common Divisor, GCD) is the largest number that divides evenly into all given numbers. For example, the GCF of 48 and 18 is 6, because 6 is the largest number that goes into both without a remainder. GCF is used to simplify fractions, factor algebraic expressions, and solve word problems.

What is the Least Common Multiple (LCM)?

The LCM is the smallest positive integer divisible by all given numbers. The LCM of 4 and 6 is 12. It's essential when finding common denominators for fractions. The relationship between GCF and LCM is: GCF(a,b) × LCM(a,b) = a × b.

How to Find GCF Using Prime Factorization

1. Write the prime factorization of each number. 2. Identify all common prime factors. 3. Multiply the common factors using the lowest exponent. For 48 = 2⁴×3 and 18 = 2×3²: the common factors are 2¹ and 3¹, so GCF = 2×3 = 6.