Skip to content
CalculatorBuddy

GCF Calculator

Find the greatest common factor (GCF, GCD, or HCF) of two or more positive integers, with prime-factorization steps.

ExampleSample values — edit any field to see your result.

Separate positive integers with commas. At least two numbers are required.

Results update as you type.

GCF

GCF(330, 75, 450, 225) = 15

Estimated result

Greatest common factor
15

Calculation steps

Worked solution
Prime factorization of the numbers:
330 = 2 × 3 × 5 × 11
75 = 3 × 5 × 5
450 = 2 × 3 × 3 × 5 × 5
225 = 3 × 3 × 5 × 5
GCF(330, 75, 450, 225)
= 3 × 5
= 15

Enter two or more positive integers, separated by commas, to find their greatest common factor (GCF) — also called the GCD or HCF — with prime-factorization steps.

Formula

The GCF is the largest positive integer that divides every listed number. Two common methods:

Prime factorization. Factor each integer, keep the shared primes (lowest exponent), and multiply:

GCF(16, 88, 104)
16  = 2 × 2 × 2 × 2
88  = 2 × 2 × 2 × 11
104 = 2 × 2 × 2 × 13
GCF = 2 × 2 × 2 = 8

Euclidean algorithm. For two positive integers a ≥ b,

GCF(a, b) = GCF(b, a mod b)

until the remainder is 0. The last non-zero remainder is the GCF. Extra integers fold in the same way: GCF(a, b, c) = GCF(GCF(a, b), c).

Simplifying a fraction a/b is dividing both parts by GCF(a, b). Use the fraction calculator when you want the reduced fraction itself.

Examples

Default list 330, 75, 450, 225

Prime factors: 330 = 2 × 3 × 5 × 11, 75 = 3 × 5 × 5, 450 = 2 × 3 × 3 × 5 × 5, and 225 = 3 × 3 × 5 × 5. The shared primes are 3 and 5, so the GCF is 15.

Page example 16, 88, 104

Each number contributes at least three factors of 2, and nothing else is shared, so GCF(16, 88, 104) = 8.

Euclidean example 268442, 178296

Repeated remainders end at 2, so GCF(268442, 178296) = 2. Adding 66888 does not change the result: GCF(268442, 178296, 66888) = 2.

Frequently asked questions

What is the greatest common factor (GCF)?
The GCF (also called the greatest common divisor, GCD, or highest common factor, HCF) of two or more non-zero integers is the largest positive integer that divides each of them with no remainder. For example, GCF(32, 256) = 32.
How should I enter the numbers?
Type or paste at least two positive integers separated by commas, such as 330, 75, 450, 225. Spaces around commas and new lines are fine. Trailing commas and blank slots between numbers are ignored. Zero, negatives, decimals that are not whole numbers, and non-numeric text are rejected.
How do you find the GCF by prime factorization?
Factor each integer into primes, keep the primes that appear in every list (using the smallest exponent), and multiply those together. For 16 = 2×2×2×2, 88 = 2×2×2×11, and 104 = 2×2×2×13, the shared primes are three 2s, so the GCF is 8.
What is the Euclidean algorithm?
GCF(a, b) equals GCF(b, a mod b), repeating until the remainder is 0. The last non-zero remainder is the GCF. For more than two numbers, fold the same pairwise step across the list: GCF(a, b, c) = GCF(GCF(a, b), c). This is faster than factoring large integers.
Is GCF the same as GCD or HCF?
Yes. Greatest common factor, greatest common divisor, and highest common factor all name the same value. This calculator reports that number and the prime-factor working used to reach it.

Related calculators