Greatest Common Factor Calculator
Find the greatest common factor of numbers or algebraic terms and see the exact steps used to solve it.
Try a GCF example to see the steps
How to Use the GCF Calculator
Add Your Problem
Enter two or more whole numbers, or type algebraic terms when you need to factor out a common factor. Use Calculator for the on-screen keypad, Math Input for typed notation, or Canvas to draw, handwrite, or upload a photo.
Choose Your Output
Step-by-step answers are selected by default. You can also choose Explain Like I’m 10, Create Practice Test, Create Study Guide, Create Flashcards, or Find My Mistake to review your own work.
Choose a Language
Use the language dropdown labeled “Default” to choose your preferred language setting.
Get the Result
Select Solve to submit your problem and receive the chosen explanation, practice material, or factoring steps.
How to Find the Greatest Common Factor
The greatest common factor, usually called the GCF, is the largest positive whole number that divides every given whole number with no remainder. Use factor lists for small numbers, prime factorization for larger numbers, and shared coefficients and variables for algebraic terms.
Find the GCF by Listing Factors
Factor lists work well when the numbers are small enough to list quickly. A factor is a number that multiplies with another number to make a product, so factors divide a number evenly.
For \(18\) and \(24\):
\[ 18: 1, 2, 3, 6, 9, 18 \]
\[ 24: 1, 2, 3, 4, 6, 8, 12, 24 \]
The shared factors are \(1\), \(2\), \(3\), and \(6\). The greatest one is \(6\), so:
\[ \text{GCF}(18,24)=6 \]
This method makes the idea visible, especially when you are learning. For larger numbers, though, long factor lists can be slow and easy to miss a number in.
Find the GCF With Prime Factorization
Prime factorization is usually faster when numbers are larger. Break each number into prime factors, then multiply only the primes that appear in every number.
For example:
\[ 81=3^4 \]
\[ 72=2^3 \times 3^2 \]
Both numbers contain \(3\), but the shared amount is only \(3^2\). Therefore:
\[ \text{GCF}(81,72)=3^2=9 \]
Always use the smallest exponent shared by all numbers. Do not include \(2\), because \(2\) is not a factor of \(81\). This rule also works when finding the GCF of three or more numbers.
Find and Factor Out the GCF of Algebraic Terms
Use this method when an expression has terms such as \(12x^3+18x^2\). You are looking for what every term shares: a number, a variable, or both.
Find the GCF of the numerical coefficients.
Keep each variable that appears in every term.
Use the smallest exponent of each shared variable.
Divide every term by the GCF and write the result in parentheses.
Consider:
\[ 12x^3+18x^2 \]
The coefficient GCF is \(6\), and the smallest shared power of \(x\) is \(x^2\).
\[ 12x^3+18x^2=6x^2(2x+3) \]
A variable belongs in the GCF only if every term contains it. Taking out the GCF may be the first factoring step, not the last; use the Factoring Calculator if you need to check whether the expression factors further.
Understanding the Greatest Common Factor
The GCF is about what all numbers or terms share. It is not simply the largest number you see. For example, \(20\) is larger than \(12\), but the GCF of \(12\) and \(20\) is \(4\), because \(4\) divides both evenly.
GCF and LCM answer different questions. The GCF is the largest shared factor, while the least common multiple, or LCM, is the smallest positive multiple shared by all values. You can use the LCM Calculator when you need to compare the two ideas.
Both ideas show up in fraction work, grouping problems, and algebra. To simplify a fraction, find the GCF of its numerator and denominator, then divide both by that GCF; a Factoring Calculator can help with reducing a fraction. The GCF of fractions themselves is not always handled exactly like the GCF of integers.
Negative numbers are usually handled by using their absolute values because GCF is written as positive. Zero needs extra care: \(\text{GCF}(0,n)=|n|\) when \(n\ne0\), but \(\text{GCF}(0,0)\) is generally undefined in elementary math. GCF is mainly used with whole numbers and integer coefficients.
Worked Example
Find the GCF and factor:
\[ 24x^3y^2+36x^2y^4-12x^2y \]
Find the coefficient GCF:
\[ \text{GCF}(24,36,12)=12 \]
Every coefficient is divisible by \(12\), and no larger positive number divides all three.
Find the shared \(x\)-factor:
\[ x^{\min(3,2,2)}=x^2 \]
Each term has \(x\), so keep the smallest exponent, \(2\).
Find the shared \(y\)-factor:
\[ y^{\min(2,4,1)}=y \]
Every term has \(y\), and the lowest shared power is \(y^1\).
Combine the shared factors:
\[ \text{GCF}=12x^2y \]
This is the largest factor common to every term.
Divide each term by \(12x^2y\):
\[ 24x^3y^2+36x^2y^4-12x^2y = 12x^2y(2xy+3y^3-1) \]
The final answer is:
\[ \boxed{12x^2y(2xy+3y^3-1)} \]
Verify by distributing:
\[ 12x^2y(2xy)=24x^3y^2 \]
\[ 12x^2y(3y^3)=36x^2y^4 \]
\[ 12x^2y(-1)=-12x^2y \]
The distributed terms match the original expression. For more practice with expressions, explore the Basic Math Calculators.
Common Mistakes
Choosing the largest number instead of the largest shared factor
A student may choose \(24\) as the GCF of \(18\) and \(24\) because it is larger. The rule is that the GCF must divide *every* number evenly, and \(24\) does not divide \(18\).
Including a prime factor that does not appear in every number
When factoring \(81\) and \(72\), you might include \(2\) because it appears in \(72\). Prime factors count only when every number has them, so \(2\) cannot be part of this GCF.
Using the largest variable exponent
In \(x^3\) and \(x^2\), a student may choose \(x^3\). The GCF must divide both terms, so use the smallest shared exponent: \(x^2\).
Forgetting to divide every term when factoring out the GCF
A student may divide the first term correctly but skip or misdivide another term. After choosing a GCF, divide each term by exactly that factor before writing the parentheses.
Confusing GCF with LCM
Students sometimes search for a common multiple when the problem asks for a common factor. Remember that GCF means the largest number that divides each value, while LCM means the smallest multiple they share.
Related Calculators
Questions Students Ask About GCF
What is the greatest common factor?
+The greatest common factor is the largest positive whole number that divides every given integer evenly. For \(12\) and \(18\), the GCF is \(6\) because \(6\) divides both numbers without a remainder.
How do I calculate the GCF quickly?
+For small numbers, list the factors and identify the largest factor they share. For larger numbers, use prime factorization and multiply only the prime factors common to every number.
What is the GCF of 81 and 72?
+\[ 81=3^4 \] \[ 72=2^3 \times 3^2 \] The shared prime factor is \(3^2\), so the GCF is \(3^2=9\).
What is the difference between GCF and LCM?
+For \(12\) and \(18\), the GCF is \(6\) because it is the largest number that divides both. Their LCM is \(36\) because it is the smallest positive multiple that both numbers divide into evenly.
How do I find the GCF with variables and exponents?
+First find the GCF of the coefficients. Then include only variables found in every term, using the lowest exponent each shared variable has.
How do I factor out the GCF from an expression?
+Place the selected GCF outside parentheses and divide every term by it. You can verify the result by distributing the outside factor back through the parentheses.
Can I use GCF to simplify fractions?
+Yes. Find the GCF of the numerator and denominator, then divide both by that number. For example, divide \(12/18\) by \(6/6\) to get \(2/3\).
What happens when one number is zero?
+For a nonzero integer \(n\), \(\text{GCF}(0,n)=|n|\). This works because every nonzero integer divides zero, but \(\text{GCF}(0,0)\) is generally undefined.