GCF and LCM Calculator
Find the greatest common factor and the least common multiple of two or more numbers: you get the answer instantly, with the prime factorizations shown step by step.
GCF and LCM: when you actually need them
The greatest common factor (also called the greatest common divisor, GCD) is the largest number that divides all your values evenly: it's what you use to reduce fractions to lowest terms, or to split quantities into the biggest possible equal groups (48 pens and 36 pencils โ 12 identical pencil cases). The least common multiple is the smallest number divisible by all of them: it's the common denominator when you add fractions, and it answers every "when do they line up again?" problem โ a bus that comes every 12 minutes and one that comes every 18 leave together every 36 minutes, which is their LCM.
The prime factorization method
Break each number into prime factors: 12 = 2ยฒ ร 3 and 18 = 2 ร 3ยฒ. The GCF is the product of the factors common to all the numbers, each taken with its smallest exponent (2 ร 3 = 6); the LCM is the product of all the factors, each taken with its largest exponent (2ยฒ ร 3ยฒ = 36). For two numbers there's always a built-in check: GCF ร LCM = the product of the two numbers, and this tool shows it automatically. If there is no common factor at all, the GCF is 1 and the numbers are called coprime.