About the GCF Calculator
The greatest common factor of a set of integers is the largest positive integer that divides each of them exactly. It is used to simplify fractions, factor expressions and split quantities into equal groups.
The calculator factors each number into primes and also runs the Euclidean algorithm, so you can compare a visual method with the fastest one.
What is the greatest common factor?
A factor of a whole number divides it with no remainder: the factors of 12 are 1, 2, 3, 4, 6 and 12. A common factor of several numbers divides all of them, and the greatest common factor is the largest such number. The factors of 18 are 1, 2, 3, 6, 9 and 18, so the common factors of 12 and 18 are 1, 2, 3 and 6, and the GCF is 6.
Listing factors works for small numbers but quickly becomes slow. Prime factorization and the Euclidean algorithm find the GCF without listing anything, and both work for any number of values: the GCF of three numbers is the GCF of the first two combined with the third.
How to use the GCF Calculator
- Enter two to ten whole numbers separated by commas or spaces.
- Press Find GCF.
- Read the prime factorization of each number, the shared primes, and the Euclidean algorithm divisions.
Formulas
Euclidean algorithm
From prime factorizations
Take each shared prime to its smallest power.
Link with the LCM
Worked example: 48, 180
The worked example finds the GCF of 48 and 180. Prime factorization gives and . The Euclidean algorithm divides 180 by 48 (remainder 36), then 48 by 36 (remainder 12), then 36 by 12 (remainder 0), so the GCF is 12. Taking the shared primes at their smallest powers, , confirms it, and the checks show 48 and 180 divide by 12 to give 4 and 15.
The solution below is generated by the same engine that powers the calculator above.
Final answer
How we read your problem
Find the greatest common factor (also called GCD or HCF) of the numbers.
Step-by-step solution
Prime factorization of each number
Euclidean algorithm for GCF(48, 180)
180 = 3 × 48 + 36; 48 = 1 × 36 + 12; 36 = 3 × 12 + 0
The last non-zero remainder is the GCF
Confirm with shared prime factors
Multiply the primes common to every number, each with its smallest exponent.
Formulas used
Euclidean algorithm
12 is the largest whole number that divides every number exactly.
Verification
- 48 ÷ 12 = 4
- 180 ÷ 12 = 15
Detailed explanation
Why the Euclidean algorithm works
Any number that divides both and also divides , and therefore also divides the remainder when is divided by . So the pair and the pair have exactly the same common factors. Each step makes the numbers smaller, and when the remainder reaches 0 the remaining number divides itself and 0, so it is the greatest common factor. The method needs only a handful of divisions even for very large numbers, which is why it is used in computer arithmetic and cryptography.
Where the GCF is used
Dividing a numerator and denominator by their GCF reduces a fraction to lowest terms in a single step: . In algebra the GCF of the coefficients is factored out first, as in . In word problems it answers questions such as the largest equal groups that can be made: 24 pencils, 36 erasers and 60 stickers can be packed into at most 12 identical kits, because .
Prime factorization versus the Euclidean algorithm
Prime factorization makes the structure visible: you can see exactly which primes the numbers share and why the answer is what it is, which is helpful when learning or when you also need the LCM. Its weakness is that factoring large numbers is slow. The Euclidean algorithm never factors anything; it only divides and keeps remainders, so it stays fast for numbers with dozens of digits. The calculator shows both so that each confirms the other.
Common mistakes
- Multiplying all primes that appear instead of only the shared ones.
- Using the largest exponent of a shared prime; the GCF uses the smallest.
- Concluding there is no GCF when the numbers are coprime; the GCF is then 1.
- Stopping the Euclidean algorithm one step early and reporting the last quotient instead of the last non-zero remainder.
Tips
- If one number divides all the others, it is the GCF.
- The GCF of consecutive integers is always 1.
- Use the GCF of a numerator and denominator to reduce a fraction in one step.
- Check an answer by dividing each number by it; the quotients should share no common factor other than 1.
- For three or more numbers, find the GCF of any two first, then combine that result with the next number.
Frequently asked questions
What is the greatest common factor?
It is the largest positive integer that divides every number in the set with no remainder. For 48 and 180 it is 12.
Is GCF the same as GCD and HCF?
Yes. Greatest common factor, greatest common divisor and highest common factor are three names for the same number.
How does the Euclidean algorithm work?
Divide the larger number by the smaller and keep the remainder. Replace the pair with (smaller, remainder) and repeat until the remainder is 0; the last non-zero divisor is the GCF.
What is the GCF of numbers with no common factors?
It is 1. Such numbers are called coprime or relatively prime, for example 8 and 15.
Can I find the GCF of negative numbers?
Yes. Divisibility ignores sign, so the GCF is computed from the absolute values and is always positive.
What is the GCF of a number and 0?
Every integer divides 0, so . The GCF of 0 and 0 is not defined.
How do I find the GCF of three numbers?
Find the GCF of two of them, then the GCF of that result and the third. For 24, 36 and 60: and .
How does the GCF help simplify fractions?
Divide the numerator and denominator by their GCF and the fraction is in lowest terms immediately. Since , .
Find a greatest common factor
Enter two to ten whole numbers above to see their prime factorizations, the Euclidean algorithm and the GCF, with a divisibility check.