Home » GCF Calculator

GCF Calculator

FREE ONLINE TOOL

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.

Quick answer: The greatest common factor (GCF) is the largest whole number that divides two or more numbers with no remainder. The GCF of 48 and 18 is 6, because 6 is the biggest number that divides both. The fastest way to find it is the Euclidean algorithm: divide, take the remainder, and repeat until the remainder is zero — the last nonzero remainder is the GCF.

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:

  1. 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.
  2. Press the calculate button. The answer appears instantly with the division chain shown underneath.
  3. 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.
  4. 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.
  5. 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.

NumbersEuclidean chain (remainders)GCFCheck
48, 1848 → 18 r12 → 12 r6 → 6 r066 × 144 = 864 = 48 × 18
12, 1818 → 12 r6 → 12 r0612 ÷ 6 = 2, 18 ÷ 6 = 3
8, 1515 → 8 r7 → 8 r1 → 7 r01Coprime — nothing shared but 1
7, 2828 → 7 r077 divides 28, so GCF is 7
48, 18, 30pairwise: 6, then 30 → 6 r0648 ÷ 6 = 8, 18 ÷ 6 = 3, 30 ÷ 6 = 5
100, 75100 → 75 r25 → 75 r025100 ÷ 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.

Frequently Asked Questions

What does GCF mean in math?
GCF stands for greatest common factor — the largest whole number that divides two or more numbers with no remainder. The GCF of 48 and 18 is 6. It is also called the greatest common divisor (GCD) or highest common factor (HCF); all three names mean the same thing.
How do you find the GCF of two numbers?
The fastest method is the Euclidean algorithm: divide the larger number by the smaller, then replace the larger with the remainder and repeat until the remainder is zero. The last nonzero remainder is the GCF. For 48 and 18: 48 ÷ 18 leaves 12, 18 ÷ 12 leaves 6, 12 ÷ 6 leaves 0 — so the GCF is 6.
How do you find the GCF of three numbers?
Pair them up: find the GCF of the first two numbers, then find the GCF of that result with the third number. For 48, 18, and 30: GCF(48, 18) = 6, then GCF(6, 30) = 6. The pairing order never changes the answer.
What is the difference between GCF and LCM?
The GCF goes downward to the largest divisor both numbers share (GCF of 12 and 18 is 6), while the LCM goes upward to the smallest multiple both numbers share (LCM of 12 and 18 is 36). Use the GCF for simplifying fractions; use the LCM for common denominators.
How are GCF and LCM related?
They satisfy the identity GCF(a, b) × LCM(a, b) = a × b. For 48 and 18: 6 × 144 = 864, which equals 48 × 18. This is a built-in answer checker — multiply your GCF by the LCM and confirm you get the product of the two numbers.
When do you use the GCF in real life?
Any time you need the biggest possible equal pieces: cutting boards or fabric with no waste, splitting supplies into identical groups, or simplifying a fraction in one step. Dividing 48/18 by their GCF of 6 gives 8/3 immediately — no second pass needed.
What does it mean when the GCF is 1?
It means the numbers are coprime — they share no factor besides 1. The GCF of 8 and 15 is 1. That is a valid answer, not a mistake. It also tells you something useful: for coprime numbers, the LCM is simply their product (8 × 15 = 120).
What is the GCF when one number divides the other?
It is the smaller number. Since 9 divides 27 evenly, every divisor of 9 also divides 27, so GCF(9, 27) = 9. Check for this first — it is the quickest shortcut and settles many homework problems at a glance.
Can the GCF be larger than the numbers?
No — the GCF can never exceed the smallest input number, since it must divide every input. If your computed GCF comes out larger than one of the numbers, you made an error (you likely computed the LCM instead). That single check catches the most common mix-up.
Why is the Euclidean algorithm so fast?
Each division shrinks the numbers while preserving exactly the same set of common divisors, so the problem gets smaller with every step. Even for numbers with hundreds of digits it finishes in a handful of divisions. Listing all divisors, by contrast, gets slower and more error-prone as numbers grow.
How do you simplify a fraction using the GCF?
Divide the numerator and the denominator by their GCF. For 48/18, the GCF is 6, so (48 ÷ 6)/(18 ÷ 6) = 8/3. Using the greatest common factor — rather than just any common factor — guarantees the result is fully reduced in a single step.
Is GCD the same as GCF?
Yes. GCD (greatest common divisor) and GCF (greatest common factor) describe the identical concept — “divisor” and “factor” are synonyms here. US textbooks tend to say GCF while many international curricula say HCF (highest common factor). Whichever term your class uses, the calculation is the same.

Related Tools