How to Find the Greatest Common Factor
The greatest common factor (GCF) of two or more whole numbers is the largest number that divides every one of them exactly, leaving no remainder. It is the hardest-working idea in elementary number theory: simplifying fractions, splitting things into equal groups, and solving ratio problems all come down to finding this one shared divisor. This calculator finds the GCF of any set of numbers you type in, and — just as usefully — shows three views of the working: the Euclidean algorithm steps, a prime factorization of every number, and the shared-prime construction that builds the answer directly, followed by the complete list of common factors so you can see the GCF sitting at the top of it.
The Definition, Symbol by Symbol
In the notation GCF(a, b), the letters a and b stand for any two whole numbers in your set. A factor of a number is a whole number that divides it exactly: the factors of 48 are 1, 2, 3, 4, 6, 8, 12, 16, 24 and 48. A common factor is a factor appearing in every number's list, and the greatest common factor is simply the largest entry on that shared list. One bound is worth remembering before you calculate anything: the GCF can never be larger than the smallest number you entered, because a divisor of a number cannot exceed the number itself (unless the number is 0, which this calculator excludes).
Three Ways to Find the GCF
- List the factors: write out every factor of each number, circle the shared ones, and take the largest. Reliable for small numbers; slow for big ones.
- Prime factorization: break each number into primes and multiply together the lowest power of each prime that appears in every number. This is the construction shown in the panel under the calculator.
- Euclidean algorithm: repeatedly replace the larger number with the remainder of dividing it by the smaller, until the remainder is 0. The last non-zero remainder is the GCF — the fastest method, and the one whose steps the calculator displays.
How to Use This Calculator
- Type your numbers into the single input field, separated by commas or spaces — the field starts with 48, 180, and you can enter as few as two numbers or as many as you like.
- Read the big green result, which updates as you type: that is the GCF of your whole set.
- Follow the Euclidean steps listed under the result, which work on your first pair of numbers; with three or more numbers, extra lines show each new number being folded in.
- Check the common factors list at the bottom of the result panel — the GCF is its last and largest entry.
- Scroll to the factorization panels to see each number broken into primes with every division step, and the shared-prime line that assembles the GCF from the lowest shared powers.
Worked Example 1: GCF of 48 and 180
- Factor both numbers: 48 = 2^4 × 3 and 180 = 2^2 × 3^2 × 5.
- Take the lowest power of each shared prime: 2^2 (the smaller of 2^4 and 2^2) and 3^1 (the smaller of 3^1 and 3^2). The prime 5 is not shared, so it stays out.
- Multiply: 2^2 × 3 = 4 × 3 = 12. The GCF is 12.
Euclid's method confirms it independently, exactly as the calculator displays: 180 = 48 × 3 + 36, then 48 = 36 × 1 + 12, then 36 = 12 × 3 + 0 — the last non-zero remainder is 12. And the shared factor list, 1, 2, 3, 4, 6, 12, ends at the same answer. Three methods agreeing is what a correct GCF looks like.
Worked Example 2: GCF of 24, 36 and 60
With three numbers, fold them in one at a time. First GCF(24, 36): 36 = 24 × 1 + 12 and 24 = 12 × 2 + 0, so the pair's GCF is 12. Then bring in the third number: GCF(12, 60) = 12, because 12 divides 60 exactly. So the GCF of 24, 36 and 60 is 12. Prime factorization tells the same story: 24 = 2^3 × 3, 36 = 2^2 × 3^2 and 60 = 2^2 × 3 × 5, and the lowest powers shared by all three are 2^2 × 3 = 12. Notice that 60's extra prime, 5, plays no part — a prime missing from even one number can never appear in the GCF.
GCF, GCD and HCF — Same Number, Three Names
Nothing about the mathematics changes with the name. GCF (greatest common factor) and GCD (greatest common divisor) are the standard terms in the United States, while HCF (highest common factor) is the term used in the UK, India, Pakistan and many other school systems. If your textbook or exam says HCF, this page is still the right tool — and if you also need the least common multiple, our LCM & HCF calculator computes the HCF (the same number as the GCF) and the LCM side by side, while this page goes deeper on the GCF itself: more numbers at once, the full common-factor list, and the shared-prime construction.
Where the GCF Shows Up
Simplifying fractions is the everyday use: 48/180 reduces to 4/15 precisely because the GCF of 48 and 180 is 12, and dividing top and bottom by 12 is the one-step route to lowest terms. Equal grouping is the same idea in disguise — the largest number of identical gift bags you can pack from 48 pens and 180 pencils, with nothing left over, is 12. Ratios simplify by their GCF just as fractions do, and tiling problems (the biggest square tile that fits a rectangular floor exactly) are GCF answers too.
Three Mistakes to Watch For
First, stopping at a common factor instead of the greatest one: 6 divides both 48 and 180, but settling for it leaves a fraction only half-simplified. Second, confusing the GCF with the LCM — remember the GCF divides your numbers (and is at most the smallest of them), while the LCM is divided by them (and is at least the largest). Third, expecting a big answer from coprime numbers: if the numbers share no prime factors, the GCF is 1, and that is a complete, correct result — not an error.
Putting the GCF to work on a fraction? Try our fraction calculator or find the LCM alongside with the LCM & HCF calculator.