Starlight Tools

Common Factor Calculator

Find common factors and the greatest common factor (GCF/GCD) for two or more integers. Everything runs locally in your browser.

Inputs & Options

Enter at least two integers, with at least one nonzero input. Use commas, spaces, semicolons, or new lines. Decimals are not accepted. Negative signs are allowed.

For very large GCF values, the calculator may skip the full factor list to keep the page responsive.

Results

Results will appear here.

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.

  1. Enter at least two integers, such as 12, 18, 30. At least one input must be nonzero.
  2. Turn on Euclidean steps if you want to see the remainder method used to find the GCF.
  3. Click Calculate to get the GCF and, when enumeration is not skipped, the shared factor list.
  4. 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}

Frequently Asked Questions

What is the difference between common factors and GCF?

Common factors are all positive divisors shared by the inputs. When at least one input is nonzero, the GCF is the largest number in that shared list.

Can I use more than two numbers?

Yes. The calculator reduces the list pair by pair using the same GCF rule, so it works for two, three, or many integers.

What happens with zero?

Zero is divisible by every nonzero integer, so the shared factors of 0, 12, 18 are the factors common to 12 and 18. If every input is zero, every positive integer is a common factor because every positive integer divides zero. There is therefore no greatest positive common factor and no finite complete list.

Why did the tool skip the full factor list?

One method for listing positive factors is trial division: test positive integers up to the square root of the GCF and include the corresponding divisor pairs. This is one method, not a universal requirement. For very large GCF values, the calculator may skip the full factor list to keep the page responsive. A skipped list means factor enumeration is incomplete, not that no common factors exist; 1 remains a common factor.

Is my data private?

The supplied information does not establish whether inputs are uploaded or stored. A separate review of runtime and storage behavior is needed before assuring that inputs are never uploaded or stored.

Explore more tools