GCF Calculator
Find the greatest common factor of two or more whole numbers, also called the greatest common divisor (GCD) or highest common factor (HCF). The working shows the prime factorization, Euclid’s algorithm and the factor lists.
Greatest common factor
GCF =–
How to find it
GCF chart for 1 to 12
The greatest common factor of the row and column numbers. Example: GCF(8, 12) = 4.
| GCF | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| 2 | 1 | 2 | 1 | 2 | 1 | 2 | 1 | 2 | 1 | 2 | 1 | 2 |
| 3 | 1 | 1 | 3 | 1 | 1 | 3 | 1 | 1 | 3 | 1 | 1 | 3 |
| 4 | 1 | 2 | 1 | 4 | 1 | 2 | 1 | 4 | 1 | 2 | 1 | 4 |
| 5 | 1 | 1 | 1 | 1 | 5 | 1 | 1 | 1 | 1 | 5 | 1 | 1 |
| 6 | 1 | 2 | 3 | 2 | 1 | 6 | 1 | 2 | 3 | 2 | 1 | 6 |
| 7 | 1 | 1 | 1 | 1 | 1 | 1 | 7 | 1 | 1 | 1 | 1 | 1 |
| 8 | 1 | 2 | 1 | 4 | 1 | 2 | 1 | 8 | 1 | 2 | 1 | 4 |
| 9 | 1 | 1 | 3 | 1 | 1 | 3 | 1 | 1 | 9 | 1 | 1 | 3 |
| 10 | 1 | 2 | 1 | 2 | 5 | 2 | 1 | 2 | 1 | 10 | 1 | 2 |
| 11 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 11 | 1 |
| 12 | 1 | 2 | 3 | 4 | 1 | 6 | 1 | 4 | 3 | 2 | 1 | 12 |
Need the other one? Try the LCM calculator.
Next steps
Key facts
- Price
- Free, with no sign-up and no usage limits
- Privacy
- Runs in your browser: your files and text are never uploaded
- Works on
- Any current browser on Windows, macOS, Linux, ChromeOS, Android and iPhone
- Made by
- Toolgu
- Last updated
How to find the greatest common factor
- Type two or more whole numbers, separated by commas or spaces, such as
24, 36, 60. - The GCF appears straight away, with the LCM of the same numbers beside it.
- Follow the working: the prime factorization, Euclid’s algorithm and, for numbers up to 10,000, the full lists of factors with the common ones in bold.
Three ways to find the GCF
Listing factors works for small numbers. Factors of 24: 1, 2, 3, 4, 6, 8, 12, 24. Factors of 36: 1, 2, 3, 4, 6, 9, 12, 18, 36. The largest one in both lists is 12.
Prime factorization works for any size. Break each number into primes: 24 = 2³ × 3 and 36 = 2² × 3². Take each shared prime at its lowest power: 2² × 3 = 12.
Euclid’s algorithm is fastest for big numbers: 36 = 1 × 24 + 12, then 24 = 2 × 12 + 0. The last divisor, 12, is the GCF.
Where the GCF is used
Simplifying fractions: divide the top and bottom by their GCF, so 24/36 ÷ 12 = 2/3. Sharing things into equal groups: 24 apples and 36 oranges make at most 12 identical bags. Simplifying ratios, factoring algebra like 6x + 9 = 3(2x + 3), and tiling a floor with the largest square tile that fits both sides.
Need the smallest shared multiple instead? Use the LCM calculator. To break one number into primes, try the prime number checker, and to simplify a fraction, the fraction calculator.
Frequently asked questions
What is the greatest common factor?
The largest whole number that divides each of the numbers with no remainder. The factors of 12 are 1, 2, 3, 4, 6 and 12, and those of 18 are 1, 2, 3, 6, 9 and 18, so the GCF of 12 and 18 is 6.
How do I find the GCF using prime factorization?
Write each number as a product of primes, then multiply the primes they all share, each to its lowest power. 12 = 2² × 3 and 18 = 2 × 3², so the GCF is 2 × 3 = 6.
What is Euclid’s algorithm?
A fast way to find the GCF of two numbers: divide the larger by the smaller, then divide the smaller by the remainder, and repeat until the remainder is 0. For 48 and 18: 48 = 2 × 18 + 12, 18 = 1 × 12 + 6, 12 = 2 × 6 + 0, so the GCF is 6.
Are GCF, GCD and HCF the same?
Yes. Greatest common factor (GCF), greatest common divisor (GCD) and highest common factor (HCF) are three names for the same number. US schools usually say GCF, the UK says HCF and programmers say GCD.
What does it mean if the GCF is 1?
The numbers share no factor except 1, so they are called coprime or relatively prime, like 8 and 15. A fraction whose top and bottom have a GCF of 1 is already in lowest terms.
Related tools
- LCM CalculatorLeast common multiple of two or more numbers, with steps
- Prime Number CheckerIs it prime? Prime factorization, divisors and prime lists
- Slope CalculatorSlope, equation and angle of a line from two points
- Ratio CalculatorSolve, simplify, share and scale ratios, including aspect ratios
- Proportion CalculatorSolve a/b = c/d for x with cross multiplication steps
- Roman Numeral ConverterNumbers to Roman numerals and back, with a chart
- Area CalculatorArea of triangles, circles, trapezoids and 10 more shapes
- Volume CalculatorVolume of boxes, cylinders, spheres, cones and more, in liters and gallons