Common Factor Calculator
List every common factor of two or more whole numbers, found from their greatest common divisor.
Common Factor Calculator
List every common factor of two or more whole numbers, found from their greatest common divisor.
How this page computes
The gcd is found by repeated Euclid steps over BigInt values. The divisor list is generated from the prime factorisation and capped at one trillion, which is stated on the page.
The calculation runs entirely in this browser tab; nothing is uploaded.
The page computes the greatest common divisor of all the numbers and lists its divisors, which are exactly the common factors. For 12 and 18 the divisor is 6 and the common factors are 1, 2, 3 and 6.
The answer is exact for whole numbers up to the stated ceiling, and all inputs are shown in the gcd line so a mistyped value is visible. Zero is handled explicitly rather than divided by.
How to use the Common Factor Calculator
Enter two or more whole numbers separated by spaces, commas or new lines, then press Run. The first line names the gcd with every input, and the second lists the common factors.
The list is complete up to sixty entries; a longer list ends with the count that was not printed. The page refuses fewer than two numbers, because a common factor needs something to be common to.
The rule this page applies
A common factor of a set of numbers divides every one of them. Every common factor divides the greatest common divisor, and every divisor of that divisor is common, so listing the divisors of the gcd is the complete answer.
The gcd is found by repeated Euclid steps over BigInt values. The divisor list is generated from the prime factorisation and capped at one trillion, which is stated on the page.
What to Expect
Best for
- Simplifying a ratio by hand
- Finding every shared factor of a set
- Checking a gcd answer
Not ideal for
- Fractions or decimals
- Sets whose gcd exceeds one trillion
- A single number on its own
What this tool keeps
- Every input and the exact gcd
What may need cleanup
- Nothing: the divisor list is complete or its remainder is counted
Common errors
- One number is refused, because a factor cannot be common to one thing
- A value above the ceiling is refused with the limit named
Example use cases
- Find the common factors of 12 and 18
- Show that 8 and 9 share only 1
Sample input
12 18
Sample output
gcd(12, 18) = 6 common factors: 1, 2, 3, 6
Who this is for
- Students simplifying fractions
- Readers checking a gcd by hand
Frequently asked questions
Why does the gcd give every common factor?
Every common factor divides the gcd, and every divisor of the gcd divides all the inputs. The two sets are therefore the same, which is why one divisor list answers the question.
What happens with a zero?
If every input is zero the page says so and reports gcd 0, because every whole number divides zero. A single zero among non-zero values does not change the gcd.
How long can the factor list be?
Up to sixty entries are printed. A number with more divisors ends with a count of the rest, so the answer is complete even when the page shortens the display.
Is anything uploaded?
Nothing is uploaded. The numbers are read and the arithmetic runs in this browser tab with JavaScript, and reloading the page discards both the input and the result.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.