GCF Calculator
The greatest common factor is the largest number that divides all of your numbers. See it two ways: by prime factorization and by the Euclidean algorithm.
How to use the gcf calculator
- Enter two or more whole numbers separated by commas.
- Read the prime factorizations and the GCF.
Examples
GCF(84, 126, 210)
Answer: 42
What the GCF is
The greatest common factor (also called GCD or HCF) of two or more numbers is the largest number that divides all of them exactly. GCF(24, 36) = 12. The calculator finds it using prime factorization and the Euclidean algorithm, and shows both.
Method 1: prime factorization
Write each number as a product of primes and multiply the primes they share, using the lowest power of each.
- Shared primes: , so .
Method 2: the Euclidean algorithm (fast for big numbers)
Repeatedly divide and keep the remainder:
The last non-zero remainder, 12, is the GCF.
Method 3: list the factors (small numbers)
The factors of 18 are 1, 2, 3, 6, 9, 18 and the factors of 27 are 1, 3, 9, 27. The largest one they share is 9.
Where you use the GCF
- Simplifying fractions: .
- Factoring algebra: .
- Sharing equally: 48 apples and 180 oranges packed into identical bags with nothing left over gives at most 12 bags.
GCF and LCM together
For two numbers, . With 48 and 180: ✓
Common mistakes
- Mixing up GCF and LCM. The GCF is never bigger than the smallest number, and the LCM is never smaller than the largest.
- Using the highest powers of shared primes. That's the LCM rule. The GCF takes the lowest.
- If two numbers share no prime factors (like 8 and 15), their GCF is 1. They're called coprime.
In real life: making identical gift bags
You have 36 pencils, 60 erasers and 84 stickers, and want to make identical gift bags with nothing left over. What's the largest number of bags you can make?
- , , .
- Shared primes with the lowest powers: .
You can make 12 bags, each with 3 pencils, 5 erasers and 7 stickers.
The GCF also helps with tiling. A 240 cm by 180 cm floor can be covered exactly with square tiles of any side that divides both lengths. The largest is GCF(240, 180) = 60 cm, which needs only tiles.
Practice problems
Try each one first, then open the answer to check your work.
1.GCF(18, 24)
Show answer
6.
2.GCF(35, 64)
Show answer
1. They share no prime factors.
3.GCF(84, 126)
Show answer
42. and .
4.GCF(16, 40, 56)
Show answer
8.
5.Factor out the GCF of .
Show answer
.
Key terms
- Factor
- A whole number that divides another exactly.
- Prime factorization
- Writing a number as a product of primes.
- Coprime
- Two numbers whose GCF is 1.
- Euclidean algorithm
- A fast method for finding the GCF by repeated division.
- Common factor
- A factor shared by two or more numbers.