Skip to content
SnapCalculations

LCM & GCF Calculator

Enter two to ten whole numbers to find their greatest common factor and least common multiple, with Euclid’s method shown in full.

Enter 2 to 10 positive whole numbers, separated by commas or spaces.

GCF (greatest common factor)

6

LCM (least common multiple): 180

GCF / HCF / GCD
6
LCM
180

Step-by-step solution

Worked out with your numbers. Change any value above and the steps update.

  1. 1

    GCF of 12 and 18 (Euclid's method)

    Divide, then repeat with the divisor and remainder

  2. 2

    Divide

    18 = 1 × 12 + 6

  3. 3

    Divide

    12 = 2 × 6 + 0 = GCF 6

  4. 4

    GCF of 6 and 30 (Euclid's method)

    Divide, then repeat with the divisor and remainder

  5. 5

    Divide

    30 = 5 × 6 + 0 = GCF 6

  6. 6

    LCM of 12 and 18

    12 × 18 ÷ GCF 6 = 36

  7. 7

    LCM of 36 and 30

    36 × 30 ÷ GCF 6 = 180

How it works

  • GCF uses Euclid’s method: divide the larger number by the smaller, then repeat with the divisor and the remainder until the remainder is 0. The last divisor is the GCF.
  • LCM of two numbers = a × b ÷ GCF(a, b).
  • For more than two numbers, the calculator works through the list one pair at a time.

Frequently asked questions

Are GCF, GCD and HCF the same thing?

Yes. Greatest common factor, greatest common divisor and highest common factor are different names for the same number.

When do I use the LCM?

The LCM is the lowest common denominator when adding fractions, and it answers “when will these repeating events line up again?” problems.

Results are estimates for general information and are not financial, medical or professional advice.