Calculator Bar

GCF Calculator

GCF Calculator: Greatest Common Factor

Separate with commas or spaces. Up to 10 whole numbers.

—

What is the greatest common factor?

The greatest common factor (GCF) of two or more whole numbers is the largest number that divides evenly into all of them. The GCF of 84 and 60 is 12: both divide by 12 with nothing left over, and no larger number does that. It's also called the greatest common divisor (GCD) or highest common factor (HCF).

How to find the GCF: three methods

1. List the factors

Write out every factor of each number and pick the largest one they share.

18: 1, 2, 3, 6, 9, 18 24: 1, 2, 3, 4, 6, 8, 12, 24 Common: 1, 2, 3, 6 → GCF = 6

This is quick for small numbers, but slow once numbers have many factors.

2. Prime factorization (factor tree)

Break each number into primes, then multiply the primes they have in common, counting each one as many times as it appears in both.

84 = 2 × 2 × 3 × 7 60 = 2 × 2 × 3 × 5 Shared: 2 × 2 × 3 = 12

3. The Euclidean algorithm

Divide the larger number by the smaller and keep the remainder. Then divide the previous divisor by that remainder, and repeat until the remainder is 0. The last non-zero remainder is the GCF. It needs no factoring, so it's the fastest method for big numbers.

1071 = 2 × 462 + 147 462 = 3 × 147 + 21 147 = 7 × 21 + 0 → GCF = 21

Which method should you use?

MethodBest forExample
Listing factorsSmall numbers (under about 50)GCF(18, 24) = 6
Prime factorizationHomework that asks for a factor tree; three or more numbersGCF(84, 60) = 12
Euclidean algorithmLarge numbersGCF(1071, 462) = 21

Simplifying fractions with the GCF

To reduce a fraction to lowest terms, divide the top and bottom by their GCF. For 48/180, GCF(48, 180) = 12, so 48 ÷ 12 = 4 and 180 ÷ 12 = 15, giving 4/15. The same trick simplifies ratios: see the ratio calculator.

GCF of common number pairs

NumbersGCFNumbersGCF
12 and 18636 and 4812
15 and 25542 and 5614
16 and 24845 and 7515
20 and 301048 and 18012
24 and 361260 and 9030
27 and 36984 and 6012

Need the smallest number they both divide into instead? That's the least common multiple: use the LCM calculator.

Frequently asked questions

Is GCF the same as GCD?

Yes. The greatest common factor (GCF), greatest common divisor (GCD) and highest common factor (HCF) are three names for the same number: the largest whole number that divides evenly into all of the numbers.

What is the GCF of two prime numbers?

Always 1, because a prime number's only factors are 1 and itself. Numbers whose GCF is 1, such as 8 and 15, are called relatively prime or coprime, even when they aren't prime themselves.

Can the GCF be one of the numbers?

Yes. If one number divides evenly into the other, the smaller number is the GCF. For example, GCF(12, 36) = 12.

How is the GCF related to the LCM?

For two numbers, GCF × LCM = the two numbers multiplied together. For 84 and 60: 12 × 420 = 5,040 = 84 × 60. So once you know one, you can find the other by dividing.

See also

Last updated: November 16, 2026