GCF Calculator
Free GCF calculator: find the greatest common factor of 2 to 10 numbers, with the full prime factorization of every number shown step by step.
GCF Calculator
Background.
The Quanta GCF calculator finds the greatest common factor of any list of 2 to 10 positive integers by prime factorization — not just the answer, but the actual factor tree for every number you entered, so you can see exactly where the result comes from. Enter the default example, 24, 36, and 60, and the calculator returns a GCF of 12, along with the full breakdown: 24 = 2³ × 3, 36 = 2² × 3², and 60 = 2² × 3 × 5, sharing 2² × 3 = 12 in common.
This calculator deliberately handles a LIST of numbers rather than only a pair, because 'find the GCF of 24, 36, and 60' — three or more numbers at once — is an extremely common classroom question (simplifying a three-term algebraic expression, splitting several different-sized groups into the largest possible equal batches) that a two-number-only tool cannot answer directly. It also deliberately uses the prime-factorization method throughout, rather than the faster Euclidean algorithm, specifically so the factor-tree working is visible: the GCF is simply the product of every prime that shows up in ALL of the numbers, raised to the smallest power it appears with in any single one of them.
What is gcf calculator?
The greatest common factor (GCF) — also called the greatest common divisor (GCD) or, in British usage, the highest common factor (HCF) — of a set of positive integers is the largest integer that divides every one of them with no remainder. By the Fundamental Theorem of Arithmetic (Hardy & Wright, 2008, An Introduction to the Theory of Numbers, 6th ed.), every integer greater than 1 has a unique prime factorization, and the GCF of several numbers is found by taking, for every prime that appears in any of their factorizations, the SMALLEST power that prime is raised to across all the numbers (MathWorld, 'Greatest Common Divisor': GCD = ∏ pᵢ^min(exponents)). A prime that is entirely absent from even one number in the list contributes nothing to the GCF, because its minimum exponent across the whole set is 0. When no prime is shared by every number at all, the GCF is 1 and the numbers are said to be coprime as a set.
How to use this calculator.
- Enter 2 to 10 positive whole numbers, separated by commas.
- Read the primary result, the greatest common factor.
- Check the shared prime factorization to see exactly which primes, and how many of each, the numbers have in common.
- Review the per-number factorization breakdown to see the full factor tree behind the result — useful for checking your own by-hand work or for a homework write-up.
- If the GCF comes back as 1, the numbers share no prime factor at all (they are coprime as a set), even if some pairs among them individually share a factor with a third number that others don't.
The formula.
Every entered number is factored into primes by trial division. The set of all primes appearing in ANY of those factorizations is collected, and for each such prime, the smallest exponent it has across every single number is found — a prime missing entirely from even one number counts as exponent 0 there, which forces the minimum, and that prime's contribution to the final answer, to 0. The GCF is the product of every remaining prime raised to that minimum shared exponent (MathWorld, 'Greatest Common Divisor'). For 24 = 2³×3, 36 = 2²×3², and 60 = 2²×3×5: the prime 2 appears with exponents 3, 2, and 2 — minimum 2; the prime 3 appears with exponents 1, 2, and 1 — minimum 1; the prime 5 appears only in 60 (exponent 0 in the other two) — excluded entirely. The GCF is therefore 2²×3¹ = 4×3 = 12.
A worked example.
A teacher wants to split 24 pencils, 36 erasers, and 60 stickers into identical goodie bags, using every item with none left over, and wants to know the largest number of bags possible. Factoring each quantity: 24 = 2³ × 3, 36 = 2² × 3², and 60 = 2² × 3 × 5. The prime 2 appears 3, 2, and 2 times respectively — the smallest count is 2. The prime 3 appears 1, 2, and 1 times — the smallest count is 1. The prime 5 appears only in 60, so it is excluded from the shared factor entirely. The greatest common factor is therefore 2² × 3¹ = 4 × 3 = 12: the teacher can make 12 identical goodie bags, each containing 24÷12=2 pencils, 36÷12=3 erasers, and 60÷12=5 stickers, using every single item with nothing left over.
Frequently asked questions.
How is this different from Quanta's LCM and GCD calculator?
What if the numbers share no prime factor at all?
Why does including the number 1 in the list always make the GCF equal to 1?
References& sources.
- [1]Hardy, G.H. & Wright, E.M. (2008). An Introduction to the Theory of Numbers, 6th ed. Oxford: Oxford University Press — the Fundamental Theorem of Arithmetic.
- [2]Weisstein, Eric W. 'Greatest Common Divisor.' MathWorld — A Wolfram Web Resource — states GCD(a,b) = ∏ pᵢ^min(αᵢ,βᵢ) with a worked prime-factorization example.
- [3]NIST Digital Library of Mathematical Functions, Chapter 27 'Functions of Number Theory'.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 313 calculators remain free
- No billing is enabled