What a common factor is
A common factor is any whole number that divides two or more numbers exactly, with nothing left over. Take 12 and 18: the factors of 12 are 1, 2, 3, 4, 6 and 12, and the factors of 18 are 1, 2, 3, 6, 9 and 18. Line the two lists up and four numbers appear on both: 1, 2, 3 and 6. Those four are the common factors of 12 and 18, and the complete set of them, not only the largest, is what this page finds and lists in full.
The greatest number in that shared set has its own name, the greatest common factor (GCF), and its own dedicated calculator. This page answers the wider question behind it: every number the set shares, drawn out where it fits, counted, and checked against a second method that reaches the same list a different way.
How this calculator finds them
Paste or type two or more whole numbers into the box, separated by commas, spaces or new lines, exactly as they come out of a spreadsheet column. Whenever every number entered is 10,000 or smaller, the tool writes out each number's complete factor list and lines the lists up side by side, marking in bold the factors that appear in every single one. Scan down the bold entries in any column and the answer is already there: the full list of shared factors, ready to read off, with nothing hidden or rounded away.
Above the results, a small chart compares how many factors each number has in total against how many of them are actually shared, so a long factor list and a short shared list read as visibly different things rather than two numbers competing for attention.
The shortcut: common factors are the factors of the GCF
There is a faster route to the same list that never needs a single factor written out for the original numbers. Find the greatest common factor of the whole set first, using Euclid's algorithm, then list the factors of that one, usually much smaller, number instead. Every factor of the GCF is guaranteed to be a common factor of the original numbers, and nothing else qualifies. Wikipedia's entry on the greatest common divisor states the identity directly: "the common divisors of a and b are exactly the divisors of their GCD." Mathsisfun's walkthrough of the greatest common factor shows the same result from the listing side, working through 12 and 30 to find their common factors are 1, 2, 3 and 6 before picking out the greatest of that set.
This calculator runs both routes and checks one against the other whenever it can. For 12 and 18, Euclid's algorithm gives a GCF of 6 in two short steps; listing the factors of 6 gives 1, 2, 3 and 6; and that list matches the four shared factors found by directly comparing 12's and 18's own factor lists above, exactly as the theorem promises. The two routes agree because any number dividing both 12 and 18 also has to divide their GCF, and any factor of the GCF divides both original numbers straight back, since the GCF itself divides each of them by definition.
The shortcut earns its keep once the original numbers grow large. Two eight-digit numbers are too big to list every factor of directly inside a browser without a noticeable pause, but their GCF is usually a far smaller number, and factorising that smaller number is instant. Whenever any number entered is above 10,000, this page hides the side-by-side lists automatically and switches to this shortcut instead, saying so plainly rather than guessing at a list it has no way to check.
Coprime numbers: when only 1 is shared
Sometimes the only common factor a set of numbers has is 1. 8 and 9 are the clearest small example: 8's factors are 1, 2, 4 and 8, and 9's are 1, 3 and 9, and the only number appearing on both lists is 1. Numbers in this state are called coprime, or relatively prime. That does not mean either number is prime on its own, only that nothing bigger than 1 divides every one of them; 8 is not a prime number, yet it is still coprime with 9. When this calculator finds only 1 in the shared list, it flags the set as coprime directly, rather than leaving a one-item list to make the point on its own.
Zero, and the size limit on the full lists
Zero is a valid entry, not an error, and it changes nothing about the shared list: every whole number divides 0 exactly, so 0 places no restriction on what a set has in common. Enter 0 alongside 12 and the shared factors are simply the factors of 12 (1, 2, 3, 4, 6 and 12), because 0 was never going to rule any of them out. The one genuine edge case is a list where every entry is 0; there, every whole number technically divides every entry, an infinite set this page reports plainly rather than tries to enumerate.
Every individual factor list on this page is written out in full up to 10,000. Above that, listing every factor of a number by trial division starts to feel less like arithmetic and more like typing practice, so the page switches to the GCF shortcut described above and still returns the exact shared list whenever the GCF itself stays small enough to list.
Choosing your numbers and reading the results
The input box reads a pasted list exactly as it comes: commas, spaces and new lines all count as separators, and a comma-grouped number such as 1,000 is read as one whole number rather than three. Decimals, negative numbers and anything that is not a number at all are left out of the working and listed underneath the box with the reason, so nothing goes missing without an explanation.
The results panel leads with the count of shared factors and the complete list itself, then the chart comparing total factors against shared ones. The side-by-side table beneath it, when the numbers are small enough to show, bolds every shared factor in place so the overlap is visible column by column, not only totalled up at the end. The working underneath proves the same answer a second way, using Euclid's algorithm and the GCF shortcut this page is built around.
Where shared factors come up
Splitting people or things into equal-sized, matching groups is the everyday use that comes up most. A class of 12 pupils needs pairing off with a class of 18 for a joint activity, and the largest number of identical teams that can be built from both classes, with nobody left over, is set by their common factors: 6 teams, each with 2 from the first class and 3 from the second, is the biggest split that works cleanly, since 6 is the greatest number common to both. Any smaller common factor, such as 3 or 2, still divides both classes evenly, just into more, smaller teams.
Cutting materials to a shared length follows the same logic. Two boards measuring 12 metres and 18 metres, cut into equal pieces with nothing wasted, can only be cut at a length that is a common factor of both measurements: pieces of 6 metres use the whole of both boards exactly, and so do pieces of 3, 2 or 1 metre, just in a larger number of them. A ratio calculator leans on this same shared-factor idea to reduce a ratio to its simplest terms, dividing every part of the ratio by whatever they all have in common.
For the single largest split, cut or reduction in one step, rather than the complete shared list, the Greatest Common Factor Calculator is the quicker tool, since it reports only that one biggest number.
Questions people ask
What is the difference between a common factor and the greatest common factor?
A common factor is any whole number that divides every number in a set; a set usually has several. The greatest common factor is the largest one of that shared set. This page lists every common factor; a dedicated GCF calculator gives just the largest.
How many common factors can two numbers have?
At least one, since every whole number shares the factor 1 with every other. The exact count matches however many factors their greatest common factor has, since the common factors of any set are precisely the factors of its GCF.
What are the common factors of a number and zero?
Exactly the factors of that number. Zero is divisible by every whole number, so it never rules anything out; the shared list of a and 0 is the same as the factor list of a on its own.
Why does the calculator hide the full factor lists for large numbers?
Once any number entered is above 10,000, listing its factors one by one by trial division stops being a helpful shortcut and starts being slow typing practice. The page switches to the GCF shortcut instead, which still gives the exact shared list whenever the GCF stays small enough to list.
Does the order I enter my numbers in matter?
Not for the final list of shared factors, which comes out the same whatever order the numbers are typed in. Order only affects which number is labelled first in the working and which column appears first in the side-by-side table.
What does it mean if the only common factor is 1?
It means the numbers are coprime, or relatively prime: they share no factor bigger than 1. It does not mean either number is prime by itself; 8 and 9 are coprime even though neither one is a prime number.
Does this work the same way for three or more numbers?
Yes. The common factors of the whole list are found by folding the greatest common factor across the numbers one at a time (the GCF of the first two, then that result with the third, and so on), then listing the factors of the final result, exactly as with two numbers.
Every result on this page comes from exact whole-number arithmetic; nothing here is rounded or approximated at any step.