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)
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
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.
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.
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.
Factor a polynomial
GCFs of coefficients drive the first step of polynomial factoring: 12x + 18 = 6(2x + 3) because gcd(12, 18) = 6.
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.
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
Related Calculators
Pair the common factor calculator with other math tools for ratios, radicals, percentages, and step-by-step number-theory work.
- Percentage CalculatorCalculate % of a number, percentage change, and reverse percentages.
- Scientific CalculatorAdvanced trig, log, exponent, root, factorial, and memory functions.
- Percent Error CalculatorPercent error, relative error, absolute error, accuracy, and full experimental analysis with step-by-step solutions.
- Probability CalculatorTwo-event probabilities, unions, intersections, complements, normal distribution, confidence intervals, and step-by-step solutions across five integrated tools.