GCF Calculator (Greatest Common Factor)
Enter 2 to 6 whole numbers, for example 48, 36, 60.
GCF(8, 12) = 4
- LCM: 24
- Coprime: no
Step-by-step solution
- Prime factorisation of 8: 23.
- Prime factorisation of 12: 22 × 3.
- Common prime factors, each at its lowest power: 22.
- Multiply the shared factors: 4.
- Euclid check: GCF × LCM = 4 × 24 = 96 = 8 × 12.
Example shown: the default numbers above. Change them and press Calculate.
What you get when you use this calculator
Every result includes the answer, a picture of what the answer means and the full working, so you can check the method as well as the number.
How to use the GCF Calculator
- Type your numbers into the boxes above.
- Press Calculate (or hit Enter).
- Read the highlighted answer, check the picture, then follow the numbered steps to see how it was found.
- Use Copy answer to paste the result into your homework or notes.
Formula and method
| Prime method | multiply the shared primes at their lowest power |
|---|---|
| Euclid | GCF(a, b) = GCF(b, a mod b) |
Worked examples
Example 1: 8, 12
GCF(8, 12) = 4
- Prime factorisation of 8: 23.
- Prime factorisation of 12: 22 × 3.
- Common prime factors, each at its lowest power: 22.
- Multiply the shared factors: 4.
- Euclid check: GCF × LCM = 4 × 24 = 96 = 8 × 12.
Example 2: 48, 36, 60
GCF(48, 36, 60) = 12
- Prime factorisation of 48: 24 × 3.
- Prime factorisation of 36: 22 × 32.
- Prime factorisation of 60: 22 × 3 × 5.
- Common prime factors, each at its lowest power: 22, 3.
- Multiply the shared factors: 12.
Example 3: 84, 126
GCF(84, 126) = 42
Show the steps
- Prime factorisation of 84: 22 × 3 × 7.
- Prime factorisation of 126: 2 × 32 × 7.
- Common prime factors, each at its lowest power: 2, 3, 7.
- Multiply the shared factors: 42.
- Euclid check: GCF × LCM = 42 × 252 = 10,584 = 84 × 126.
Example 4: 17, 31
GCF(17, 31) = 1
Show the steps
- Prime factorisation of 17: 17.
- Prime factorisation of 31: 31.
- The numbers share no prime factors.
- Multiply the shared factors: 1.
- Euclid check: GCF × LCM = 1 × 527 = 527 = 17 × 31.
Practice problems
Try each one on paper first, then open the answer.
Problem 1: 18, 24
GCF(18, 24) = 6
Problem 2: 45, 75
GCF(45, 75) = 15
Problem 3: 56, 98
GCF(56, 98) = 14
Problem 4: 100, 150, 250
GCF(100, 150, 250) = 50
Frequently asked questions
Are GCF, GCD and HCF the same thing?
Yes. Greatest common factor, greatest common divisor and highest common factor all mean the same number.
What is the GCF of two prime numbers?
It is 1, because two different primes share no factors other than 1.
How is the GCF used with fractions?
Divide the numerator and denominator by their GCF to reduce a fraction to lowest terms.
Learn the method
Related calculators
LCM Calculator
Find the least common multiple of two or more numbers. Shows prime factors, the method and a multiples picture.
Simplify Fractions
Reduce any fraction to its simplest form. See the GCF used, the division steps and a before-and-after picture.
Prime Factorization
Break any whole number into prime factors. Shows the factor tree, the exponent form and all factors of the number.
Calculators are for learning and general use. If a result matters (an exam, a build, a purchase), double-check it. Read the disclaimer.