GCF Calculator

Find the greatest common factor of two or more numbers, with every Euclidean-algorithm step shown so you can see exactly how the answer was reached.

Greatest common factor

How to Find the GCF

Enter any list of whole numbers to see the greatest common factor and the working.

1

Enter your numbers

Type two or more positive whole numbers separated by commas or spaces, like 12, 18, 24. Decimals are truncated and duplicates are fine.

2

The calculator reduces pairwise

It runs the Euclidean algorithm on the first two numbers, then reduces that result against the next number, and so on, until every number has been folded in.

3

Read the result and steps

The greatest common factor appears at the top, and each pairwise reduction is listed below it. Need the smallest common multiple instead? The LCM Calculator works the same list of numbers the other way.

Frequently Asked Questions

What is the GCF (greatest common factor)?
The greatest common factor (GCF), also called the greatest common divisor (GCD), of two or more numbers is the largest whole number that divides every one of them with no remainder. The GCF of 12 and 18 is 6, because 6 is the biggest number that divides both evenly — no larger number does. This calculator finds it with the Euclidean algorithm: repeatedly divide the larger number by the smaller and keep the remainder until the remainder hits zero, which stays fast even for large numbers.
What is the difference between GCF and LCM?
The GCF is the largest number that divides evenly into every number in a set, while the LCM (least common multiple) is the smallest number that every one of them divides into evenly. GCF shrinks down toward the numbers' shared factors and is used to simplify fractions; LCM grows up toward their shared multiples and is used to find a common denominator when adding fractions. For 12 and 18, the GCF is 6 and the LCM is 36. Use the LCM Calculator when you need the multiple instead of the factor.
How do you find the GCF using prime factorization?
Break each number down into its prime factors, then multiply together the primes that are common to every number, each raised to the lowest power it appears with. For 24 and 36: 24 = 2³ × 3 and 36 = 2² × 3², so the shared primes are 2² and 3¹, giving a GCF of 4 × 3 = 12. This calculator instead uses the Euclidean algorithm (repeated division), which reaches the same answer without factoring large numbers by hand first — prime factorization gets slow once the numbers get big.
How do you find the GCF of three or more numbers?
Reduce the list pairwise: find the GCF of the first two numbers, then find the GCF of that result and the third number, and keep going until every number has been folded in. Because the GCF is associative, the order you combine them in does not change the final answer. Enter all your numbers separated by commas or spaces and this calculator shows each pairwise reduction it performs to reach the result.