GCF Calculator – Free Greatest Common Factor Finder with Steps

Illustration of using the GCF calculator to find the greatest common factor

Use this free tool to find the greatest common factor of two or more positive integers. Enter your numbers, calculate the result, and see step-by-step work using prime factorization and the Euclidean algorithm.

If you need to calculate GCF for homework, simplify a fraction, compare GCF and LCM, or check the GCF of 3 numbers, this page gives you both the answer and the method behind it.

🧮 Greatest Common Factor Calculator

Enter two or more positive integers separated by commas

What Is the Greatest Common Factor (GCF)?

The greatest common factor, or GCF, is the largest positive integer that divides two or more numbers evenly. For example, the greatest common factor of 12 and 18 is 6 because 6 is the largest number that divides both numbers without a remainder.

Diagram showing common factors shared by two numbers

You can calculate GCF by listing factors, using prime factorization, or applying the Euclidean algorithm. The best method depends on how large the numbers are and whether you want a quick answer or a clear explanation.

GCF vs GCD vs HCF — are they the same?

Yes. GCF, GCD, and HCF usually mean the same thing. GCF means greatest common factor. GCD means greatest common divisor. HCF means highest common factor. Different textbooks and regions may use different names, but all three refer to the largest number that divides the given numbers evenly.

How to Use This GCF Calculator in 3 Steps

Use this section if you are wondering how to find GCF on calculator tools without doing every step by hand.

  1. Step 1 – Enter two or more numbers Enter two or more positive integers separated by commas. Example: 330, 75, 450, 225. You can use this as a GCF of 3 numbers calculator, or add more numbers if your problem includes a longer set. For the set above, the calculator returns a GCF of 15.
  2. Step 2 – See the GCF with step-by-step work Click calculate to see the GCF result. The tool shows step-by-step work so you can understand how the answer was found, not just copy the final number. This is helpful if you need a GCF calculator with steps or a tool that shows work for checking homework.Screenshot of GCF calculator results with step-by-step work
  3. Step 3 – Use the result (simplify, factor, reduce) Once you have the GCF, you can use it to simplify fractions, reduce ratios, factor common numbers, or prepare for an LCM calculation. For example, if the GCF of 18 and 24 is 6, you can divide both numbers by 6 to reduce 18/24 to 3/4.

Key Insights About GCF

  • Multiple Calculation Methods: The GCF can be calculated using various methods including listing all factors, prime factorization, or the Euclidean algorithm. Each method has its advantages depending on the size and number of integers involved.
  • Essential for Fraction Simplification: The GCF is crucial for reducing fractions to their simplest form. By dividing both the numerator and denominator by their GCF, you obtain the simplified fraction.
  • Applications in Cryptography: The GCF and related algorithms play a vital role in modern cryptography, particularly in RSA encryption and other number-theory-based security systems.
  • Always a Positive Integer: The GCF is always a positive integer, and for any set of numbers, the GCF is at least 1 (since 1 divides all integers).
  • Efficiency Matters: For small numbers, prime factorization is intuitive and easy to understand. For larger numbers, the Euclidean algorithm is more efficient and computationally faster.

How to Find the GCF (3 Methods)

There are three common ways to calculate the GCF: listing the factors, using prime factorization, and using the Euclidean algorithm. Each one gives the same answer, so how to calculate the GCF really comes down to which method fits your numbers.

Method 1 – Listing the factors

List all factors of each number, then choose the largest factor they share. This is the manual method behind any find the GCF calculator, and it is the easiest way to check a result by hand.

Example: find the GCF of 12 and 18. Factors of 12: 1, 2, 3, 4, 6, 12. Factors of 18: 1, 2, 3, 6, 9, 18. The common factors are 1, 2, 3, and 6. The GCF is 6.

This method is simple for small numbers and is a good way to learn what "common factor" means.

Method 2 – Prime factorization

Break each number into prime factors, then multiply the shared prime factors using the lowest powers.

Example: 12 = 2² × 3 and 18 = 2 × 3². The shared prime factors are 2 and 3, so: 2 × 3 = 6. The GCF is 6.

Prime factorization is useful when you want to see the structure of each number and understand why the answer works.

Method 3 – Euclidean algorithm

The Euclidean algorithm is efficient for larger numbers. Divide the larger number by the smaller number, then keep replacing the larger number with the smaller number and the smaller number with the remainder.

Example: find the GCF of 48 and 18. 48 = 18 × 2 + 12, then 18 = 12 × 1 + 6, then 12 = 6 × 2 + 0. The last non-zero remainder is 6, so the GCF is 6.

Factor Out the GCF of Variables, Monomials & Polynomials

A factoring GCF calculator helps with the same core idea: find the largest factor shared by every term, then factor it out. For a numeric expression: 6 + 12 = 6(1 + 2). For an algebraic expression: 6x + 12 = 6(x + 2).

For monomials and polynomials, the GCF may include numbers, variables, or both. Example: 8x² + 12x = 4x(2x + 3). This page's calculator focuses on numeric GCF for positive integers. If you are looking for a factor out GCF calculator for variables, monomials, or polynomials, use the same rule: find the shared numerical factor and the shared variable part with the lowest exponent.

GCF and LCM Calculator – Find Both Together

A GCF and LCM calculator helps you compare two related ideas. GCF is the greatest number that divides the given numbers evenly. LCM is the smallest number that the given numbers divide into evenly.

For two positive integers:

GCF × LCM = product of the two numbers

Example: for 12 and 18: GCF = 6, LCM = 36, 12 × 18 = 216.

The relationship between GCF and LCM

That formula is more than a trick. Because every prime factor of the two numbers ends up in either the GCF (the shared part) or the LCM (the combined part), multiplying them always rebuilds the original product. So if you already know the GCF, you can find the LCM fast:

LCM = (a × b) ÷ GCF

For 12 and 18: (12 × 18) ÷ 6 = 216 ÷ 6 = 36.

Note that this shortcut works cleanly for two numbers. For three or more, calculate the LCM directly instead of dividing the full product by the GCF.

Simplify Fractions Using the GCF

Simplifying fractions using the GCF is one of the most common reasons people reach for a GCF fraction calculator. The idea is simple: divide the numerator and the denominator by their GCF, and the fraction is reduced to lowest terms in one step.

Example: reduce 24/36. The GCF of 24 and 36 is 12. 24 ÷ 12 = 2, 36 ÷ 12 = 3. So 24/36 simplifies to 2/3.

If you divide by a common factor that is not the greatest one, you will still need to simplify again. Using the GCF gets you to lowest terms immediately, which is why it is the cleanest method for reducing any fraction.

Find the GCF of 3 or More Numbers

A GCF of 3 numbers calculator works the same way as it does for two numbers. The GCF of a longer set is the largest integer that divides every number in the set. By hand, the easiest approach is to take the GCF two numbers at a time: find GCF(a, b), then find GCF of that result and c.

Find GCF(a, b), then find GCF of that result and c.

Example: find the GCF of 24, 36, and 60. GCF(24, 36) = 12, then GCF(12, 60) = 12. So the GCF of 24, 36, and 60 is 12.

This pairwise method scales to any number of values, and it is exactly what the calculator does internally when you enter a longer set.

Worked Examples – Common GCF Calculations

These are some of the GCF pairs people look up most often. Each one is worked the short way so you can check your own answer quickly.

NumbersShared factorsGCF
12 and 181, 2, 3, 66
8 and 121, 2, 44
16 and 241, 2, 4, 88
18 and 241, 2, 3, 66
15 and 251, 55
24 and 361, 2, 3, 4, 6, 1212

For the most common classroom example, the GCF of 12 and 18 is 6, because 6 is the largest number that divides both 12 and 18 without leaving a remainder.

Coprime numbers — when the GCF is 1

Sometimes two numbers share no common factor other than 1. When that happens, the GCF is 1, and the numbers are called coprime (or relatively prime).

Example: 8 and 15. Factors of 8: 1, 2, 4, 8. Factors of 15: 1, 3, 5, 15. The only shared factor is 1, so the GCF of 8 and 15 is 1. A fraction like 8/15 is already in lowest terms, because there is nothing left to divide out.

Real-World Applications of GCF

  • Simplifying Fractions: Reduce fractions to their lowest terms by dividing both numerator and denominator by their GCF.
  • Finding Common Denominators: When adding or subtracting fractions, the GCF helps find the least common multiple (LCM) for common denominators.
  • Solving Algebraic Equations: Factor out the GCF from polynomial expressions to simplify and solve equations more easily.
  • Number Theory and Cryptography: The GCF is fundamental in algorithms used for encryption, digital signatures, and secure communications.
  • Optimization Problems: In computer science, the GCF is used to optimize algorithms, reduce computational complexity, and solve problems involving divisibility and modular arithmetic.

GCF Calculator FAQ

How to calculate the GCF of two numbers?

List the factors of each number and pick the largest one they share. For bigger numbers, prime factorization or the Euclidean algorithm is faster. The calculator above does all three and shows the work.

What is the GCF of 12 and 18 (and other common pairs)?

The GCF of 12 and 18 is 6. Other frequent ones: 8 and 12 give 4, 16 and 24 give 8, and 24 and 36 give 12. The pattern is always the same, just the largest shared factor.

Can this calculator factor the GCF out of an expression?

No. This tool finds the numeric GCF of positive integers. To factor a GCF out of an algebraic expression like 6x + 12, find the shared factor (6) and rewrite it as 6(x + 2) using the rule explained above.

What's the difference between GCF and LCM?

The GCF is the largest number that divides your values. The LCM is the smallest number they all divide into. GCF goes down to the shared part, LCM builds up to the common multiple. They are linked by GCF × LCM = the product of the two numbers.

Does the calculator show the steps and work?

Yes. Every result comes with step-by-step work, so you can see how the GCF was found through factoring or the Euclidean method. That makes it easy to check homework instead of just copying an answer.

Can the GCF ever be 1?

Yes, and it is more common than you might think. When two numbers share no factor besides 1, they are coprime. The GCF of 8 and 15, for instance, is 1.

Need More Than a Calculator? Meet Macaron

A GCF calculator solves one problem well. But homework, study sessions, and everyday questions rarely stop at a single calculation.

Macaron is a personal AI that remembers what you are working on and can build small tools, walkthroughs, and study help around the way you actually learn. If you find yourself reaching for one calculator after another, it is a way to keep all of that in one place that adapts to you.

Create your own tools with Macaron

Related tools and reading

References and Further Reading

  1. Greatest Common Factor (GCF) - BYJU'S
  2. Greatest Common Factor - GeeksforGeeks
  3. Greatest Common Factor Calculator - Calculator.net
  4. Greatest Common Factor - Math is Fun
  5. Greatest common divisor - Wikipedia
  6. Greatest common factor (GCF) explained - Khan Academy