Common Factor Calculator

Find the Greatest Common Factor (GCF), Highest Common Factor (HCF), Greatest Common Divisor (GCD), and all common factors shared by multiple numbers with step-by-step explanations.

Numbers (comma-separated)

Try:

What Are Common Factors?

A common factor of two or more whole numbers is any positive integer that divides every one of them with no remainder. The common factors of 84 and 126 are 1, 2, 3, 6, 7, 14, 21, and 42 — each of those numbers divides both 84 and 126 cleanly. The largest of those shared divisors is called the Greatest Common Factor (GCF), also written as HCF (Highest Common Factor, in UK/India syllabi) and GCD (Greatest Common Divisor, in number-theory texts). All three terms refer to exactly the same number.

This calculator accepts two or more whole numbers, returns the GCF/HCF/GCD, lists every shared divisor, shows the prime factorisation of each input, and walks through three different solution methods — prime factorisation, the Euclidean algorithm, and the repeated-division ladder. It pairs well with the ratio calculator when simplifying fractions, with the percentage calculator for share-of-total questions, and with the root calculator for radical simplification, which depends on the same prime-factor mechanics.

How the Calculator Works

Parse the input list

Numbers can be separated by commas, spaces, or semicolons. The tool rejects negative values, fractions, and non-integers — common factors are only defined for positive whole numbers.

Prime-factorise each input

Every input is broken down into its prime building blocks using trial division. 84 becomes 2 × 2 × 3 × 7, 126 becomes 2 × 3 × 3 × 7, and so on. Prime factorisation is the universal fingerprint of an integer.

Match the shared primes

For every prime that appears in all inputs, the calculator picks the smallest exponent that appears across the rows. Multiplying those prime powers together gives the GCF.

Enumerate all common factors

Every common factor of the inputs is a divisor of the GCF, so the tool lists every divisor of the GCF — from 1 up to the GCF itself — and reports the total count.

6 Ways to Use This Calculator

1

Simplify a fraction

Divide numerator and denominator by their GCF to reach lowest terms. 84/126 → divide by 42 → 2/3. The calculator finds the divisor for you.

2

Reduce a ratio

Ratios like 96 : 144 : 240 simplify by dividing every term by the GCF — here that's 48, giving 2 : 3 : 5 in lowest terms.

3

Find common groupings

Splitting 60, 90, and 150 cookies into identical bags? The GCF (30) tells you the largest bag size that fits every batch with no leftovers.

4

Factor a polynomial

GCFs of coefficients drive the first step of polynomial factoring: 12x + 18 = 6(2x + 3) because gcd(12, 18) = 6.

5

Set unit pricing

When pricing products in case packs of 24, 48, and 72, the GCF (24) determines the smallest universal pack size — useful for SKU strategy.

6

Verify Euclidean steps

Switch the step-by-step explainer between Prime Factorisation, the Euclidean Algorithm, and the Repeated Division ladder to check homework against three independent methods.

Best Practices

Start with prime factorisation when the numbers are small. For inputs under a few thousand, factoring by hand is the most intuitive approach and it tells you not just the GCF but also the LCM, the divisor count, and whether the numbers are coprime — all from the same table.

Use the Euclidean algorithm for large pairs. Once the inputs run into the millions, trial-division factorisation slows down quickly. The Euclidean algorithm runs in time logarithmic in the smaller input — gcd(1,071,234, 982,617) takes only a handful of steps regardless of how prime the numbers are.

Reduce more than two numbers in pairs. The gcd is associative: gcd(a, b, c, d) = gcd(gcd(gcd(a, b), c), d). The calculator handles this folding automatically, so you can drop a list of any length without thinking about the order.

Why Common Factors Matter

Arithmetic & algebra

Every fraction simplification, every ratio reduction, and every polynomial factoring step starts with finding a common factor. It's the foundational move of school arithmetic.

Number theory & cryptography

The Euclidean algorithm for gcd underlies modular inverses, the RSA key-generation math, lattice reduction, and Diophantine analysis — gcd is the workhorse of computational number theory.

Combinatorics & tiling

The largest square tile that can pave an a × b rectangle without cuts has side gcd(a, b). The same idea generalises to packing, scheduling, and resource allocation.

Engineering & signal processing

Gear ratios, frequency synthesis, and sample-rate conversion all rely on gcd/lcm to align repeating cycles. Audio engineers use the same identity to derive minimal frame buffers.

Tricky Cases

Coprime inputs

When two numbers share no prime factors — like 15 and 28 — the GCF is 1 and the only common factor is 1. They're called coprime (or relatively prime), and they show up everywhere in number theory and modular arithmetic.

One input divides every other

If the smallest input divides all the others, the GCF equals that smallest input. gcd(7, 21, 56) = 7 because 7 cleanly divides 21 and 56.

Repeated values

gcd(12, 12, 12) = 12 — duplicates don't change the answer. The calculator accepts repeated numbers without warning because they're mathematically valid.

Prime inputs

If any input is prime, the GCF is either 1 (the prime doesn't divide the others) or that prime itself (when it divides all others). gcd(11, 33, 44) = 11; gcd(11, 21, 26) = 1.

Core Formulas

Definition

gcd(a, b) = max { d ∈ ℤ⁺ : d | a and d | b }

The greatest positive integer that divides both inputs without remainder.

Euclidean recursion

gcd(a, b) = gcd(b, a mod b), gcd(a, 0) = a

The recursive identity behind the Euclidean algorithm — gives the gcd in O(log min(a, b)) steps.

Associativity

gcd(a, b, c) = gcd(gcd(a, b), c)

Lets you fold any list of inputs into a single gcd by reducing pairs one at a time.

Prime-power form

gcd = ∏ pᵢ^min(eᵢ, fᵢ, …)

Take the smallest exponent of each shared prime across the factorisations and multiply.

gcd × lcm identity

gcd(a, b) × lcm(a, b) = a × b

Connects the two classical multiples — once you know the gcd you can compute the lcm in one step.

Divisor count

τ(n) = ∏(eᵢ + 1)

Number of positive divisors of n, derived from the prime exponents. Used in the Divisor Distribution chart above.

Common Mistakes

Confusing GCF with LCM

GCF is the largest number that divides every input; LCM is the smallest number that every input divides. They're inverse operations linked by gcd(a, b) × lcm(a, b) = ab.

Using max prime instead of min exponent

When two numbers share the prime 2 with exponents 3 and 5, the GCF takes the minimum — 2³ = 8, not the larger one. The shared prime contributes only what every input can supply.

Stopping at the smallest input

It's tempting to assume gcd(a, b, c) equals the smallest of the three, but only when that smallest input divides the others. gcd(6, 9, 12) = 3, not 6.

Forgetting that 1 is always a common factor

Every positive integer divides every other positive integer at least once — namely, by 1. So 1 is always in the common-factor list, even when the GCF is 1.

Built for students simplifying fractions, teachers preparing factor-tree examples, programmers writing modular-arithmetic libraries, and engineers reducing ratios and gear trains. Every result includes the GCF, every common factor, the prime factorisation of each input, and a step-by-step derivation in your method of choice — so you can confirm the math at every step.

Common Factor Calculator FAQs

Common factors of two or more whole numbers are the positive integers that divide each of them with no remainder. For example, the common factors of 84 and 126 are 1, 2, 3, 6, 7, 14, 21, and 42 — every one of those values divides both 84 and 126 exactly. The largest item in the list is the greatest common factor (GCF). Every integer has 1 as a common factor with every other integer, so the smallest common factor of any non-empty set is always 1.

Common factors are the full list of integers that divide every input (for 84 and 126: 1, 2, 3, 6, 7, 14, 21, 42). The GCF — Greatest Common Factor — is just the largest entry in that list (here, 42). Every common factor of the inputs is also a divisor of the GCF, which is why this calculator lists all common factors as the divisors of the GCF itself.

Yes — they're three names for the same number. GCF (Greatest Common Factor) is the standard term in US math curricula, HCF (Highest Common Factor) is used in UK and Indian textbooks, and GCD (Greatest Common Divisor) is the term used in number theory and computer science. The calculator reports the same value under all three labels so it matches whichever syllabus you're working from.

Compute the GCF first — then list every divisor of the GCF. Because every common factor of the inputs must divide their GCF, that one list captures all of them. For 84, 126, 210, 294 the GCF is 42, and the divisors of 42 are 1, 2, 3, 6, 7, 14, 21, 42 — exactly the set of common factors. This calculator does the GCF first, then enumerates divisors using the √n method (test only up to √GCF, pair each divisor with its complement).

Mathematically every divisor has a negative twin — −2 divides 84 just as 2 does — but by convention the 'factors' and 'GCF' of positive integers refer only to positive divisors. This calculator follows that convention; you'll never see a negative entry in the common-factor list, and it rejects negative inputs because GCF is defined only for non-negative integers (and only non-zero inputs give a finite, positive GCF).

Divide both the numerator and the denominator of a fraction by their GCF to reach lowest terms in one step. For 84/126, the GCF is 42, so 84 ÷ 42 = 2 and 126 ÷ 42 = 3, giving 2/3. You can also divide by any common factor and repeat — but using the GCF gets you to the simplest form immediately. The same principle works for simplifying ratios: divide every term of a : b : c by gcd(a, b, c).

Two different primes share no common factor other than 1, because each prime has only two divisors — 1 and itself. So gcd(7, 11) = 1, gcd(13, 17) = 1, gcd(2, 3, 5, 7) = 1. Numbers whose only common factor is 1 are called coprime (or relatively prime). When all your inputs are distinct primes, the GCF is always 1 and the common-factor list contains just {1}.

Yes — the calculator accepts any number of inputs (two or more) and reduces them pairwise using the identity gcd(a, b, c, d, …) = gcd(gcd(gcd(a, b), c), d, …). This works because gcd is associative. The Euclidean algorithm runs once for each new input, so even long lists are fast. The Repeated Division ladder method handles the whole list in one column at a time and is especially good for spotting which primes contribute to the final GCF.

Use prime factorisation for small numbers when you want to also see the LCM and divisor count from the same table. Use the Euclidean algorithm for large inputs (millions or billions), since it runs in time logarithmic in the smaller input regardless of how the numbers factor. Use the repeated-division ladder when you have many inputs and want a visually compact derivation that handles every value in parallel. The calculator returns the same GCF in all three cases — it's just three different explanations.

A GCF of 1 means the inputs share no prime factor — they're coprime (or relatively prime). Coprime numbers crop up everywhere in number theory: any fraction a/b is already in lowest terms when gcd(a, b) = 1; two coprime moduli let you apply the Chinese Remainder Theorem; consecutive integers are always coprime. The common-factor list still contains 1 because every positive integer is divisible by 1.