Home/Calculators/GCF Calculator

Greatest Common Factor Calculator

Find the GCF, HCF, or GCD of 2 or more numbers with step-by-step solutions. Three calculation methods available.

Calculate GCF

Separate numbers with commas or spaces

Quick Examples:

• GCF(8, 12, 20) = 4

• GCF(18, 30, 42) = 6

• GCF(24, 36) = 12

Enter 2 or more numbers and click Calculate

Separate numbers with commas or spaces

Understanding Greatest Common Factor (GCF)

The Greatest Common Factor (GCF), also called the Greatest Common Divisor (GCD) or Highest Common Factor (HCF), is the largest positive integer that divides evenly into all given numbers without leaving a remainder. For example, the GCF of 8, 12, and 20 is 4, because 4 is the largest number that divides into all three numbers evenly.

GCF is a fundamental concept in number theory and has practical applications in simplifying fractions, finding equivalent ratios, dividing items into equal groups, and solving real-world distribution problems. Understanding how to find the GCF helps develop mathematical reasoning and problem-solving skills essential for algebra and higher mathematics.

Our GCF Calculator provides three different methods to find the Greatest Common Factor: Prime Factorization (most comprehensive), Listing Factors (most visual), and Euclidean Algorithm (fastest for 2 numbers). Each method includes complete step-by-step explanations to help you understand the process thoroughly.

What is the Greatest Common Factor?

The GCF of a set of whole numbers is the largest positive integer that divides evenly into all numbers with zero remainder.

Example: Find GCF(8, 12, 20)

• Factors of 8: 1, 2, 4, 8

• Factors of 12: 1, 2, 3, 4, 6, 12

• Factors of 20: 1, 2, 4, 5, 10, 20

Common factors: 1, 2, 4

GCF = 4 (the greatest/largest common factor)

Key Properties:

  • • Always a positive integer
  • • At minimum, equals 1
  • • At maximum, equals the smallest input number
  • • GCF = 1 means numbers are coprime (relatively prime)
  • • Divides evenly into all input numbers

Alternate Names:

  • GCF - Greatest Common Factor
  • GCD - Greatest Common Divisor
  • HCF - Highest Common Factor
  • GCM - Greatest Common Measure
  • All refer to the same concept!

Methods to Calculate GCF

1. Prime Factorization Method (Recommended)

This method is most reliable and works well for any quantity of numbers.

Steps:

  1. 1. Find the prime factorization of each number
  2. 2. Identify the prime factors common to all numbers
  3. 3. For each common prime, take the lowest power
  4. 4. Multiply these together to get the GCF

Example: GCF(12, 18, 24)

12 = 2² × 3

18 = 2 × 3²

24 = 2³ × 3

Common primes: 2 and 3

Lowest power of 2: 2¹

Lowest power of 3: 3¹

GCF = 2¹ × 3¹ = 2 × 3 = 6

2. Listing Factors Method

This method is visual and intuitive, great for understanding what GCF means.

Steps:

  1. 1. List all factors of each number
  2. 2. Identify the factors common to all numbers
  3. 3. The largest common factor is the GCF

Example: GCF(18, 30)

Factors of 18: 1, 2, 3, 6, 9, 18

Factors of 30: 1, 2, 3, 5, 6, 10, 15, 30

Common factors: 1, 2, 3, 6

GCF = 6 (largest common factor)

3. Euclidean Algorithm (For 2 Numbers)

This is the fastest method for finding GCF of exactly two numbers.

Steps:

  1. 1. Divide the larger number by the smaller number
  2. 2. Replace the larger with the smaller, and the smaller with the remainder
  3. 3. Repeat until remainder is 0
  4. 4. The last non-zero remainder is the GCF

Example: GCF(48, 18)

48 = 18 × 2 + 12

18 = 12 × 1 + 6

12 = 6 × 2 + 0

GCF = 6 (last non-zero remainder)

How to Use This Calculator

  1. 1
    Choose a Method:

    Select Prime Factorization, Listing Factors, or Euclidean Algorithm from the dropdown. Prime Factorization is recommended for most cases.

  2. 2
    Enter Your Numbers:

    Type 2-10 positive or negative integers separated by commas or spaces. Example: "8, 12, 20" or "8 12 20".

  3. 3
    Calculate:

    Click Calculate button (or press Enter) to see the GCF, LCM, all factors, prime factorizations, and complete step-by-step solution.

  4. 4
    Study the Results:

    Review all factors, prime factorizations, and step-by-step explanation to fully understand how the GCF was calculated.

GCF vs LCM: What's the Difference?

GCF - Greatest Common Factor

  • Largest number that divides all given numbers
  • • Always ≤ the smallest input number
  • • Used for simplifying fractions
  • • Found by taking lowest powers of common prime factors
  • • Example: GCF(12, 18) = 6
  • • Application: Dividing items into equal groups

LCM - Least Common Multiple

  • Smallest number divisible by all given numbers
  • • Always ≥ the largest input number
  • • Used for adding/subtracting fractions
  • • Found by taking highest powers of all prime factors
  • • Example: LCM(12, 18) = 36
  • • Application: Finding common schedules/cycles

Important Relationship:

For any two numbers a and b: GCF(a,b) × LCM(a,b) = a × b

Example: GCF(12, 18) × LCM(12, 18) = 6 × 36 = 216 = 12 × 18 ✓

This relationship is useful for finding one value when you know the other.

Real-World Applications of GCF

📐 Simplifying Fractions

To reduce a fraction to lowest terms, divide both numerator and denominator by their GCF. Example: 18/24 = (18÷6)/(24÷6) = 3/4, where GCF(18, 24) = 6.

📦 Dividing Items Equally

To divide items into equal groups with no leftovers, use GCF. Example: 24 apples and 36 oranges can be divided into GCF(24, 36) = 12 equal gift baskets.

🎨 Arranging Objects

To arrange items in rows and columns with the same layout, use GCF. Example: 48 desks and 36 chairs can be arranged in GCF(48, 36) = 12 rows.

📏 Cutting Materials

To cut materials into largest equal pieces with no waste, use GCF. Example: Boards of 120cm and 180cm can be cut into GCF(120, 180) = 60cm pieces.

🔢 Finding Equivalent Ratios

To simplify ratios, divide by GCF. Example: The ratio 18:24 simplifies to (18÷6):(24÷6) = 3:4, where GCF(18, 24) = 6.

🏗️ Construction & Design

To find the largest tile size that fits perfectly in different areas, use GCF. Example: A 240×360 cm room uses GCF(240, 360) = 120cm tiles with no cutting.

Common Mistakes When Finding GCF

❌ Confusing GCF with LCM

Wrong: GCF(12, 18) = 36 (that's the LCM!)

Correct: GCF(12, 18) = 6 ✓

Remember: GCF is always ≤ the smallest number, LCM is always ≥ the largest number.

❌ Using Highest Powers Instead of Lowest

Wrong: For 2² and 2³, use 2³ in GCF ✗

Correct: For 2² and 2³, use 2² in GCF ✓

GCF uses lowest powers of common primes (LCM uses highest powers).

❌ Including Non-Common Factors

Wrong: GCF(12, 18) includes factor 5 because it's prime ✗

Correct: Only use factors that appear in ALL numbers ✓

A prime must divide ALL numbers to be included in the GCF.

❌ Incomplete Prime Factorization

Wrong: 12 = 2 × 6 (6 is not prime) ✗

Correct: 12 = 2² × 3 (fully factored to primes) ✓

Always break down completely into prime factors only.

❌ Stopping at First Common Factor

Wrong: GCF(12, 18) = 2 (first common factor) ✗

Correct: GCF(12, 18) = 6 (GREATEST common factor) ✓

Find ALL common factors, then choose the largest one.

Tips and Tricks for Finding GCF

Quick Check for Divisibility:

If one number divides evenly into all others, that number IS the GCF. Example: GCF(6, 12, 18) = 6 because 6 divides all three.

Use Euclidean Algorithm for 2 Numbers:

For just 2 numbers, the Euclidean Algorithm is faster and doesn't require factorization.

Co-prime Numbers:

If numbers share no common factors except 1 (co-prime), their GCF is 1. Example: GCF(7, 11) = 1.

Consecutive Numbers:

The GCF of consecutive integers is always 1. Example: GCF(15, 16) = 1.

Verify Your Answer:

The GCF should divide evenly into each original number. Quickly divide each number by your answer to check.

Even/Odd Pattern:

If all numbers are even, the GCF is at least 2. If any number is odd, the GCF cannot contain 2.

Frequently Asked Questions

What is the GCF of 0 and any number?

The GCF involving 0 is mathematically defined as the absolute value of the non-zero number, since every integer divides 0. However, for practical purposes, most calculators (including ours) don't accept 0 as an input. In standard elementary mathematics, we work only with positive integers for GCF.

Can GCF be larger than the smallest number?

No, the GCF can never be larger than the smallest number in the set. The GCF must divide evenly into all numbers, so it cannot exceed the smallest one. In fact, the GCF is at most equal to the smallest number (when that number divides all others).

What does it mean if GCF = 1?

When GCF = 1, the numbers are called "relatively prime" or "coprime." This means they share no common factors except 1. For example, GCF(8, 15) = 1. This is common with prime numbers or consecutive integers. It doesn't mean the numbers themselves are prime—just that they don't share prime factors.

What's the GCF of two prime numbers?

The GCF of two different prime numbers is always 1. Prime numbers have no factors other than 1 and themselves, so they can't share any common factors except 1. For example, GCF(7, 11) = 1, GCF(3, 5) = 1. However, GCF(7, 7) = 7 since a number and itself have that number as their GCF.

How is GCF used to simplify fractions?

To simplify a fraction, divide both the numerator and denominator by their GCF. For example, to simplify 18/24: find GCF(18, 24) = 6, then divide: 18÷6 = 3 and 24÷6 = 4, giving 3/4 in lowest terms. This ensures the fraction is reduced as much as possible.

Can you find GCF of negative numbers?

Yes, but GCF is defined as a positive integer. When calculating GCF of negative numbers, use their absolute values. For example, GCF(-12, -18) = GCF(12, 18) = 6. The GCF itself is always positive, even when the original numbers are negative.

What if all numbers are the same?

If all numbers are identical, the GCF is that number itself. For example, GCF(5, 5, 5) = 5. This makes sense because the number divides itself and is the largest number that does so. Similarly, GCF(n, n) = n for any number n.

How do I find GCF of fractions or decimals?

GCF is defined only for integers, not fractions or decimals. If you have fractions, you can find the GCF of the numerators and denominators separately. For decimals, convert them to fractions first, or multiply by a power of 10 to make them whole numbers, find the GCF, then adjust accordingly.

Which method is fastest for finding GCF?

For 2 numbers, the Euclidean Algorithm is fastest. For 3+ numbers, prime factorization is most efficient and reliable. Listing factors works well for small numbers but becomes tedious with larger numbers or many inputs. Our calculator uses the most appropriate method based on your selection.

What's the relationship between GCF and LCM?

For any two numbers a and b: GCF(a,b) × LCM(a,b) = a × b. This beautiful relationship allows you to find one if you know the other. For example, if GCF(12, 18) = 6 and LCM(12, 18) = 36, then 6 × 36 = 216 = 12 × 18. This relationship only holds for exactly two numbers.

Conclusion

Understanding the Greatest Common Factor is fundamental to mastering fractions, ratios, and many real-world mathematical applications. Whether you're a student learning to simplify fractions, a teacher preparing lessons, or someone solving practical division and distribution problems, finding the GCF is an essential skill.

Our GCF Calculator provides three powerful methods—Prime Factorization, Listing Factors, and Euclidean Algorithm—each with complete step-by-step explanations. This not only gives you quick, accurate answers but also helps you understand the underlying mathematics and learn the most efficient approaches for different situations.

Use this calculator to check your homework, learn new methods, solve real-world problems, or explore the fascinating relationships in number theory. Remember that understanding comes with practice—the more you work with GCF, the more intuitive it becomes. Master this concept, and you'll have a solid foundation for algebra, number theory, and practical problem-solving. Happy calculating!

Need Help with GCF, LCM, and Number Theory?

Our expert tutors can help you master GCF, LCM, prime factorization, fractions, and excel in mathematics. Get personalized one-on-one guidance tailored to your learning style.