The greatest common factor (GCF) is the largest positive integer that divides two or more numbers without a remainder. Enter your numbers into the calculator above, and it returns the GCF instantly with a full breakdown of how it got there.
Need the GCF of 24 and 36? It's 12. The GCF of 8 and 12? It's 4. Whether you're simplifying fractions, solving math homework, or factoring large numbers, this tool handles the work in seconds.
Find the Greatest Common Factor With This GCF Calculator Tool
Type two or more whole numbers into the calculator, separated by commas. Hit calculate, and the tool returns your GCF along with a step-by-step solution showing the method used.
The calculator works for:
- Two numbers (e.g., 18 and 27)
- Three numbers (e.g., 12, 30, and 42)
- Large numbers (e.g., 182664 and 154875)
- Numbers with exponents
You don't need to pick a method. The calculator selects the most efficient approach and shows every step so you can follow along or check your own work.
How do you find the GCF the fastest way? For small numbers, listing factors works fine. For large numbers, the Euclidean algorithm is the fastest path. The calculator uses whichever method fits your input.
What Is the Greatest Common Divisor (GCD) of a Number?
The greatest common divisor (also called GCD) is the largest number that divides evenly into each number in a set. "Divides evenly" means the remainder is zero.
For example, the greatest common divisor of 30 and 54 is 6. Both 30 and 54 can be divided by 6 with nothing left over.
A few key points:
- The GCD is always a positive integer.
- If two numbers share no common factor other than 1, their GCD is 1. These are called coprime numbers.
- Every integer is divisible by 1, so the GCF of any set of numbers is at least 1.
What is the GCF of 6 and 10? The factors of 6 are 1, 2, 3, 6. The factors of 10 are 1, 2, 5, 10. The largest factor they share is 2.
Finding the Greatest Common Factors From a List of Factors
The simplest way to find the GCF is to list every factor of each number, then pick the largest one they have in common.
Example: What is the greatest common factor of 12 and 18?
- Factors of 12: 1, 2, 3, 4, 6, 12
- Factors of 18: 1, 2, 3, 6, 9, 18
- Common factors: 1, 2, 3, 6
- The greatest common factor is 6.
This method is easy to understand and works well for smaller numbers. For larger numbers, writing out the full list of factors gets tedious. That's when prime factorization or the Euclidean algorithm is more efficient.
Is 2 the GCF of 14 and 42? Let's check. Factors of 14: 1, 2, 7, 14. Factors of 42: 1, 2, 3, 6, 7, 14, 21, 42. The list of common factors is 1, 2, 7, 14. The GCF is actually 14, not 2.
Step-by-Step: Find the GCF Using Prime Factorization
Prime factorization breaks each number down into its prime building blocks. Once you have those, finding the GCF is straightforward.
Step 1: List the prime factors of each number
A prime factor is a factor that is also a prime number (divisible only by 1 and itself). Divide each number by the smallest prime that goes in evenly, and keep going until you reach 1.
Example: Find the GCF of 24 and 36.
- 24 = 2 × 2 × 2 × 3 (which is 2³ × 3¹)
- 36 = 2 × 2 × 3 × 3 (which is 2² × 3²)
Step 2: Identify the common factors and multiply
Look at the prime factors that appear in both lists. For each shared prime, take the lowest exponent.
- The prime 2 appears in both. The lowest power is 2² (from 36).
- The prime 3 appears in both. The lowest power is 3¹ (from 24).
Multiply those together: 2² × 3¹ = 4 × 3 = 12.
The GCF of 24 and 36 is 12.
Using prime factorization is a reliable method for two or three numbers. It also helps you see exactly why a particular number is the GCF.
Find the Greatest Common Factor Using the Euclidean Algorithm
The Euclidean algorithm is the most efficient method for finding the GCF, especially with large numbers. It uses repeated division instead of factoring.
Divide, find the remainder, and repeat
The idea is simple: divide the larger number by the smaller number, note the remainder, then replace the larger number with the smaller and the smaller with the remainder. Repeat until the remainder is zero. The last non-zero remainder is the GCF.
Example: Find the GCF of 120 and 42.
- 120 ÷ 42 = 2 remainder 36
- 42 ÷ 36 = 1 remainder 6
- 36 ÷ 6 = 6 remainder 0
The remainder hit zero. The last non-zero remainder is 6, so the GCF of 120 and 42 is 6.
Why is this faster? You never need a full list of factors. Each step shrinks the numbers quickly, making this method practical even for integers like 33,264 and 35,640. (Their GCF, by the way, is 24.)
The Euclidean algorithm works for any two positive integers a and b. For three or more numbers, find the GCF of the first two, then find the GCF of that result with the next number, and continue.
GCF With Exponents: Finding the Greatest Common Divisor of Large Numbers
When numbers are written in exponential form, you can find the GCF without expanding them into long products.
Rule: For each shared prime base, use the smallest exponent.
Example: Find the GCF of 2⁵ × 3⁴ × 7² and 2³ × 3⁶ × 7¹.
- Prime 2: min(5, 3) = 3 → 2³
- Prime 3: min(4, 6) = 4 → 3⁴
- Prime 7: min(2, 1) = 1 → 7¹
GCF = 2³ × 3⁴ × 7 = 8 × 81 × 7 = 4,536
If a prime appears in only one number, it does not enter the GCF at all. This approach is commonly used in algebra when simplifying variable expressions with exponents.
HCF vs. GCF vs. GCD: Same Calculation, Different Names
You'll see three abbreviations depending on the textbook, country, or context:
- GCF (Greatest Common Factor): most common in US math classes.
- GCD (Greatest Common Divisor): widely used in mathematics and computer science.
- HCF (Highest Common Factor): standard in the UK, India, and many Commonwealth countries.
All three terms mean the same thing: the largest positive integer that divides each of the given numbers exactly. The calculator on this page works the same way regardless of which term you learned.
How to Simplify Fractions Using the GCF Calculator
The fastest way to simplify a fraction is to divide the numerator and denominator by their GCF.
Example: Simplify 36/48.
- Find the GCF of 36 and 48. It's 12.
- Divide both parts: 36 ÷ 12 = 3, and 48 ÷ 12 = 4.
- The simplified fraction is 3/4.
This works because dividing by the GCF removes every shared factor in one step. No need to reduce gradually.
What is the GCF of 10 and 15? It's 5. So the fraction 10/15 simplifies to 2/3.
Simplifying fractions is one of the most practical, everyday uses of the GCF in math class and beyond.
GCF and Least Common Multiple: How the Two Calculations Relate
The GCF and the least common multiple (LCM) are connected by a clean formula:
GCF(a, b) × LCM(a, b) = a × b
This means if you know two of the three values (GCF, LCM, or the product), you can solve for the third.
Example: For 12 and 18:
- GCF = 6
- Product = 12 × 18 = 216
- LCM = 216 ÷ 6 = 36
Here's a quick way to remember the difference:
- GCF finds the largest number that divides into both.
- LCM finds the smallest number that both divide into.
If you need the LCM instead, check out the LCM Calculator on ezcalcs.
Step-by-Step Solutions for Every GCF Calculation
Every result from this calculator includes a full step-by-step breakdown. You'll see exactly which method was applied and how the answer was reached.
What the solution shows:
- The prime factorization of each number
- The list of common factors
- The multiplication that produces the GCF
- The Euclidean algorithm steps (for larger inputs)
This makes the tool useful for more than just getting an answer. Students can compare the step-by-step solution to their own work and find where a mistake happened. Teachers can use it to verify answer keys.
When This GCF Calculator Is an Estimate and Not a Substitute
This calculator gives exact mathematical results for the integers you enter. GCF calculations are deterministic: there is one correct answer for any set of positive integers.
That said, keep a few things in mind:
- The tool handles standard integers. Extremely large numbers (hundreds of digits) may be constrained by browser performance.
- If you're using the GCF as part of a larger engineering, financial, or scientific calculation, verify the full workflow independently.
- For academic work, always show your own steps. Use the calculator to check, not to replace understanding.
The goal is to help you calculate the GCF quickly and learn the methods behind it.