GCF Calculator

GCF calculator and greatest common factor calculator for 2 to 20 numbers. Find the greatest common factor (also called highest common factor or GCD) with prime factorization and Euclidean algorithm steps showing how to find GCF.

Updated

GCF(48, 72, 120) = 24

All common factors (8): 1, 2, 3, 4, 6, 8, 12, 24

Prime factorization method

  • 48 = 2 × 2 × 2 × 2 × 3
  • 72 = 2 × 2 × 2 × 3 × 3
  • 120 = 2 × 2 × 2 × 3 × 5

Multiply the prime factors that appear in every number (underlined above):

GCF(48, 72, 120) = 23 × 3 = 2 × 2 × 2 × 3 = 24

Euclidean algorithm steps

Divide the larger number by the smaller number until the remainder reaches 0. The last non-zero divisor is the GCF.

Step 1: GCF(48, 72) = 24

  • 72 = 48 × 1 + 24
  • 48 = 24 × 2 + 0 (last divisor is 24)

Step 2: GCF(24, 120) = 24

  • 120 = 24 × 5 + 0 (last divisor is 24)

Was this tool helpful?

Leave a rating to help us build a better tool.

Average 0.0 / 5 · 0 reviews


What is the GCF (greatest common factor)?

The greatest common factor (GCF)—also called the greatest common divisor (GCD) or highest common factor (HCF)—of two or more positive whole numbers is the largest positive integer that divides every one of them without leaving a remainder. It is written as GCF(a, b). For example, the factors of 18 are 1, 2, 3, 6, 9, and 18, and the factors of 24 are 1, 2, 3, 4, 6, 8, 12, and 24, so GCF(18, 24) = 6.

This GCF calculator—also a greatest common factor calculator, highest common factor calculator, and GCD calculator—accepts 2 to 20 positive whole numbers up to one trillion and shows the GCF, every shared common factor, the prime factorization breakdown, and the Euclidean algorithm steps.

How to find GCF

1. Prime factorization method

Factor each number into primes, identify the prime factors that appear in every number (taking the lowest exponent of each shared prime), and multiply them together. For 48, 72, and 120:

  • 48 = 2 × 2 × 2 × 2 × 3
  • 72 = 2 × 2 × 2 × 3 × 3
  • 120 = 2 × 2 × 2 × 3 × 5

Every number shares three 2s and one 3, so GCF(48, 72, 120) = 2³ × 3 = 24. If the numbers share no prime factors at all, their GCF is 1.

2. Euclidean algorithm

For larger numbers where prime factorization is slow, the Euclidean algorithm uses repeated division with remainders based on the identity GCF(a, b) = GCF(b, a mod b):

  1. Divide the larger number a by the smaller number b to get remainder r.
  2. If r = 0, then b is the GCF. Otherwise, replace a with b and b with r, and repeat.
  3. When finding the GCF of three or more numbers, take GCF(GCF(a, b), c) pair by pair.

For example, to find GCF(1,071, 462): 1,071 = 462 × 2 + 147; 462 = 147 × 3 + 21; 147 = 21 × 7 + 0. The last non-zero divisor is 21, so GCF(1,071, 462) = 21.

What the result includes

  • The greatest common factor (GCF) of all entered numbers.
  • The complete list of all common factors that divide every number in the set.
  • The prime factorization of each number with shared prime factors underlined.
  • The step-by-step Euclidean algorithm divisions pair by pair.

Frequently asked questions

Are GCF, GCD, and HCF the same thing?

Yes. Greatest common factor (GCF), greatest common divisor (GCD), and highest common factor (HCF) all refer to the exact same number: the largest positive integer that divides every number in your set without a remainder.

How do you use the GCF to simplify fractions?

Divide both the numerator and denominator by their GCF to reduce a fraction to lowest terms in a single step. For 48⁄72, GCF(48, 72) = 24, so dividing top and bottom by 24 gives 2⁄3.

What does it mean when the GCF of two numbers is 1?

When GCF(a, b) = 1, the numbers share no prime factors and are called coprime (or relatively prime). Neither number has to be prime itself—for example, 8 and 15 are composite, but GCF(8, 15) = 1.

How are GCF and LCM related?

For any two positive integers a and b, the product of their GCF and least common multiple equals the product of the two numbers: GCF(a, b) × LCM(a, b) = a × b.

What's changed
  • Launched.

References