GCF Calculator

Find the greatest common factor of two or more whole numbers. See the prime factorization, the Euclidean algorithm steps, every common factor, and the least common multiple. Everything runs in the browser.

  • 2 to 20 numbers
  • Prime factorization
  • Euclidean steps & LCM
  • Stays on your device

The greatest common factor (GCF), also called the greatest common divisor (GCD) or highest common factor (HCF), is the largest whole number that divides every number in the list.

Prime factorization

  • 24 = 2^3 × 3
  • 36 = 2^2 × 3^2
  • 60 = 2^2 × 3 × 5

Euclidean algorithm steps

  1. 36 = 1 × 24 + 12
  2. 24 = 2 × 12 + 0
  3. 60 = 5 × 12 + 0

Numbers stay on this device. Nothing is uploaded, and there is no account.

The greatest common factor is the biggest number that divides every number in your list evenly. It is the number you divide by to reduce a fraction or a ratio to lowest terms: 18 / 24 shares a GCF of 6, so it reduces to 3 / 4.

Example: 24 = 2^3 × 3, 36 = 2^2 × 3^2, and 60 = 2^2 × 3 × 5. The primes all three share, at their lowest power, are 2^2 and 3, so the GCF is 4 × 3 = 12.

Break one number into primes with the factoring calculator, reduce a ratio with the ratio calculator, or solve A / B = C / D with the proportion calculator. Browse more tools in the Math hub.

How to use the GCF calculator

  1. Type two or more whole numbers, separated by commas or spaces.
  2. Read the GCF, the LCM, and whether the numbers are relatively prime.
  3. Check the prime factorization of each number to see the shared primes.
  4. Follow the Euclidean algorithm steps to see how the GCF was found.

Frequently asked questions

What is the GCF?

The greatest common factor (GCF) is the largest whole number that divides every number in a set with no remainder. The GCF of 12 and 18 is 6, because 6 divides both and no larger number does.

How do I find the GCF of two numbers?

List the factors of each number and pick the largest one they share, or use prime factorization. 12 = 2 × 2 × 3 and 18 = 2 × 3 × 3 share one 2 and one 3, so the GCF is 2 × 3 = 6.

How does the Euclidean algorithm find the GCF?

Divide the larger number by the smaller one, then replace the larger number with the remainder and repeat until the remainder is 0. The last non-zero remainder is the GCF. For 48 and 18: 48 = 2 × 18 + 12, 18 = 1 × 12 + 6, 12 = 2 × 6 + 0, so the GCF is 6.

Can I find the GCF of three or more numbers?

Yes. Find the GCF of the first two numbers, then the GCF of that result and the next number, and so on. The GCF of 24, 36, and 60 is 12. This calculator takes up to 20 numbers at once.

Are GCF, GCD, and HCF the same thing?

Yes. Greatest common factor (GCF), greatest common divisor (GCD), and highest common factor (HCF) are three names for the same number.

What is the difference between GCF and LCM?

The GCF is the largest number that divides all of your numbers. The least common multiple (LCM) is the smallest number that all of them divide into. For 12 and 18 the GCF is 6 and the LCM is 36. For two numbers, GCF × LCM equals the product of the numbers.

What does it mean if the GCF is 1?

If the GCF is 1, the numbers are relatively prime (coprime): they share no factor other than 1. 8 and 15 are relatively prime even though neither is a prime number.

Is my information saved or uploaded?

No. The GCF calculator runs entirely in your browser. Numbers are not sent to a server or stored, and there is no account.