GCF Calculator

Greatest common factor (HCF/GCD) of two or more numbers.

Loading calculator…

Use this GCF calculator to find the greatest common factor of two or more whole numbers. For two numbers, it shows Euclid’s method one line at a time. For three or more, it breaks each number into prime factors and shows which ones they share. It also gives the least common multiple for reference.

The greatest common factor is also called the highest common factor (HCF) in the UK and the greatest common divisor (GCD) in higher maths. All three names mean the same thing.

Quick answer: the GCF is the largest number that divides all your numbers exactly. To find it, list the prime factors of each number and multiply the ones they all share. 48 = 2⁴ × 3 and 180 = 2² × 3² × 5 share 2² × 3, so the GCF is 12.

How to Use the GCF Calculator

  1. Enter two or more whole numbers, separated by commas, such as 48, 180, 72.
  2. Read the greatest common factor, and the LCM for reference.
  3. Follow the steps: Euclid’s method for two numbers, or prime factorization for three or more.

Three Ways to Find the GCF

1. List the factors (good for small numbers)
Factors of 12: 1, 2, 3, 4, 6, 12. Factors of 18: 1, 2, 3, 6, 9, 18. The largest in both lists is 6.

2. Prime factorization (good for three or more numbers)
Break each number into primes and multiply the primes they all share, using the lowest power of each.
48 = 2⁴ × 3, 180 = 2² × 3² × 5, 72 = 2³ × 3². All three share 2² and 3, so the GCF is 4 × 3 = 12.
The prime factorization calculator gives the factors of any number.

3. Euclid’s method (fastest for two large numbers)
Divide the larger number by the smaller, then keep dividing the last divisor by the remainder until the remainder is 0.

For 180 and 48:

  • 180 = 3 × 48 + 36
  • 48 = 1 × 36 + 12
  • 36 = 3 × 12 + 0

The last non-zero remainder is 12.

Where the GCF Is Used

  • Simplifying fractions: divide the top and bottom by their GCF. 84/126 ÷ 42 = 2/3. The simplify fractions calculator does this for you.
  • Simplifying ratios: 24:36 ÷ 12 = 2:3, using the ratio calculator.
  • Splitting into equal groups: 48 pencils and 180 erasers can be packed into at most 12 identical kits, each with 4 pencils and 15 erasers.
  • Cutting to equal lengths: boards of 180 cm and 48 cm can both be cut into 12 cm pieces with no waste.
  • Factoring algebra: 12x + 18 = 6(2x + 3).

GCF vs LCM

GCFLCM
MeaningLargest number that divides into all of themSmallest number they all divide into
For 12 and 18636
Used forSimplifying fractions and ratios, equal groupsCommon denominators, repeating schedules

For two numbers, GCF × LCM = the two numbers multiplied together: 6 × 36 = 12 × 18 = 216. To find the least common multiple, use the LCM calculator.

GCF Calculator FAQs

What is the GCF of two prime numbers?

1, unless they are the same prime. Numbers whose GCF is 1 are called coprime.

Is GCF the same as HCF and GCD?

Yes. GCF (greatest common factor) is common in the US, HCF (highest common factor) in the UK, and GCD (greatest common divisor) in higher maths and programming.

Can the GCF be one of the numbers?

Yes, when that number divides all the others. The GCF of 12 and 36 is 12.

What is the GCF of 0 and a number?

The number itself, because every number divides 0. The GCF of 0 and 15 is 15.

How we checked this page: every GCF was confirmed by both prime factorization and Euclid’s method, and matches the calculator.

Scroll to Top