Three ways to find the greatest common factor
1. List the factors
Write every factor of each number and pick the biggest one they share. Factors of 24: 1, 2, 3, 4, 6, 8, 12, 24. Factors of 36: 1, 2, 3, 4, 6, 9, 12, 18, 36. The largest common factor is 12. This is fine for small numbers but slow for large ones.
2. Prime factorization
Split each number into primes, then multiply the primes that appear in every number, each raised to its lowest power. For 48 = 2⁴ × 3 and 180 = 2² × 3² × 5, the shared part is 2² × 3 = 12.
3. The Euclidean algorithm
Divide the larger number by the smaller, keep the remainder, and repeat with the smaller number and the remainder until the remainder is 0. The last non-zero remainder is the GCF. For 1071 and 462: 1071 = 462 × 2 + 147, 462 = 147 × 3 + 21, 147 = 21 × 7 + 0, so the GCF is 21. This method, over 2,000 years old, is what the calculator uses because it stays fast even for 12-digit numbers.
More than two numbers
GCF(a, b, c) = GCF(GCF(a, b), c). Find the GCF of the first pair, then combine it with the next number, and so on.
Why the GCF matters
- Simplifying fractions: divide top and bottom by their GCF. 42/56 becomes 3/4 because the GCF is 14.
- Simplifying ratios: the ratio calculator uses the same idea to reduce 12:18 to 2:3.
- Factoring algebra: 6x² + 9x = 3x(2x + 3) pulls out the GCF of the coefficients.
- Equal groups: with 48 pencils and 36 erasers, the largest number of identical kits you can make is GCF(48, 36) = 12.
Least common multiple
The LCM is the smallest number every input divides into. It is what you need to add fractions with different denominators. The calculator shows it alongside the GCF.
Frequently asked questions
What is the greatest common factor?
The GCF of two or more whole numbers is the largest number that divides all of them with no remainder. The GCF of 12 and 18 is 6.
Is GCF the same as GCD and HCF?
Yes. Greatest common factor, greatest common divisor and highest common factor are three names for the same number.
How do you find the GCF using prime factorization?
Break each number into primes and multiply the primes they share, using the smallest power of each. 360 = 2³×3²×5 and 84 = 2²×3×7 share 2²×3, so the GCF is 12.
What is the GCF of two prime numbers?
1, unless they are the same prime. Numbers whose GCF is 1 are called coprime or relatively prime.
How are GCF and LCM related?
For two numbers, GCF × LCM = the product of the numbers. Since 12 × 18 = 216 and the GCF is 6, the LCM is 216 ÷ 6 = 36.
Sources and official references
- Factors and multiples (Grade 6 math) – Khan Academy
Last reviewed October 10, 2026. Results are estimates for planning; see our disclaimer.