Enter 2 or more whole numbers to find the greatest common factor, see the work, and quickly spot how the same GCF simplifies the numbers.
How to use our Greatest Common Factor Calculator
- Type your values into Numbers using commas, spaces, or line breaks, such as 48, 72, 120.
- Use whole numbers only in Numbers. Negative values are allowed, but decimals like 4.5 are not.
- Choose a Method: Auto for a smart default, Euclidean algorithm for fast remainder steps, Prime factorization for shared prime factors, or List factors for classroom-style factor lists.
- Click Calculate.
- Read Greatest common factor first. If it is 1, the numbers do not share any factor bigger than 1.
- Check Numbers used to make sure the calculator cleaned your entry the way you expected.
- Use Common factors and Step-by-step work to learn how the answer was found.
- Look at Numbers divided by the GCF to see the shared factor removed from each number.
- If you entered exactly 2 numbers, use Fraction simplification hint to see how the same GCF reduces the first number over the second.
- Do a quick sanity check: the Greatest common factor must divide every value in Numbers used with no remainder, and dividing each by it should match Numbers divided by the GCF.
Definitions
Greatest common factor: The largest positive whole number that divides every input with no remainder. It is also called GCF, GCD, or highest common factor.[1]
Numbers used: The cleaned list of integers actually used after separators are read and signs are handled for the factor calculation.
Common factors: All positive whole numbers that divide every input number evenly.
Euclidean algorithm: A fast method that keeps replacing a pair of numbers with the second number and the remainder until the remainder becomes 0.[2]
Prime factorization: Writing a number as a product of prime numbers, then keeping only the primes shared by all inputs.
List factors: Writing all factors of each number and finding the overlap.
Numbers divided by the GCF: Each input after removing the shared factor, which helps you see the simplest whole-number ratio.
Fraction simplification hint: For 2 inputs, the reduced form of first number over second number using the same GCF.
Common mistakes and quick fixes
Mistake: Entering decimals like 12.5 in Numbers .
Fix: Use whole numbers only in Numbers . Change decimals to integers before calculating.
Mistake: Typing only one valid value in Numbers .
Fix: Enter at least 2 integers so the calculator can find a shared Greatest common factor .
Mistake: Entering all zeros in Numbers and expecting a result.
Fix: Include at least one nonzero integer. The Greatest common factor is undefined for 0 and 0 only.
Mistake: Choosing Prime factorization or List factors in Method for very large numbers and thinking the math changed.
Fix: The Greatest common factor stays the same. Switch Method to Auto or Euclidean algorithm if you want faster steps.
Mistake: Reading Numbers used as the original signed list.
Fix: Remember that GCF uses absolute values for the factor calculation, so Numbers used shows the cleaned integers used for finding the positive common factor.
Mistake: Expecting Fraction simplification hint to appear for 3 or more numbers.
Fix: That output shows only when Numbers contains exactly 2 inputs and the second number is not 0.
Limitations & Key Assumptions / Boundary Conditions
- This calculator accepts whole numbers only. Decimals, fractions typed with a slash, and text tokens should be corrected before calculating.
- You must enter at least 2 valid integers. A single number does not give a shared factor across multiple inputs.
- If every value is 0, the GCF is undefined, so the calculator should show an error instead of a number.
- Negative inputs are allowed, but the factor calculation uses absolute values and reports a positive GCF by standard convention.
- Common factors may be shortened when the full list would be too long to read easily. The Greatest common factor itself is still exact.
- Fraction simplification hint appears only when exactly 2 numbers are entered and the second number is not 0.
- If you choose Prime factorization or List factors for large numbers, the explanation may be longer or less practical than Auto or Euclidean algorithm, even though the final GCF is the same.
Methodology
How the calculator finds the GCF
The calculator first reads Numbers, splits the entry by commas, spaces, tabs, or line breaks, and checks that at least 2 valid integers remain. Negative values are allowed, but the factor calculation uses absolute values, because the GCF is reported as a positive whole number.[1]
gcf(a1, a2, ..., an) = largest positive integer d such that d divides every ai
If there are zeros mixed with nonzero values, they do not break the math. For example, the GCF of 18 and 0 is 18, but the GCF of 0 and 0 is undefined, so that case is blocked with an error.
gcf(a, 0) = |a|
Method choices
Auto picks a sensible teaching method. It uses the Euclidean algorithm for speed and may also show a simpler factor-list style explanation when the numbers are small enough to read comfortably.
Euclidean algorithm works pair by pair. For two numbers, replace the pair with the second number and the remainder until the remainder is 0. The last nonzero value is the GCF.[2]
gcf(a, b) = gcf(b, a mod b)
For more than two numbers: gcf(a, b, c) = gcf(gcf(a, b), c)
Prime factorization breaks each number into prime factors and keeps only the shared primes with the smallest exponent across all inputs.
If ai = product of p^(e_i,p), then gcf = product of shared p^(minimum exponent)
List factors writes all positive factors of each number, finds the intersection, and takes the largest shared factor.
Common factors = intersection(F(a1), F(a2), ..., F(an)); gcf = largest common factor
Worked mini-example
Suppose Numbers is 48, 72, 120. Using pairwise GCF, first find gcf(48,72) = 24. Then find gcf(24,120) = 24. So the final Greatest common factor is 24.
gcf(48,72,120) = gcf(gcf(48,72),120) = gcf(24,120) = 24
The Numbers divided by the GCF output is 2, 3, 5 because 48/24 = 2, 72/24 = 3, and 120/24 = 5. This shows the shared factor has been removed from every input.
Fraction simplification hint
When exactly 2 numbers are entered and the second is not 0, the same GCF can reduce a fraction made from the first number over the second.
a/b = (a/g)/(b/g), where g = gcf(a,b) and b != 0
Example: if the numbers are 84 and 126, then the GCF is 42, so 84/126 simplifies to 2/3.
Why results can differ from your classwork steps
The final GCF should match standard math methods, but the displayed Step-by-step work can look different depending on the chosen Method. Large-number factor lists may also be shortened for readability, while the exact GCF remains unchanged.[3]