Audited 27 Jul 2026·Last updated 27 Jul 2026·3 citations·Tier 3·0 uses

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

Comma-separated positive integers — 2 to 10 of them, each up to 1,000,000.
Greatest common factor
12
The largest positive integer that divides every number you entered, found by taking the minimum power of each shared prime factor.
Shared prime factorization
2² × 3
Prime factorization of each number
24 = 2³ × 3; 36 = 2² × 3²; 60 = 2² × 3 × 5
How many numbers
3
No shared prime factor? (1=yes, 0=no)
0

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.

  1. Enter 2 to 10 positive whole numbers, separated by commas.
  2. Read the primary result, the greatest common factor.
  3. Check the shared prime factorization to see exactly which primes, and how many of each, the numbers have in common.
  4. 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.
  5. 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.

GCF = ∏ p^min(exponents of p)

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.

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.

numbers24, 36, 60

Frequently asked questions.

How is this different from Quanta's LCM and GCD calculator?
The LCM and GCD calculator handles exactly two integers and finds their greatest common divisor using the Euclidean algorithm (repeated division), which is extremely fast but never actually factors either number — it never shows a prime factor tree. This GCF calculator instead accepts a LIST of 2 to 10 numbers at once (the common classroom question 'find the GCF of 24, 36, and 60' has no direct answer on a two-number-only tool) and computes the result via prime factorization specifically so the working — every number's own factor tree, and which primes they share — is visible, not just the final number.
What if the numbers share no prime factor at all?
Then the greatest common factor is 1, and the numbers are described as coprime (or 'relatively prime') as a set — even if some pairs among them do share a factor with each other. For example, 6, 10, and 15 have GCF 1: 6=2×3, 10=2×5, and 15=3×5 each share a prime with one of the other two numbers, but no single prime (2, 3, or 5) appears in all three factorizations simultaneously, so the overall GCF is 1.
Why does including the number 1 in the list always make the GCF equal to 1?
Because 1 has no prime factors at all — it is the empty product. Since the GCF is built from primes that appear in EVERY number's factorization, and 1 contributes zero primes, no prime can possibly be common to all the numbers once 1 is in the list. This matches the general mathematical fact that GCF(1, n) = 1 for any positive integer n.

References& sources.

  1. [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. [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. [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
Coming soon