You need to simplify the fraction 48/18, split two lengths of rope into equal pieces with nothing wasted, or divide a batch of supplies into identical groups. Different problems, same question underneath: what is the biggest number that divides evenly into all of the numbers you were given? Answer that, and the rest of the problem usually falls into place.
This GCF calculator finds that number instantly for two or three whole numbers using the Euclidean algorithm — the fast, ancient method that replaces long divisor lists with a short chain of divisions. Enter your numbers, and you get the greatest common factor plus the step-by-step working, so you can follow the logic and show it on your homework. No signup needed.
GCF Calculator
Enter two or three whole numbers to get their greatest common factor.
1. What Is the Greatest Common Factor?
A common factor of two numbers is any number that divides both of them exactly. The common factors of 12 and 18 are 1, 2, 3, and 6 — each one divides both numbers cleanly. The greatest common factor is simply the largest one on that list: 6. Other names you will see for the same idea are greatest common divisor (GCD) and highest common factor (HCF) — they all mean exactly the same thing, so use whichever term your class uses.
The GCF is one of the most practical ideas in basic math because it answers “how big can the equal pieces be?” If you have a 48-inch board and a 30-inch board and you want to cut both into equal-length pieces with no waste, the longest possible piece is GCF(48, 30) = 6 inches. If you are simplifying 48/18, dividing top and bottom by GCF(48, 18) = 6 gives 8/3 in a single step. And if you need identical gift bags from 24 pencils and 36 erasers, GCF(24, 36) = 12 tells you that 12 bags is the maximum, with 2 pencils and 3 erasers in each.
Notice the direction: the GCF goes downward, looking for a divisor smaller than the inputs. Its partner concept, the least common multiple, goes upward to a shared multiple. When a question says “simplify” or “reduce,” it wants the GCF; when it says “add,” “subtract,” or “when do they next coincide,” it wants the LCM. Keeping those directions straight resolves most of the confusion students feel about these two.
Every pair of whole numbers has at least 1 as a common factor, so the GCF is always at least 1. When the GCF is exactly 1, the numbers are called coprime (or relatively prime) — they share nothing but 1. That special case shows up often, so it is worth recognizing: 8 and 15 are coprime, while 8 and 12 are not.
2. How to Use This GCF Calculator
The calculator takes two or three whole numbers and applies the Euclidean algorithm to them. Here is the process:
- Enter your numbers. Type two or three positive whole numbers into the input boxes. The GCF is defined for whole numbers, so leave decimals and fractions out.
- Press the calculate button. The answer appears instantly with the division chain shown underneath.
- Read the GCF. The big result is the largest number dividing every input. Sanity-check it: it can never be larger than your smallest input.
- Study the shown steps. The calculator displays each division and remainder — this is the exact working teachers expect to see, so it doubles as a study guide.
- For three numbers, watch the pairing. The calculator computes GCF(a, b) first, then combines that with the third number: GCF(a, b, c) = GCF(GCF(a, b), c). The steps make the pairing visible.
Try a few revealing examples in sequence: (12, 18), then (12, 19), then (12, 24). Watch the GCF move from 6 to 1 to 12. The second case shows coprime numbers in action, and the third shows what happens when one number divides the other — the GCF is simply the smaller number.
3. The Euclidean Algorithm, Worked Out Step by Step
The Euclidean algorithm is over two thousand years old and still the fastest way to find a GCF by hand. The idea is beautifully simple: instead of listing all the divisors of both numbers, you repeatedly replace the larger number with the remainder of dividing the larger by the smaller. When a remainder finally hits zero, the last nonzero remainder is the GCF.
Let us work through GCF(48, 18) with real arithmetic:
Step 1. Divide 48 by 18: 48 = 18 × 2 + 12. The remainder is 12.
Step 2. Divide 18 by 12: 18 = 12 × 1 + 6. The remainder is 6.
Step 3. Divide 12 by 6: 12 = 6 × 2 + 0. The remainder is 0.
Answer: The last nonzero remainder is 6, so GCF(48, 18) = 6. Verify: 48 ÷ 6 = 8 and 18 ÷ 6 = 3, both exact — and no number bigger than 6 divides both.
Why does this work? Each step preserves the set of common divisors: any number dividing both 48 and 18 also divides the remainder 12 (because 12 = 48 − 18 × 2), and vice versa. So GCF(48, 18) = GCF(18, 12) = GCF(12, 6) = GCF(6, 0) = 6. The numbers shrink every step, which is why the algorithm finishes so quickly — even for numbers with hundreds of digits, it needs only a handful of divisions.
Now a three-number example: GCF(48, 18, 30). The calculator pairs the inputs:
Step 1 — GCF(48, 18). From the chain above, this is 6.
Step 2 — GCF(6, 30). Divide 30 by 6: 30 = 6 × 5 + 0. Remainder 0, so the GCF is 6.
Answer: GCF(48, 18, 30) = 6. Check: 48 ÷ 6 = 8, 18 ÷ 6 = 3, 30 ÷ 6 = 5 — all exact. Pairing order does not matter: GCF(GCF(48, 30), 18) would give the same answer.
There is also a prime-factorization route: break each number into primes and multiply the primes they share, using the smallest exponent. 48 = 2⁴ × 3 and 18 = 2 × 3², so the shared primes are 2¹ and 3¹, giving 2 × 3 = 6. If you need the factorizations to do this, our factor calculator produces them instantly.
4. How GCF and LCM Are Related
The GCF and the least common multiple are two sides of one relationship, connected by this identity:
LCM(a, b) × GCF(a, b) = a × b
For our running example: GCF(48, 18) = 6 and LCM(48, 18) = 144, so 6 × 144 = 864 — and 48 × 18 = 864. The two sides match exactly, every time, for any pair of whole numbers.
The reason is easiest to see through prime factors. Take each prime’s exponent in the two numbers: the GCF keeps the smaller exponent, the LCM keeps the larger one. Smaller plus larger always equals the sum of the two exponents — which is precisely what multiplying the numbers does. So the product a × b splits perfectly: the overlapping, shared part lands in the GCF and the fullest version of every prime lands in the LCM.
This identity is a practical tool, not just a curiosity. It lets you verify any GCF answer: multiply it by the LCM and check that you get a × b. It also lets you compute one from the other — if a problem gives you LCM(12, 18) = 36, then GCF(12, 18) = (12 × 18) ÷ 36 = 216 ÷ 36 = 6. Our LCM calculator and this GCF calculator are built as a pair because real problems keep handing you one and asking for the other.
Two special cases are worth memorizing. When one number divides the other, the GCF is the smaller number and the LCM is the larger: GCF(7, 28) = 7, LCM(7, 28) = 28. When the numbers are coprime, the GCF is 1 and the LCM is the product: GCF(8, 15) = 1, LCM(8, 15) = 120. In both cases the identity holds: 7 × 28 = 7 × 28, and 1 × 120 = 8 × 15.
5. Tips for GCF Problems
- Check divisibility first. If the smaller number divides the larger evenly, it is the GCF — no algorithm needed. GCF(9, 27) = 9. This shortcut resolves plenty of textbook problems in one glance.
- Use the Euclidean algorithm for everything else. Listing divisors works for 12 and 18 but becomes miserable for 288 and 180. The division chain stays short no matter how big the numbers get — learn it once and use it forever.
- Simplify fractions in one step. To reduce 48/18, divide top and bottom by GCF(48, 18) = 6 to get 8/3. Using the greatest common factor — not just any common factor — means the result is fully reduced with no second pass needed. Our fraction calculator applies this automatically.
- For word problems, translate “biggest equal pieces” to GCF. Phrases like “the largest possible,” “identical groups,” and “with nothing left over” are all GCF signals. If the question instead asks when cycles line up, switch to the LCM.
- Verify with the product identity. Multiply your GCF by the LCM and confirm the result equals a × b. Ten seconds of checking beats redoing a whole problem.
- Handle three numbers by pairing. Compute GCF of the first two, then combine that result with the third — never try to track all three through one chain by hand.
6. Common Mistakes Students Make
Answering with a number bigger than the smallest input. The GCF can never exceed the smallest of your numbers. If your “GCF” of 12 and 18 is 36, you computed the LCM by mistake — swap methods.
Listing divisors instead of using the algorithm. For small numbers this works, but it is slow and easy to botch — miss one divisor and the whole answer shifts. The Euclidean algorithm has no “did I list them all?” step, which is why it is more reliable.
Stopping the Euclidean chain one step early. The GCF is the last nonzero remainder, not the zero at the end. In the 48-and-18 chain, the remainders are 12, 6, 0 — the answer is 6, not 0.
Using any common factor instead of the greatest. Simplifying 48/18 by dividing by 2 gives 24/9, which still needs reducing. Dividing by the greatest common factor (6) finishes the job in one step. Partial simplification is the most common source of lost points on fraction problems.
Mixing up GCF and LCM word problems. “Cut into the longest equal pieces” is GCF; “when do the schedules next match” is LCM. Underline the operative phrase before choosing — the numbers in both problem types can look identical.
Forgetting that 1 is always a common factor. When two numbers share nothing else, the GCF is 1 — that is a valid answer, not a sign you did something wrong. Recognizing coprime pairs quickly saves a lot of second-guessing.
7. GCF Examples at a Glance
The table below gathers the key cases, including the two special patterns. Run any row through the calculator to see the Euclidean steps.
| Numbers | Euclidean chain (remainders) | GCF | Check |
|---|---|---|---|
| 48, 18 | 48 → 18 r12 → 12 r6 → 6 r0 | 6 | 6 × 144 = 864 = 48 × 18 |
| 12, 18 | 18 → 12 r6 → 12 r0 | 6 | 12 ÷ 6 = 2, 18 ÷ 6 = 3 |
| 8, 15 | 15 → 8 r7 → 8 r1 → 7 r0 | 1 | Coprime — nothing shared but 1 |
| 7, 28 | 28 → 7 r0 | 7 | 7 divides 28, so GCF is 7 |
| 48, 18, 30 | pairwise: 6, then 30 → 6 r0 | 6 | 48 ÷ 6 = 8, 18 ÷ 6 = 3, 30 ÷ 6 = 5 |
| 100, 75 | 100 → 75 r25 → 75 r0 | 25 | 100 ÷ 25 = 4, 75 ÷ 25 = 3 |
8. Keep Going With Related Calculators
The GCF is a team player. When a problem wants the smallest shared multiple instead, the least common multiple calculator finds it with the method shown step by step. When you need the prime building blocks that power both computations, the factor calculator lists every factor and the full prime factorization. And when the goal is putting a simplified fraction on the page, the fraction calculator handles reduction and arithmetic together. For the formal treatment of the algorithm, the Wikipedia article on the Euclidean algorithm is a solid reference.