Greatest Common Factor Calculator

  • Runs in your browser
  • Nothing uploaded
  • No sign-up
GCF 12
Numbers

Two to ten, separated by commas or spaces. Up to 1,000,000,000,000 each, written without thousands separators.

Greatest common factor

12

The largest number that divides 48, 180 exactly.

Least common multiple
720
Common factors
6

Common factors: 1, 2, 3, 4, 6, 12

By prime factors

  • 482⁴ × 3
  • 1802² × 3² × 5
  • GCF2² × 3 = 12

By Euclid’s algorithm, 48 and 180

  • Step 1180 = 3 × 48 + 36
  • Step 248 = 1 × 36 + 12
  • Step 336 = 3 × 12 + 0

Updated · DRISH LABS

How do you find the greatest common factor of two numbers?

The greatest common factor (GCF, also called GCD or HCF) is the largest whole number that divides all the numbers with no remainder. To find it, break each number into primes and multiply the primes they all share, each at its lowest power: 48 = 2⁴ × 3 and 180 = 2² × 3² × 5 share 2² × 3, so the GCF is 12. Euclid’s algorithm reaches the same answer by repeated division.

How it works

  1. Type two to ten whole numbers, separated by commas or spaces — 48, 180 or 12 18 30.
  2. The greatest common factor appears as you type, with the least common multiple and how many factors the numbers share beside it.
  3. Under it is the working: each number broken into primes with the shared primes picked out, and Euclid’s divisions for the first two numbers.

Two ways to the same answer

By prime factors: write each number as a product of primes, then multiply the primes they all share, each at the lowest power it appears with. By Euclid’s algorithm: divide the larger number by the smaller, then divide the smaller by the remainder, and repeat until the remainder is zero — the last divisor is the GCF. Euclid’s way needs no factoring, which is why it stays fast for very large numbers.

gcd(a, b) = gcd(b, a mod b), gcd(a, 0) = a

When you need it

What is the GCF of 48 and 180?
12. In primes, 48 = 2⁴ × 3 and 180 = 2² × 3² × 5; they share 2² and 3, and 2² × 3 = 12. Euclid’s way agrees: 180 = 3 × 48 + 36, 48 = 1 × 36 + 12, 36 = 3 × 12 + 0.
Simplifying a fraction
Divide the top and bottom by their GCF and the fraction is in lowest terms in one step: 48/180 ÷ 12 is 4/15.
Cutting things into equal pieces
Two boards 48 cm and 180 cm long cut into equal lengths with nothing left over: the longest such length is the GCF, 12 cm, giving 4 and 15 pieces.

Questions

How do you find the greatest common factor?

Write each number as a product of primes and multiply the primes they all share, each at its lowest power. For 48 = 2⁴ × 3 and 180 = 2² × 3² × 5 that is 2² × 3 = 12. Euclid’s algorithm reaches the same answer by repeated division.

Are GCF, GCD and HCF the same thing?

Yes. Greatest common factor, greatest common divisor and highest common factor are three names for the same number: the largest whole number that divides all of them with no remainder.

What does it mean when the GCF is 1?

The numbers share no factor except 1, so they are called coprime, or relatively prime — 8 and 15, for example. A fraction made of two coprime numbers is already in lowest terms.

Can I find the GCF of more than two numbers?

Yes, up to ten here. Find the GCF of the first two, then the GCF of that answer and the next number, and so on; or take the primes every number shares. The GCF of 12, 18 and 30 is 6.

How are the GCF and the LCM related?

For two numbers, the GCF times the least common multiple equals the two numbers multiplied together. For 48 and 180: 12 × 720 = 8,640 = 48 × 180.

Why can’t I enter zero or negative numbers?

Every number divides zero, so zero adds nothing to a common factor, and factors are taught on positive whole numbers. Enter the numbers without their signs: the GCF of −12 and 18 is the GCF of 12 and 18, which is 6.

Keep going

All 31 tools