GCF Calculator: find the greatest common factor instantly ✨

What is the greatest common factor of 48 and 36? Take 10 seconds, then reveal the answer below.
👁 Reveal the answer
Whether you are simplifying a fraction, solving a ratio problem, or splitting items into equal groups, the GCF is the tool you need. I built this calculator to give you an instant answer and show every step — so you understand the method, not just the number.
GCF Calculator
Enter 2–4 whole numbers. Leave unused fields blank.
Step-by-step solution
How to use this GCF calculator
- Type at least two positive whole numbers into the Number 1 and Number 2 fields.
- Optionally add a third or fourth number in the remaining fields.
- Click Calculate GCF (or press Enter in any field).
- Read the GCF in the result card and follow the numbered prime-factorization steps to understand why.
- The bonus LCM chip appears automatically when you enter exactly two numbers — useful for fraction work.
Quick facts about the greatest common factor
| Fact | Detail |
|---|---|
| Other names | Greatest Common Divisor (GCD), Highest Common Factor (HCF) |
| Minimum possible GCF | 1 (when numbers are coprime, e.g. 8 and 15) |
| Maximum possible GCF | The smaller of the two numbers (e.g. GCF(6, 18) = 6) |
| GCF of any number and 1 | Always 1 |
| GCF × LCM relationship | GCF(a, b) × LCM(a, b) = a × b |
| Key use case | Simplifying fractions to lowest terms |
| Algorithm used here | Prime factorization (shown step-by-step) |
In my experience teaching this concept, students who struggle with GCF almost always skip the prime factorization step and try to guess factors mentally. That works for small numbers, but falls apart at 144 and 180. Building the habit of writing out the factor tree — even when it feels slow — is the single change that makes the biggest difference. The calculator above forces that habit by showing every step.
What is the greatest common factor (GCF)?
The greatest common factor (GCF) of a set of integers is the largest positive integer that divides every number in the set with no remainder. It is also called the greatest common divisor (GCD) or highest common factor (HCF) — all three terms mean exactly the same thing.
For example, the factors of 12 are 1, 2, 3, 4, 6, 12. The factors of 18 are 1, 2, 3, 6, 9, 18. The common factors are 1, 2, 3, and 6. The greatest of those is 6, so GCF(12, 18) = 6.
The GCF is not the same as the LCM. The LCM (least common multiple) is the smallest number that both integers divide into. You need the LCM to add fractions; you need the GCF to simplify them.
The GCF formula and methods explained
There are three standard methods. The calculator uses prime factorization because it produces the clearest step-by-step explanation.
Method 1 — prime factorization (used by this calculator)
- Write the prime factorization of each number.
- Identify the prime factors that appear in all numbers.
- For each shared prime, take the lowest power that appears across all numbers.
- Multiply those primes together. The product is the GCF.
Method 2 — Euclidean algorithm (fastest for large numbers)
Divide the larger number by the smaller. Replace the larger with the smaller, and the smaller with the remainder. Repeat until the remainder is 0. The last non-zero remainder is the GCF.
Example: GCF(48, 36) → 48 ÷ 36 = 1 remainder 12 → 36 ÷ 12 = 3 remainder 0 → GCF = 12. ✅
Method 3 — listing factors (best for small numbers)
List all factors of each number, find the ones they share, and pick the largest. Simple but slow for numbers above 50.
| Symbol | Meaning | Example value |
|---|---|---|
| a, b | The input integers | 48, 36 |
| GCF(a, b) | Greatest common factor of a and b | 12 |
| p₁, p₂… | Shared prime factors | 2, 2, 3 |
| LCM(a, b) | Least common multiple | 144 |
| a × b = GCF × LCM | Key identity linking GCF and LCM | 48 × 36 = 12 × 144 = 1728 ✅ |
GCF(48, 36) — Prime Factorization Trees
─────────────────────────────────────────
48 36
/ \ / \
2 24 2 18
/ \ / \
2 12 2 9
/ \ / \
2 6 3 3
/ \
2 3
48 = 2 × 2 × 2 × 2 × 3
36 = 2 × 2 × 3 × 3
Shared primes (lowest power): 2², 3¹
GCF = 2 × 2 × 3 = 12 ✅
Worked examples (matching the calculator’s output)
- Numbers: 48, 36.
- Prime factorize: 48 = 2 × 2 × 2 × 2 × 3 | 36 = 2 × 2 × 3 × 3.
- Common prime factors (minimum powers): 2² and 3¹.
- Multiply: 2 × 2 × 3 = 12.
- ✅ GCF(48, 36) = 12. Bonus: LCM = (48 × 36) ÷ 12 = 144.
- Numbers: 60, 90, 120.
- Prime factorize: 60 = 2² × 3 × 5 | 90 = 2 × 3² × 5 | 120 = 2³ × 3 × 5.
- Common prime factors (minimum powers across all three): 2¹, 3¹, 5¹.
- Multiply: 2 × 3 × 5 = 30.
- ✅ GCF(60, 90, 120) = 30.
📐 See the Complete Geometry Formula Sheet →
Comparing the three GCF methods
| Method | Best for | Speed | Shows why? | Example (GCF of 48, 36) |
|---|---|---|---|---|
| Listing factors | Numbers < 50 | Slow | Yes | Factors of 48: 1,2,3,4,6,8,12,16,24,48. Factors of 36: 1,2,3,4,6,9,12,18,36. Largest common = 12. |
| Prime factorization | Teaching & understanding | Medium | Yes ✅ | 48 = 2⁴×3; 36 = 2²×3². Common: 2²×3 = 12. |
| Euclidean algorithm | Large numbers, programming | Fast ✅ | Less obvious | 48 mod 36 = 12; 36 mod 12 = 0. GCF = 12. |
Most textbooks teach only the listing-factors method, which completely breaks down once numbers exceed two digits. I always teach prime factorization first — it scales to any number size, connects directly to fraction simplification, and builds number sense that pays off in algebra. The Euclidean algorithm is brilliant for speed, but I save it for students who are already comfortable with the concept.
Common mistakes when finding the GCF
❌ Confusing GCF with LCM
❌ Using the highest power instead of the lowest
❌ Forgetting that GCF(n, 0) = n
❌ Stopping at a common factor instead of the greatest one
What most guides get wrong about the GCF: they present it as a purely arithmetic trick, but the GCF is actually the foundation of the entire number theory concept of divisibility. Here is the non-obvious part: the GCF of two numbers equals the GCF of either number and their difference. So GCF(48, 36) = GCF(48−36, 36) = GCF(12, 36) = 12. This is exactly why the Euclidean algorithm works — it repeatedly subtracts (via modular division) until the difference is zero. Understanding this connection turns the GCF from a memorized procedure into a logical insight you can derive from scratch on any exam.
Practical payoff: if you ever forget the algorithm, you can always reduce the problem by subtracting the smaller number from the larger, repeatedly, until both are equal — that equal value is the GCF. It is slow, but it is logically self-evident and never wrong.
The GCF-difference identity above is the one insight I wish every student knew before their first algebra class. Once you see that GCF(a, b) = GCF(a−b, b), you realize the Euclidean algorithm is not a magic trick — it is just an efficient version of repeated subtraction. That mental model makes the algorithm memorable rather than arbitrary.
Real-world uses of the GCF
- 🍕 Simplifying fractions: to reduce 36/48 to lowest terms, divide both by GCF(36, 48) = 12 → 3/4.
- 📦 Packing problems: you have 60 apples and 90 oranges. The largest equal group size with no leftovers is GCF(60, 90) = 30 groups.
- 🔧 Gear ratios and tiling: engineers use the GCF to find the largest square tile that fits a floor of given dimensions without cutting.
- 💻 Computer science: the Euclidean algorithm for GCF is one of the oldest algorithms in computing history, used in cryptography (RSA key generation) and modular arithmetic.
- 📐 Ratio simplification: a ratio of 120:180 simplifies to 2:3 by dividing both by GCF(120, 180) = 60.
Need help with related math topics? My Distance & Midpoint Formulas guide covers another set of core formulas students often mix up.
