1What the greatest common factor is (in plain words)
A factor of a number is a whole number that divides it exactly, with nothing left over. The factors of 12 are 1, 2, 3, 4, 6 and 12. When two numbers share a factor, it’s a common factor: 12 and 18 share 1, 2, 3 and 6. The biggest shared one — 6 here — is the greatest common factor, the GCF (also called GCD, greatest common divisor, or HCF, highest common factor, depending on your country and textbook — all the same animal).
Why “greatest” matters: any common factor can simplify a fraction a little, but only the greatest simplifies it completely in one move. 12/18 divided by 2 becomes 6/9 — still reducible. Divided by the GCF, 6, it lands straight at 2/3, fully simplified. That one-step property is why the GCF, out of all the common factors, earned its own name and its own calculator.
Two edge cases worth knowing now, because they confuse everyone once. If the two numbers share nothing except 1 — like 8 and 15 — the GCF is 1 and the numbers are called coprime or relatively prime (they don’t both need to be prime numbers themselves). And if one number divides the other exactly — 6 and 24 — the GCF is simply the smaller number, 6. Remember those two cases and half of all GCF exam traps are already disarmed.
2Method 1: listing factors
The first method taught in school is the most direct: list every factor of both numbers, circle the ones that appear in both lists, pick the biggest. Factors of 24: 1, 2, 3, 4, 6, 8, 12, 24. Factors of 36: 1, 2, 3, 4, 6, 9, 12, 18, 36. Common: 1, 2, 3, 4, 6, 12. GCF = 12. Done, and completely rigorous.
Listing works beautifully for small numbers — it’s how you build intuition, and the calculator shows both factor lists so you can watch the overlap happen. Its weakness is scale: listing the factors of 1,248 requires testing divisions all the way up to √1248 ≈ 35, and humans are slow, error-prone dividers. The classic mistake is missing a factor pair (writing 36’s factors and forgetting 9 × 4), which is why the pairing trick helps: factors come in pairs that multiply to the number, so find them two at a time from both ends.
Verdict: listing is the right method for numbers up to about 60, a fine checking method beyond that, and the conceptual foundation for everything else in this guide. But for three-digit numbers and up, you want sharper tools.
3Method 2: prime factorisation
Every whole number breaks down into a unique product of primes — its prime factorisation, the number’s fingerprint. 36 = 2² × 3². 48 = 2⁴ × 3. To build the GCF from fingerprints, take each prime that appears in both, at the lower of its two powers, and multiply: the shared primes are 2 (lower power 2²) and 3 (lower power 3¹), so GCF = 4 × 3 = 12. (Check by listing: yes, 12.)
The intuition is worth pausing on. A common factor must be buildable from both numbers’ prime ingredients. If one number only has two 2s, no common factor can contain three 2s — there aren’t three to go around. The GCF is exactly the largest basket you can fill from both numbers’ ingredient piles. That picture also hands you the LCM for free: take every prime at the higher power (enough for both numbers to be built from it): 2⁴ × 3² = 144… and indeed LCM(36, 48) = 144.
Prime factorisation scales to classroom-size numbers gracefully and teaches the deepest structure — it’s why many teachers prefer it. Its limit is that finding prime factors of large numbers is genuinely hard (that hardness secures the internet’s encryption, in fact). For everyday sizes, though — anything under a few thousand — it’s fast, satisfying and exact.
4Method 3: Euclid’s algorithm, the ancient shortcut
Around 300 BC, Euclid wrote down a method so good that we still use it unchanged. To find GCF(a, b): divide the bigger by the smaller, keep the remainder, and repeat with (smaller, remainder) until the remainder is 0. The last non-zero remainder is the GCF. For 48 and 180:
- 180 ÷ 48 = 3 remainder 36
- 48 ÷ 36 = 1 remainder 12
- 36 ÷ 12 = 3 remainder 0 → GCF = 12
Three divisions, no factor lists, no primes. Why does it work? Any common factor of 180 and 48 must also divide their difference combinations — in particular, the remainder when one is divided by the other. So the pair (180, 48) has exactly the same GCF as (48, 36), which has the same GCF as (36, 12), which is visibly 12. Each step shrinks the problem; the GCF rides along unchanged until it’s exposed.
This is the method the calculator uses internally, printing every step — and it’s the method computers use, because it stays fast even for enormous numbers where factorisation would take years. If you learn one GCF technique beyond listing, learn this one: it never needs you to know a single prime.
5GCF vs LCM: the pair that runs fractions
The GCF’s partner is the LCM, the least common multiple: the smallest number that both numbers divide into. They split the fraction jobs between them cleanly. GCF shrinks fractions (divide top and bottom by it to simplify). LCM grows fractions to a common size (it’s the lowest common denominator for adding and subtracting: 1/6 + 1/8 uses LCM 24, giving 4/24 + 3/24 = 7/24).
The two are joined by one of school maths’ most useful identities: a × b = GCF(a, b) × LCM(a, b). Check with 24 and 36: 24 × 36 = 864, and GCF 12 × LCM 72 = 864. So knowing either one gives you the other by a single division — the calculator shows both plus this cross-check, and the identity is the fastest error-catcher in the topic: if your GCF and LCM don’t multiply back to the product of your numbers, one of them is wrong.
A memory hook that sticks: GCF is for groups and gifts — splitting things into the biggest equal groups. LCM is for cycles meeting — buses, blinking lights, repeating schedules. Splitting → GCF. Syncing → LCM. Most “which one do I use?” confusion evaporates with those two pictures.
6Where GCF earns its keep in real life
Beyond fractions, the GCF quietly runs a family of “biggest equal split” problems. Tiling: a 48 × 36 cm panel covered by the largest possible square tiles with no cutting — GCF(48, 36) = 12 cm tiles, 4 by 3 of them. Grouping: 24 juniors and 36 seniors into the largest number of identical mixed teams with nobody left over — GCF = 12 teams of 2 juniors and 3 seniors. Ribbons, ropes and recipes: cutting 90 cm and 150 cm ribbons into the longest equal pieces (30 cm), or scaling a recipe’s 12:18 ratio to its simplest 2:3.
Programmers meet the same idea in disguise: image aspect ratios reduce by GCF (1920 × 1080 → ÷120 → 16:9), grid layouts snap to common divisors, and Euclid’s algorithm sits inside cryptography libraries. Even music hides it — polyrhythms align through the LCM while their shared pulse is the GCF of the two periods. Maths topics earn “when will I use this?” scepticism fairly often; this one had a 2,300-year head start on the question and the answers keep multiplying.
7Worked examples, step by step
GCF of 24 and 36 (listing): factors of 24 {1, 2, 3, 4, 6, 8, 12, 24}; of 36 {1, 2, 3, 4, 6, 9, 12, 18, 36}; biggest shared = 12.
GCF of 48 and 180 (Euclid): 180 mod 48 = 36; 48 mod 36 = 12; 36 mod 12 = 0 → 12. Same answer, two roads — and the LCM rides along: 48 × 180 ÷ 12 = 720.
Simplifying 84/126: GCF(84, 126): 126 mod 84 = 42; 84 mod 42 = 0 → GCF 42. Divide both by 42: 2/3. Three moves from ugly to obvious.
Three numbers, 36, 48 and 60: GCF builds pairwise — GCF(36, 48) = 12, then GCF(12, 60) = 12. (Listing works too: 12 is in all three lists.) The calculator handles lists of numbers the same way.
The coprime case: GCF(35, 64): 64 mod 35 = 29; 35 mod 29 = 6; 29 mod 6 = 5; 6 mod 5 = 1; 5 mod 1 = 0 → 1. Coprime — no simplification available, and now you know for certain instead of suspecting.
8Frequently asked questions
Are GCF, GCD and HCF the same thing?
Yes — greatest common factor, greatest common divisor and highest common factor are three names for one value. American textbooks favour GCF, British and Indian textbooks often say HCF, and mathematicians usually write GCD. If a question uses any of the three, the method is identical.
What is the GCF of two prime numbers?
1 — primes share no factors besides 1, so any two different primes are coprime. The same is true of a prime and any number that isn't its multiple (like 7 and 20). And the GCF of a prime with its own multiple is the prime itself: GCF(7, 35) = 7.
Can the GCF be bigger than both numbers?
No. A factor of a number can't exceed the number itself (except for 0, which is excluded here), so the GCF is at most the smaller of the two numbers. If your answer is bigger than the smaller input, something's wrong — usually you've found a common multiple instead of a common factor.
How do I find the GCF of three or more numbers?
Work pairwise: find the GCF of the first two, then find the GCF of that result and the third number, and so on. GCF(12, 18, 30): GCF(12, 18) = 6, then GCF(6, 30) = 6. Our calculator accepts a list of numbers and does exactly this.
Why does Euclid's algorithm work?
Because any common divisor of a and b also divides the remainder when a is divided by b. So the pair (a, b) and the pair (b, remainder) share exactly the same common divisors — including the greatest one. Each step shrinks the numbers while preserving the GCF, until a remainder of 0 exposes the answer.
What's the fastest way to check a GCF answer?
Two checks: the GCF must divide both numbers exactly (test it), and no bigger number may do so. The product rule helps too: GCF × LCM must equal the product of the two numbers. If 24 × 36 = 864 and your GCF 12 pairs with an LCM of 72, then 12 × 72 = 864 — everything agrees.
Keep exploring
The GCF is one member of a useful family. Its closest relatives:
Related guides
More step-by-step guides on this topic:
Get the GCF with every step shown
Factor lists, prime factorisation and Euclid’s algorithm side by side — plus the LCM free via the product rule. Free, private, no signup.
➗ Open the GCF Calculator100% free · No account · Private by design
