GCF
Number theory tool
GCF · GCD · HCF

GCF Calculator

Find the greatest common factor of two or more integers, then see why the answer is correct with factor lists, prime factors, and Euclidean steps.

Exact integersUp to 50 valuesStep-by-step
Quick definition

The GCF is the largest positive integer that divides every input with no remainder. It is also called the GCD or HCF.

GCF(8, 12, 20)=4
Calculator workspace

Find your common factor

gcd(a, b) = gcd(b, a mod b)
÷

Enter integers

Enter 2–50 integers separated by commas, spaces, semicolons, or new lines. Negative integers and zero are supported.
Try an example
Euclidean algorithm steps
  1. 1. 8 ÷ 12 = 0 remainder 8
  2. 2. 12 ÷ 8 = 1 remainder 4
  3. 3. 8 ÷ 4 = 2 remainder 0
  4. 4. 4 ÷ 20 = 0 remainder 4
  5. 5. 20 ÷ 4 = 5 remainder 0
=

Your answer

Greatest common factor
4
Input count
3
Shared factor status
Multiple
Coprime?
No
Largest input
20
Prime factorization
  • 8 = 2^3
  • 12 = 2^2 × 3
  • 20 = 2^2 × 5

Every common factor divides 4; the greatest is 4.

Show your work

Common factors at a glance

1
Factors of 8
1, 2, 4, 8
2
Factors of 12
1, 2, 3, 4, 6, 12
3
Factors of 20
1, 2, 4, 5, 10, 20

The intersection of all these lists contains the shared factors. The largest one is 4.

Useful identity

GCF makes fractions smaller

To reduce a fraction, divide its numerator and denominator by their GCF. The value stays the same while both numbers become easier to work with.

48/72÷ 24= 2/3
GCF(48, 72) = 24, so 24 is the greatest legal divisor for both parts.

∑ How to find the greatest common factor

The greatest common factor is the largest positive integer that divides every number in a set without a remainder. This calculator applies the Euclidean algorithm pairwise, so it works for two or more integers.

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

Normalize values

Use the absolute value of each integer because common divisors are positive.

2

Apply Euclid’s algorithm

Repeatedly divide and keep the remainder until the remainder is zero.

3

Repeat for the list

Use the current GCF with the next integer until every input is included.

Worked example: GCF of 48 and 72

72 mod 48 = 24, 48 mod 24 = 0, so the greatest common factor is 24.

≡ GCF methods and examples

List factors

Common factors → greatest one

List the factors of each small number and choose the largest factor that appears in every list.

Prime factorization

GCF = product of shared prime powers

Factor each number and multiply the prime factors shared by all inputs, using the lowest exponent.

Euclidean algorithm

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

Use remainders instead of long factor lists. This is fast for large integers and produces the steps shown above.

NumbersGCFWhy
8, 12, 2044 divides all three numbers
48, 722424 is the largest shared divisor
15, 221The numbers are coprime
0, 3636GCF(0, n) = |n|

When is a GCF calculator useful?

Simplify fractions

Divide the numerator and denominator by their GCF to reduce a fraction.

Ratios and proportions

Reduce a ratio to its simplest whole-number form.

Equal groups

Find the largest group size that divides several quantities evenly.

Number theory

Check whether a set of integers is coprime and explore shared factors.

GCF calculator questions

What is the greatest common factor?

The greatest common factor is the largest positive integer that divides every number in a set. For example, GCF(8, 12, 20) = 4.

Are GCF, GCD, and HCF the same?

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

How many numbers can I enter?

Enter between 2 and 50 integers. Commas, spaces, semicolons, and line breaks are all accepted.

What is the GCF of zero and a number?

For a non-zero integer n, GCF(0, n) = |n|. GCF(0, 0) is undefined because every integer divides zero.

Can I use negative numbers?

Yes. The calculator uses absolute values, so GCF(-48, 72) is 24.

What does a GCF of 1 mean?

A GCF of 1 means the integers are coprime or relatively prime. They have no shared factor greater than 1.

How does prime factorization find the GCF?

Write each integer as prime factors, keep only primes present in every factorization, and use the lowest exponent of each shared prime.

How do I find the GCF of three or more numbers?

Find the GCF of the first two numbers, then find the GCF of that result and the next number. Continue until the full list is included.

What is the difference between GCF and LCM?

The GCF is the largest shared divisor. The LCM is the smallest positive shared multiple. For two non-zero numbers, GCF × LCM = |a × b|.

Can I use decimals or fractions?

This calculator is for integers. Clear fraction denominators or convert decimal values to an equivalent whole-number ratio before finding a GCF.

Why is the GCF useful for a common denominator?

GCF helps reduce each fraction before addition. The related LCM of the denominators gives the least common denominator when fractions need to be combined.

How is GCF used to simplify fractions?

Divide both the numerator and denominator by their GCF. For 48/72, divide by 24 to get the reduced fraction 2/3.