Skip to content

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.

Try:

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.

GCF123456789101112
1111111111111
2121212121212
3113113113113
4121412141214
5111151111511
6123216123216
7111111711111
8121412181214
9113113119113
101212521211012
111111111111111
121234161432112

Need the other one? Try the LCM calculator.

Next steps

Guide: GCF and LCM: how to find them, with examples

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

  1. Type two or more whole numbers, separated by commas or spaces, such as 24, 36, 60.
  2. The GCF appears straight away, with the LCM of the same numbers beside it.
  3. 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.