Free common factor calculator
Find all common factors of two integers — enter any two numbers to see their shared factors and greatest common factor, updated live, as you type.
On this page10 sections
Common factors are divisors of both a and b. The greatest common factor (GCF) is the last value in the list.
Results are estimates. Consult a professional.
How the common factor calculator works
Common factors of two (or more) numbers are the positive integers that divide every number in the set evenly. The greatest common factor (GCF) — also called the greatest common divisor (GCD) — is the largest of those shared divisors. The calculator finds the full factor list for each number, intersects the sets, and identifies the GCF.
Worked example: common factors of 24 and 36
List the complete factor sets for both numbers, then find their intersection. The largest element of that intersection is the GCF.
Common factors for selected number pairs
The table shows common factors and GCF for frequently encountered number pairs. Pairs with a large GCF share many factors; pairs of consecutive integers always have GCF = 1.
| Pair (a, b) | Common factors | GCF |
|---|---|---|
| 12 and 18 | 1, 2, 3, 6 | 6 |
| 24 and 36 | 1, 2, 3, 4, 6, 12 | 12 |
| 30 and 45 | 1, 3, 5, 15 | 15 |
| 48 and 60 | 1, 2, 3, 4, 6, 12 | 12 |
| 36 and 48 | 1, 2, 3, 4, 6, 12 | 12 |
| 15 and 25 | 1, 5 | 5 |
| 14 and 21 | 1, 7 | 7 |
| 16 and 24 | 1, 2, 4, 8 | 8 |
Source: trial division and factor intersection
Tips for finding common factors
Common factors and GCF are used to simplify fractions, distribute items evenly, and solve ratio problems. These tips make the process more systematic.
- Use the Euclidean algorithm for large numbers — listing all factors of a 6-digit number is tedious; the algorithm GCF(a,b) = GCF(b, a mod b) reaches the answer in a handful of steps.
- GCF = 1 means the numbers are coprime — if the only common factor is 1, the two numbers share no prime factors. Consecutive integers are always coprime (e.g. GCF(8,9) = 1).
- Simplify fractions with the GCF — to reduce a/b to lowest terms, divide both numerator and denominator by GCF(a, b). This is the most direct simplification method.
- GCF from prime factorisation — express each number as a product of prime powers, then take the lowest power of each shared prime. For 24 = 2³×3 and 36 = 2²×3²: GCF = 2²×3 = 12.
- Real-world use — even distribution — to split 24 apples and 36 oranges into identical groups (each group has the same number of apples and oranges), the maximum group count is GCF(24,36) = 12 groups of 2 apples and 3 oranges.
Accuracy and limitations
Common factor calculations on positive integers are exact — integer division has no rounding error. The Euclidean algorithm terminates in at most O(log(min(a,b))) steps, making it fast even for inputs near JavaScript's safe integer limit (2⁵³ − 1 ≈ 9 × 10¹⁵). When more than two numbers are entered, the calculator computes the pairwise GCF iteratively: GCF(a,b,c) = GCF(GCF(a,b),c). Both inputs must be positive integers; zero and negative numbers are excluded from the factor definition used here.
Key terms
About this calculator
Part of our math calculators suite — explore all calculators.