GCF Calculator

Find the greatest common factor (GCF, also called the greatest common divisor) of two or more numbers, with the prime factorizations, Euclid's algorithm and a picture of why it works.

Answer

GCF(36, 48)

12

  • 36 = 2^2 × 3^2
  • 48 = 2^4 × 3

Simplify the fraction: 36/48 = 3/4 (divide both by 12).

The prime factors they share

36
2233
48
22223
GCF
223= 12

Each brick is one prime factor. Bright bricks are the ones every number has; multiplied together they make the GCF.

Cutting squares (Euclid’s algorithm)

36121212

Cut the biggest squares you can from a 48 × 36 rectangle, then from what’s left, and so on. The smallest squares, 12 on a side, tile the whole rectangle.

Why this answer

Three ways to find it

Prime factors. Break each number into primes and keep only what they all share, using the smallest power of each shared prime: 2^2 × 3 = 12.

Euclid’s algorithm. Any number that divides both also divides their difference, so you can keep replacing the bigger number by the remainder:

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

The last non-zero remainder, 12, is the GCF. It’s fast even for huge numbers.

List the factors. 36: 1, 2, 3, 4, 6, 9, 12, 18, 36 · 48: 1, 2, 3, 4, 6, 8, 12, 16, 24, 48. The biggest number on every list is 12.

Why it works

What is the greatest common factor?

Step 1 of 3

The biggest tile that fits

An 18 ft × 12 ft floor gets square tiles, all the same size, and no tile may be cut. Find the biggest tile that works. Tile: 1 ft fits exactly.
Find the biggest tile with no gaps.

Put it to use

Simplifying fractions, tiling and splitting into groups

Divide a fraction’s top and bottom by their GCF to simplify it in one step (36/48 → 3/4). Use it to find the largest square tile that fits a floor exactly, to cut boards into the longest equal pieces with no waste, or to split items into the largest number of identical groups (36 apples and 48 oranges make 12 identical bags of 3 apples and 4 oranges).

How it works

The GCF calculator finds the greatest common factor (also called the greatest common divisor, GCD, or highest common factor) of two to six whole numbers: the largest number that divides all of them with no remainder. It shows each number's prime factorization, Euclid's algorithm for two numbers, and the simplified fraction.

With prime factors, the GCF is the product of the primes every number shares, each taken the smallest number of times it appears. Euclid's algorithm is faster for big numbers: replace the larger number by its remainder when divided by the smaller, and repeat; the last non-zero remainder is the GCF.

If the GCF is 1, the numbers share no prime factor and are called relatively prime (or coprime).

GCF = product of shared primes, each to its smallest powerEuclid: GCF(a, b) = GCF(b, a mod b), and GCF(a, 0) = aGCF × LCM = a × b (for two numbers)Simplified fraction: a/b = (a ÷ GCF)/(b ÷ GCF)

Worked example: GCF of 36 and 48

  1. Prime factors: 36 = 2² × 3² and 48 = 2⁴ × 3.
  2. Shared primes with the smaller powers: 2² and 3¹.
  3. GCF = 2² × 3 = 12.
  4. Check with Euclid: 48 = 1 × 36 + 12, then 36 = 3 × 12 + 0, so the GCF is 12, and 36/48 simplifies to 3/4.

Common mistakes

  • Taking the largest power of each prime: that gives the LCM, not the GCF.
  • Including primes that only one of the numbers has.
  • Stopping at any common factor (like 6 for 36 and 48) instead of the greatest one (12).
  • Thinking the GCF can be bigger than the smallest number: it never is.

Frequently asked 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 as many times as it appears in every number. For 36 = 2²×3² and 48 = 2⁴×3, the GCF is 2²×3 = 12.

Is GCF the same as GCD?

Yes. Greatest common factor, greatest common divisor and highest common factor all mean the largest number that divides each of the numbers exactly.

What is Euclid's algorithm?

Divide the larger number by the smaller and keep the remainder; then divide the smaller number by that remainder, and so on. When the remainder is 0, the last divisor is the GCF. For 48 and 18: 48 = 2×18 + 12, 18 = 1×12 + 6, 12 = 2×6, so the GCF is 6.

What does a GCF of 1 mean?

The numbers have no common prime factor; they're relatively prime. For example 8 and 15. Their fraction 8/15 is already in lowest terms.

How is the GCF used to simplify fractions?

Divide the top and bottom by their GCF. 36/48: the GCF is 12, so 36/48 = 3/4, fully simplified in one step.