Skip to content

Math glossary

Greatest common factor

The greatest common factor, or GCF, of two or more whole numbers is the largest number that divides all of them evenly. The GCF of 12 and 18 is 6. It is also called the greatest common divisor, or GCD. Use it to simplify fractions and to split items into equal groups.

GCF meaning

A factor of a number divides it with no remainder. The factors of 12 are 1, 2, 3, 4, 6 and 12. A common factor of two numbers divides both of them, and the greatest common factor is the largest such number. It is also called the greatest common divisor (GCD) or highest common factor (HCF).

For 18 and 24:

  • Factors of 18: 1, 2, 3, 6, 9, 18
  • Factors of 24: 1, 2, 3, 4, 6, 8, 12, 24

The common factors are 1, 2, 3 and 6, so GCF(18, 24) = 6. Every common factor divides the GCF, which is a quick way to check your answer.

Three ways to find the GCF

1. List the factors. Write all factors of each number and pick the largest shared one. Simple, but slow for big numbers.

2. Prime factorization. Break each number into primes and multiply the primes they share, each at its lowest power.

  • 48 = 2⁴ × 3
  • 180 = 2² × 3² × 5
  • Shared primes at lowest power: 2² × 3 = 12

The prime factorization calculator builds the factor trees for you.

3. Euclid's algorithm. Divide the larger number by the smaller, then replace the pair with the smaller number and the remainder. Repeat until the remainder is 0. The last nonzero remainder is the GCF.

For 1071 and 462:

StepDivisionRemainder
11071 ÷ 462 = 2147
2462 ÷ 147 = 321
3147 ÷ 21 = 70

So GCF(1071, 462) = 21. Euclid described this method over 2,000 years ago, and it is still what computers use because it is fast even for huge numbers.

GCF examples

NumbersPrime factorsGCF
18, 242 × 3², 2³ × 36
36, 482² × 3², 2⁴ × 312
84, 1262² × 3 × 7, 2 × 3² × 742
15, 283 × 5, 2² × 71
24, 36, 602³ × 3, 2² × 3², 2² × 3 × 512

For three or more numbers, find the GCF of the first two, then the GCF of that result with the next number. GCF(24, 36) = 12, and GCF(12, 60) = 12.

Where the GCF is used

Simplifying fractions. 84/126 divided top and bottom by 42 becomes 2/3 in one step. Using a smaller common factor works too, but takes several rounds. The fraction calculator simplifies automatically.

Splitting into equal groups. A teacher has 24 pencils and 36 erasers and wants identical kits with nothing left over. The largest number of kits is GCF(24, 36) = 12, each with 2 pencils and 3 erasers.

Tiling and cutting. A floor 48 by 180 inches can be covered with square tiles without cutting if the tile side divides both lengths. The biggest such tile is 12 inches, giving 4 × 15 = 60 tiles.

Factoring algebra. In 6x² + 9x, the GCF of the terms is 3x, so 6x² + 9x = 3x(2x + 3).

Simplifying ratios. 18:24 divided by 6 is 3:4.

GCF and LCM together

The GCF and the least common multiple are partners. For any two positive whole numbers,

GCF(a,b)×LCM(a,b)=a×b\text{GCF}(a, b) \times \text{LCM}(a, b) = a \times b

For 18 and 24: 6 × 72 = 432 = 18 × 24. If you know one, you can get the other with a single division.

GCFLCM
QuestionLargest number dividing allSmallest number all divide
From primesShared primes, lowest powersAll primes, highest powers
18 and 24672

Relatively prime numbers

When the GCF of two numbers is 1, they are called relatively prime, or coprime. 8 and 15 are coprime even though neither is prime. A fraction whose numerator and denominator are coprime, such as 8/15, is already in lowest terms.

Common mistakes

  • Taking the highest powers of the primes. That builds the LCM, not the GCF.
  • Including primes that only one number has. The GCF uses shared primes only.
  • Stopping at a common factor that is not the greatest, such as 2 or 3 for 18 and 24.
  • Saying the GCF is 0 when numbers share no factor. It is 1.

For quick answers with steps, use the GCF calculator. GCF and LCM explained has word problems for both.

FAQ

Frequently asked questions

01What is the GCF of 18 and 24?

6. The factors of 18 are 1, 2, 3, 6, 9, 18 and the factors of 24 are 1, 2, 3, 4, 6, 8, 12, 24. The largest one they share is 6.

02Is GCF the same as GCD and HCF?

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

03What is the GCF of two prime numbers?

1, unless they are the same prime. Numbers whose GCF is 1 are called relatively prime or coprime.

04How is the GCF used to simplify fractions?

Divide the numerator and denominator by their GCF. For 36/48 the GCF is 12, so the fraction simplifies to 3/4 in one step.

05Can the GCF be larger than the smallest number?

No. A factor can never be bigger than the number it divides, so the GCF is at most the smallest number in the set.

Related terms

Last updated November 9, 2026. See all math terms.