How Common Factors Work
A common factor is a positive integer that divides every input with no remainder. When at least one input is nonzero, the greatest common factor (GCF) is the largest such integer. For example, the common factors of 12 and 18 are 1, 2, 3, and 6, so their GCF is 6.
When at least one input is nonzero, this calculator first finds the GCF using the Euclidean algorithm. The positive divisors of that GCF are exactly the positive common factors of the inputs. The calculator may skip the full factor list for very large GCF values. For 12, 18, and 30, the Euclidean steps start with 18 = 1 × 12 + 6 and 12 = 2 × 6 + 0, giving gcd(12, 18) = 6. Combine this GCF with the remaining input: gcd(6, 30) = 6. The resulting positive common factors are 1, 2, 3, and 6. For additional inputs, combine the running GCF with each remaining input in turn.
Formula idea: if at least one input is nonzero and d = gcd(a, b, c, ...), then the common factors of a, b, c, ... are exactly the positive factors of d.
- Enter at least two integers, such as
12, 18, 30. At least one input must be nonzero. - Turn on Euclidean steps if you want to see the remainder method used to find the GCF.
- Click Calculate to get the GCF and, when enumeration is not skipped, the shared factor list.
- Copy or download the result for notes, worksheets, or spreadsheet work.
Assumptions: the calculator reports positive common factors. Negative numbers are converted to absolute values for factor work, since -12 and 12 share the same positive factors. If all inputs are zero, there is no finite complete common factor list. Mathematical examples (not runtime tests): Inputs GCF Positive common factors 8 and 15 1 {1} -12 and 18 6 {1, 2, 3, 6} 0 and 12 12 {1, 2, 3, 4, 6, 12}
