Skip to content

Greatest common factor (GCF) calculator

Find the greatest common factor of two or more whole numbers, with the prime factorization of each number and the Euclidean algorithm worked out step by step.

  • Free, no limits
  • No sign-up
Everything happens in your browser; your data is never uploaded.
  • ✓ Free
  • ✓ No sign-up
  • ✓ Nothing uploaded

Next step

What to do next

How to use it

  1. Type two or more whole numbers, separated by spaces or commas.
  2. Read the GCF.
  3. Check the prime factorizations and the Euclidean algorithm steps.
Try it now

What the greatest common factor is

The greatest common factor (GCF), also called the greatest common divisor (GCD) or highest common factor (HCF), is the largest whole number that divides each of the given numbers without a remainder.

For 48 and 180, the common factors are 1, 2, 3, 4, 6 and 12, so GCF(48, 180) = 12.

The calculator accepts two or more numbers, works with numbers up to 12 digits, and shows its work. It runs in your browser; nothing is sent anywhere.

Method 1: prime factorization

Break each number into prime factors, then multiply the primes they share, each with its lowest exponent.

  • 48 = 2⁴ · 3
  • 180 = 2² · 3² · 5

Shared primes: 2 (lowest exponent 2) and 3 (lowest exponent 1).

GCF = 2² · 3 = 12

This method shows clearly why the answer works, and it extends naturally to three or more numbers. See the prime factorization calculator for factor trees of single numbers.

Method 2: the Euclidean algorithm

For two numbers, the Euclidean algorithm is faster, especially for large numbers. Divide the larger by the smaller, then repeatedly divide the previous divisor by the remainder until the remainder is 0. The last nonzero remainder is the GCF.

StepDivision
1180 = 3 · 48 + 36
248 = 1 · 36 + 12
336 = 3 · 12 + 0

The last nonzero remainder is 12. The calculator shows these steps whenever you enter exactly two numbers.

Where the GCF is used

  • Simplifying fractions: divide the numerator and denominator by their GCF. 48/180 = 4/15. The fraction calculator does this automatically.
  • Splitting into equal groups: you have 24 cookies and 36 brownies and want identical treat bags with nothing left over. GCF(24, 36) = 12, so you can make 12 bags, each with 2 cookies and 3 brownies.
  • Tiling and cutting: the largest square tile that fits a 48 × 180 inch area exactly has a 12-inch side.
  • Factoring expressions: 12x + 18 = 6(2x + 3), because GCF(12, 18) = 6.

Useful facts

  • GCF(a, b) × LCM(a, b) = a × b. For 48 and 180: 12 × 720 = 8,640 = 48 × 180. Use the LCM calculator for the other half.
  • If the GCF is 1, the numbers are relatively prime (coprime), like 8 and 15, even though neither is prime.
  • The GCF of a number and any of its multiples is the number itself: GCF(7, 21) = 7.
  • Zero is excluded here, and negative numbers are treated by their absolute value.

Common mistakes

  • Confusing GCF with LCM. The GCF is never larger than the smallest number; the LCM is never smaller than the largest.
  • Stopping too early. 4 is a common factor of 48 and 180, but not the greatest. Check the prime factorizations to be sure.
  • Using the highest exponents. For the GCF, take each shared prime with its lowest exponent; the highest exponents give the LCM.

Quick check: divide each number by your answer. If both quotients still share a factor (as 12 and 45 share 3 when you divide by 4), the answer is not the greatest common factor yet. With 12, the quotients 4 and 15 share nothing, which confirms the result.

Frequently asked questions

What is the GCF of 48 and 180?
  1. 48 = 2⁴ · 3 and 180 = 2² · 3² · 5 share 2² · 3 = 12.
Is GCF the same as GCD?

Yes. Greatest common factor, greatest common divisor and highest common factor all mean the same thing.

Can I find the GCF of three or more numbers?

Yes. Enter as many numbers as you like; the calculator uses their prime factorizations.

What does a GCF of 1 mean?

The numbers have no common factor other than 1, so they are relatively prime (coprime).

How is the GCF related to the LCM?

For two numbers, GCF × LCM equals the product of the numbers.

Last updated: November 12, 2026

Recommended

Similar tools

If GCF calculator helped, you may need these too.

See all in category →

People also use