Skip to content

GCF & LCM Calculator

Greatest common factor and least common multiple of several numbers, with the working shown

Loading the tool…

Finds the greatest common factor (GCF) and least common multiple (LCM) of 2 to 10 whole numbers and shows the working by common-factor division, a prime factor table or the Euclidean algorithm. Use it to check math homework or to simplify fractions and find common denominators.

How to use

  1. Type whole numbers into "Numbers", separated by commas or spaces, for example 12, 18, 30. A column pasted from a spreadsheet also works.
  2. The GCF, the LCM, the "Common factors" and whether the numbers are coprime appear at once.
  3. Under "Method", choose "Divide by common factors", "Prime factor table" or "Euclidean algorithm" to see the working.
  4. Under "Use with fractions", see how these numbers simplify a fraction or give a common denominator.

How it works

Questions and answers

What are the GCF and LCM of 12 and 18?
The GCF is 6 and the LCM is 36. You can check this with 12 × 18 = 216 = 6 × 36.
How do I find the least common multiple?
With common-factor division, multiply all the divisors on the left and the numbers left at the bottom. For two numbers, you can also divide their product by the GCF.
What is the Euclidean algorithm?
Divide the larger number by the smaller one, then divide the divisor by the remainder, and repeat until the remainder is 0. The last non-zero remainder is the GCF.
What does coprime mean?
Numbers are coprime when their GCF is 1. Two numbers can be coprime even if neither is prime, for example 8 and 9.