GCF Calculator – Greatest Common Factor
Find the greatest common factor of 2–10 integers, along with their least common multiple, prime factorizations, and Euclidean division steps. Enter numbers separated by commas or spaces.
Find the Greatest Common Factor of 2 to 10 Integers
GCF Formula
Where:
- \(n_1,\ldots,n_k\) — the input integers.
- \(p\) — a prime dividing at least one input.
- \(v_p(|n_i|)\) — the exponent of \(p\) in the prime factorization of \(|n_i|\); it is 0 if \(p\) does not divide \(|n_i|\).
The GCF contains only primes shared by every number, each at its lowest exponent. If no prime is shared by all the numbers, the product is 1.
GCF – Calculation Example
Example: find the GCF of the calculator’s default integers, 48, 180, and 300.
Factor each number and keep the lowest power of every shared prime:
\[48=2^4\times3,\qquad180=2^2\times3^2\times5,\qquad300=2^2\times3\times5^2\]
\[\operatorname{GCF}(48,180,300)=2^{\min(4,2,2)}\times3^{\min(1,2,1)}=2^2\times3=12\]
For the first pair, Euclidean division gives \(180=48\times3+36\), \(48=36\times1+12\), and \(36=12\times3+0\). The pair’s GCF is 12; taking the GCF of 12 and 300 leaves 12.
Result: GCF = 12. The calculator also reports LCM = 3,600 and “No” for coprime.
How to use the calculator
- In the Integers field, enter 2–10 non-zero integers separated by commas or spaces. For example, enter
48, 180, 300or48 180 300. - Read Greatest common factor (GCF) for the largest positive integer that divides every entry without a remainder.
- Check Least common multiple (LCM) for the smallest positive multiple shared by every entry. Are the numbers coprime? says “Yes” when their overall GCF is 1.
- Use Euclidean division steps for the first pair to see how the GCF calculation starts. The remaining results show the Prime factorization of each number and the Common primes at their lowest powers that produce the final GCF.
What the greatest common factor means
The greatest common factor, also called the greatest common divisor (GCD), is the largest positive whole number that divides all the given integers exactly. For 48, 180, and 300, that number is 12: each is divisible by 12, and no larger positive integer divides all three. The GCF is useful when simplifying fractions, dividing quantities into equal groups without leftovers, or identifying a common unit of measure.
The prime-factorization method makes the result visible. A prime belongs in the GCF only if it appears in every input. Its exponent must be the smallest exponent found among them. In the example, all three numbers contain 2 and 3, while 5 is absent from 48. Keeping \(2^2\) and \(3^1\) gives 12. To examine one number’s factors in more detail, use the Prime Factorization Calculator; the Prime Number Checker can help verify an individual factor.
The Euclidean algorithm reaches the same answer without first finding prime factors. Divide the larger of the first two absolute values by the smaller, then repeat using the divisor and remainder. The last non-zero remainder is that pair’s GCF. For more than two numbers, take the GCF of that result and the next number, continuing through the list. The calculator displays the division steps for the first pair only; its final GCF includes every entry.
An overall GCF of 1 means the numbers are coprime as a group. It does not necessarily mean every pair is coprime: 6, 10, and 15 have an overall GCF of 1, although each pair shares a factor. Coprimality is also relevant when working with a multiplicative inverse modulo a number, where the two integers must have a GCF of 1.
Input limits and interpretation tips
- Enter at least 2 and at most 10 integers. Zero, decimals, and fractions are not accepted. Each number’s absolute value must be no greater than 1,000,000,000,000.
- Negative signs are allowed. The calculator uses absolute values, so changing a number’s sign does not change the GCF or LCM. Both reported values are positive.
- The number 1 or −1 is allowed and has no prime factors. If it appears among the inputs, the overall GCF is 1.
- Do not confuse the GCF with the LCM. The GCF divides every input; the LCM is divisible by every input. Even with the per-input limit, the LCM of several numbers can be much larger than any individual entry.
Frequently Asked Questions
How can I find the GCF by hand without prime factorization?
For small numbers, list the positive factors of each number and choose the largest one appearing in every list. For example, the common factors of 18 and 30 are 1, 2, 3, and 6, so their GCF is 6. Listing factors becomes tedious for large numbers; repeated division with remainders is usually faster.
How do I use the GCF to simplify a fraction?
Divide the numerator and denominator by their GCF. For example, the GCF of 42 and 56 is 14, so \(42/56=(42\div14)/(56\div14)=3/4\). The resulting numerator and denominator share no factor greater than 1, meaning the fraction is in lowest terms. Keep any negative sign with the fraction rather than treating it as a factor.
Can I calculate the LCM from the GCF?
For two non-zero integers, yes: \(\operatorname{LCM}(a,b)=|ab|/\operatorname{GCF}(a,b)\). Divide before multiplying when working by hand to keep the intermediate number smaller. Do not apply this formula to the product of three or more inputs using their overall GCF; it generally gives the wrong LCM. Instead, combine numbers two at a time.
In a grouping problem, does the GCF give the number of groups or the size of each group?
It depends on what must be equal. If 24 red beads and 36 blue beads must be split into the greatest possible number of identical groups, the GCF, 12, is the number of groups. Each group then has 2 red and 3 blue beads. If you are cutting lengths into the longest equal pieces with no waste, the GCF gives the piece length.
What happens if one of the numbers is zero?
This calculator does not accept zero, but the usual mathematical convention is \(\operatorname{GCF}(0,a)=|a|\) when \(a\ne0\): every positive divisor of \(a\) also divides zero. The GCF of zero and zero has no greatest positive value, so it is commonly left undefined. For this calculator, remove zero only if doing so still represents the problem you intend to solve.
How can I find a common measurement step for decimal values?
Convert all values to the same unit and scale them to integers first. For measurements of 1.2 cm and 0.8 cm recorded to the nearest tenth, multiply both by 10, find \(\operatorname{GCF}(12,8)=4\), then divide by 10. The largest common step at that precision is 0.4 cm. The answer depends on the precision chosen for the measurements.
When is the GCF equal to the smallest input?
The GCF equals the smallest absolute input when that input divides every other number exactly. For example, the GCF of 8, 24, and 40 is 8. Repeating an input does not change the GCF, so the GCF of 8, 8, and 24 is also 8. It can never exceed the smallest absolute input.