What is the greatest common factor?
The greatest common factor is the biggest whole number that divides every number in a list with nothing left over. For 84 and 126 it’s 42, because 84 = 2 × 42 and 126 = 3 × 42, and no bigger number divides both.
The terminology varies by textbook and region. Greatest common factor (GCF), highest common factor (HCF) and greatest common divisor (GCD) all describe the same value.
Three ways to find the GCF
List the factors
Write out every factor of each number and pick the biggest one they share. For 60, 90 and 150, the shared factors are 1, 2, 3, 5, 6, 10, 15 and 30, so the GCF is 30. It’s the easiest method to understand, but the lists get long quickly.
Compare prime factors
Split each number into primes, then multiply the primes every number has, using the smallest power that appears. For 84 = 2² × 3 × 7 and 126 = 2 × 3² × 7, the shared part is 2 × 3 × 7 = 42. This is the method most schools teach, often with a Venn diagram.
Use the Euclidean algorithm
Divide the bigger number by the smaller one, then keep dividing the last divisor by the remainder until the remainder is 0. The last divisor is the GCF. For 2,856 and 1,836:
1,836 = 1 × 1,020 + 816
1,020 = 1 × 816 + 204
816 = 4 × 204 + 0
So the GCF is 204. This method avoids factoring and remains an efficient standard approach for large integers more than 2,000 years after it appeared in Euclid’s Elements. For three or more numbers, find the GCF of the first pair, combine that result with the next number and continue through the list.
Zero and negative numbers
Every nonzero integer divides 0, so adding zero to a list with nonzero values does not reduce its GCF: GCF(0, 15) = 15. This calculator treats an all-zero list as undefined because no greatest positive common divisor exists under that convention. Negative signs do not change the result; the GCF is reported as a nonnegative value, so GCF(−12, 18) = 6.
GCF and LCM
The least common multiple is the smallest positive value divisible by every number in the list. For two positive integers, their GCF multiplied by their LCM equals their product. For 12 and 18, GCF = 6 and LCM = 36, so 6 × 36 = 216 = 12 × 18. The calculator shows the LCM beside the GCF for comparison.
Where the GCF is useful
Simplifying fractions
Dividing the top and bottom of a fraction by their GCF puts it in lowest terms in one step. 84/126 divided by 42 top and bottom gives 2/3. Enter two numbers and the calculator shows the simplified fraction.
Cutting or tiling without waste
To cover a 240 cm × 180 cm floor with the largest square tiles that fit exactly, find GCF(240, 180) = 60. Tiles 60 cm across fit 4 along one side and 3 along the other, so you need 12 tiles and make no cuts.
Making identical packs
With 36 pencils, 48 stickers and 60 sweets, the most identical party bags you can make is GCF(36, 48, 60) = 12. Each bag gets 3 pencils, 4 stickers and 5 sweets, with nothing left over.