Connect via MCP →

Enter Calculation

enter whole numbers separated by commas

Formula

Formula: Common Factors and GCF Calculator
Show calculation steps (1)
  1. Common Factors

    Common Factors: Common Factors and GCF Calculator

    The common factors of a set are exactly the divisors of the GCF.

Advertisement

Results

Greatest Common Factor
8
GCF (greatest common divisor)
The factors of 16 are: 1, 2, 4, 8, 16
The factors of 24 are: 1, 2, 3, 4, 6, 8, 12, 24
The factors of 64 are: 1, 2, 4, 8, 16, 32, 64
The factors of 136 are: 1, 2, 4, 8, 17, 34, 68, 136
The common factors are: 1, 2, 4, 8

What This Calculator Does

This tool takes a set of two or more positive whole numbers and finds three things: the complete list of factors (divisors) of each number, the common factors shared by every number, and the greatest common factor (GCF), also known as the greatest common divisor (GCD). It is useful for simplifying fractions, factoring expressions, and homework in number theory.

Two overlapping circles showing factors of two numbers with shared factors in the middle
Common factors are the divisors shared by all the numbers; the largest is the GCF.

How to Use It

Enter your whole numbers separated by commas, for example 136, 64, 24, 16, then read the results. Each number's factor list is shown in ascending order, followed by the common factors and the single GCF value. Use only positive integers; zero, negatives, and decimals are not valid divisor inputs.

The Formula Explained

An integer d is a factor of n when \(n \bmod d = 0\). To find all factors quickly we loop i from 1 up to the square root of n; whenever i divides n, both \(i\) and \(n/i\) are factors. The GCF of a list is found pairwise with Euclid's algorithm: while b is not zero, replace (a, b) with (b, a mod b); the leftover a is the GCD. The recurrence is:

$$\gcd(a, 0) = a, \quad \gcd(a, b) = \gcd(b, \; a \bmod b)$$

A handy fact is that the common factors of the whole set are exactly the divisors of the GCF:

$$\text{CommonFactors} = \{\, d : g \bmod d = 0 \,\}, \quad g = \gcd(n_1, n_2, \dots)$$

Advertisement
Flowchart of the Euclidean algorithm repeatedly replacing numbers with the remainder
The Euclidean algorithm repeatedly replaces (a, b) with (b, a mod b) until b reaches 0.

Worked Example

For 136, 64, 24, 16: factors of 16 are 1, 2, 4, 8, 16; factors of 24 are 1, 2, 3, 4, 6, 8, 12, 24; factors of 64 are 1, 2, 4, 8, 16, 32, 64; factors of 136 are 1, 2, 4, 8, 17, 34, 68, 136. Euclid gives \(\gcd(16, 24) = 8\), then \(\gcd(8, 64) = 8\), then \(\gcd(8, 136) = 8\), so the GCF = 8. The divisors of 8 are 1, 2, 4, 8 — those are the common factors.

FAQ

Is GCF the same as GCD? Yes. "Greatest common factor" and "greatest common divisor" are two names for the same value.

What if the numbers share no factors? Every set of positive integers shares the factor 1, so the common factors are at least {1} and the GCF is at least 1. Numbers whose only common factor is 1 are called coprime.

Can I enter just one number? Yes — its factors are listed and the GCF equals that number itself.

Last updated: