Skip to main content
Math

GCF Calculator

Find the greatest common factor and least common multiple of up to four whole numbers, with prime factorizations and all common divisors.

Numbers

Enter up to four positive whole numbers.

GCF (also called GCD or HCF) is the largest number that divides every value exactly. LCM is the smallest number that every value divides into.

Result

Greatest common factor (GCF)

12

LCM = 360

Numbers
24, 36, 60
GCF / GCD / HCF
12
Least common multiple
360
Number of common divisors
6

Prime factorizations

  • 242^3 × 3
  • 362^2 × 3^2
  • 602^2 × 3 × 5

Common divisors

1234612

How to use the GCF calculator

  1. 1

    Enter two to four positive whole numbers.

  2. 2

    The calculator finds the greatest common factor using the Euclidean algorithm.

  3. 3

    Review the GCF, least common multiple, prime factorizations and every common divisor.

Frequently asked questions

What is the difference between GCF, GCD and HCF?

They are the same thing. Greatest common factor, greatest common divisor and highest common factor all mean the largest number that divides every value exactly.

How is the GCF calculated?

The calculator uses the Euclidean algorithm: repeatedly replace the pair with the remainder until the remainder is zero. The last non-zero remainder is the GCF. For several numbers it folds the result pairwise.

How are GCF and LCM related?

For two positive integers, GCF × LCM = a × b. That relationship is why the least common multiple is easy to derive once you know the greatest common factor.