GCF Calculator
Compute the greatest common factor of any list of whole numbers instantly.
Example
For the numbers 12, 18, and 24:
gcd(12, 18) = 6 (Euclidean steps: 18%12=6, 12%6=0)
gcd(6, 24) = 6 (24%6=0)
GCF = 6
The largest integer that divides 12, 18 and 24 evenly is 6. Their LCM is 72.
How it works
Enter two or more integers separated by commas, spaces, or new lines. The tool reduces them pairwise with the Euclidean algorithm to find the GCF (and the LCM).
Good to know
This GCF Calculator finds the greatest common factor of a whole list of integers at once, not just a pair. You paste or type any set of numbers separated by commas, spaces, or line breaks, and it returns the largest integer that divides every value evenly, along with the least common multiple and a count of how many valid numbers it parsed. It is built for students checking homework, anyone simplifying fractions, and developers or makers who need a quick ratio or tiling check without installing anything.
Reach for it whenever you need to reduce a fraction to lowest terms (divide numerator and denominator by their GCF), split quantities into the largest equal groups, scale a recipe or set of dimensions, or find a common stride that fits several intervals. Because it accepts a long list, it is handy when a problem involves three, four, or more numbers where doing the Euclidean algorithm by hand gets tedious.
Read the result from the large GCF figure at the top, then use the side stats to sanity-check your input. The "Parsed values" and "Count" fields show exactly which numbers the tool kept, so if you typed five values but Count says four, something was dropped. A GCF of 1 means the numbers are coprime (share no common factor beyond 1), which is normal and not an error. The LCM may display "too large" when the product exceeds safe integer precision in the browser.
- Negative signs are ignored because a factor is always positive, so -12 is treated as 12.
- Zeros and non-integers (like 3.5) are skipped, and you need at least two valid integers for a result; if every entry is 0 the GCF is undefined.
Frequently asked questions
What is the difference between GCF and LCM?
The GCF (greatest common factor) is the largest integer that divides every number in your list evenly, while the LCM (least common multiple) is the smallest positive integer that all of them divide into. This tool reports both.
How does it handle negative numbers or zero?
Negative numbers are converted to their absolute value, since the GCF is always positive. Zeros and non-integers are ignored when computing the result, because gcd(n, 0) = n and the factor must be a whole number.
Is my data uploaded anywhere?
No — this calculator runs entirely in your browser; nothing is uploaded.
Is it free?
Yes, completely free with no sign-up and no limits.
People also ask
How do you find the GCF of three or more numbers?
Find the GCF of the first two numbers, then take the GCF of that result with the next number, and repeat through the whole list. This calculator does exactly that, reducing the numbers pairwise so any count of integers works.
What does it mean if the greatest common factor is 1?
A GCF of 1 means the numbers are coprime, or relatively prime, sharing no common divisor larger than 1. It does not mean the numbers are prime themselves; for example 8 and 9 have a GCF of 1 even though neither is prime.
Is GCF the same as GCD?
Yes. Greatest common factor (GCF), greatest common divisor (GCD), and highest common factor (HCF) are different names for the same thing: the largest integer that divides all the given numbers evenly.
How is the GCF used to simplify a fraction?
Divide both the numerator and the denominator by their GCF to get the fraction in lowest terms. For example, 18/24 has a GCF of 6, so it simplifies to 3/4.
What is the relationship between GCF and LCM?
For two numbers, the product of the GCF and the LCM equals the product of the two numbers, so LCM(a,b) = (a x b) / GCF(a,b). This tool reports both values so you can see the connection directly.
Can the greatest common factor be larger than the numbers themselves?
No. The GCF can never exceed the smallest number in the list, because a divisor of a number cannot be larger than that number. The largest possible GCF equals the smallest value, which happens when that value divides all the others.
What is the Euclidean algorithm for finding the GCF?
It repeatedly replaces the larger number with the remainder of dividing it by the smaller one until the remainder is zero; the last nonzero value is the GCF. For 18 and 12: 18 mod 12 = 6, then 12 mod 6 = 0, so the GCF is 6.
Why does the calculator ignore decimals and zeros?
A factor must be a whole number, so non-integer entries cannot have an integer GCF and are skipped. Zeros are dropped because every number divides zero, so they would not change the result for the remaining values.
Related calculators