48 Cookies. 36 Brownies. One Annoying Problem.
You're packing party bags. Each bag gets some cookies and some brownies. Every bag must be identical. No leftovers. What's the maximum number of bags you can make?
The answer is 12. And the thing that gets you there — GCF — also happens to be what keeps your bank account secure. Not an exaggeration.
What GCF Actually Means
A factor is any number that divides evenly into another. Factors of 12: 1, 2, 3, 4, 6, 12. Factors of 8: 1, 2, 4, 8.
Common factors of 12 and 8 — numbers in both lists: 1, 2, 4. The greatest of those is 4.
So GCF(12, 8) = 4. The largest number that divides into both without a remainder.
GCF and GCD (Greatest Common Divisor) mean the same thing. Mathematicians say GCD. Teachers say GCF. Same calculation either way.
Back to the cookies: GCF(48, 36) = 12. That's how many bags you can make — 4 cookies and 3 brownies each, nothing left over.
Three Ways to Find It
Method 1: List the Factors (Fine for Small Numbers)
Write out every factor of each number. Find what they share. Take 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
Tedious. Falls apart fast when numbers get larger. But it builds intuition.
Method 2: Prime Factorization
Break each number into primes. GCF is the product of shared prime factors.
GCF(360, 252)
Shared: and
More systematic. Still annoying for large numbers — factoring 3,654,921 by hand is not something anyone should do.
Method 3: Euclid's Algorithm (What Computers Actually Use)
This one is 2,300 years old and still faster than anything else. The key insight: GCF(a, b) = GCF(b, a mod b). Keep replacing until the remainder hits zero.
GCF(360, 252) via Euclid
360 = 1 × 252 + 108
252 = 2 × 108 + 36
108 = 3 × 36 + 0
Remainder = 0 → GCF = 36 ✓
Three steps. Same answer. And it works just as fast on numbers with 200 digits.
GCF Secures Your Bank Account
RSA encryption — the math behind HTTPS, the padlock in your browser, every secure login — depends on a property that comes directly from GCF.
The setup: RSA works by finding two huge primes (each ~300 digits long) and multiplying them together. Anyone can see the product. Nobody can factor it back into the original primes in any reasonable timeframe.
The security comes from the fact that Euclid's algorithm is fast at finding GCF — but factoring large numbers is brutally slow. When you log into your bank, your browser and the server exchange public keys and use GCF-based operations to establish a shared secret. An eavesdropper who sees the traffic would need to factor a 600-digit number. Current estimates: longer than the age of the universe with every computer on Earth working on it.
Two numbers with GCF = 1 are called coprime. RSA encryption specifically requires that the public key exponent and a derived value called φ(n) are coprime — GCF = 1. The algorithm checks this using Euclid's method, same one you just used on 360 and 252.
Where Else GCF Shows Up
Beyond fractions and cryptography:
- Scheduling. Two buses run routes of 12 minutes and 8 minutes. When do they align at the same stop again? Every GCF(12,8) = 4 minutes. The related concept — LCM — tells you when cycles sync. GCF and LCM are two sides of the same idea:
- Tiling. Covering a 360cm × 252cm floor with square tiles, no cutting — the largest possible tile is 36cm × 36cm. GCF(360, 252) = 36.
- Reducing fractions. . That's the actual use case most people learned — and it's the least interesting application.
Quick Questions
GCF of two prime numbers?
Always 1. Primes have no factors other than 1 and themselves. Two different primes share only 1. GCF(7, 13) = 1. These are called coprime, or relatively prime.
Can GCF be larger than both numbers?
No. GCF(a, b) ≤ the smaller of the two. If one divides the other evenly, GCF equals the smaller one: GCF(12, 36) = 12.
GCF of three or more numbers?
Apply Euclid's algorithm in pairs: GCF(a, b, c) = GCF(GCF(a, b), c). Find the first two, then take GCF of that result with the third. Works for any number of inputs.