Greatest Common Factor Calculator returns the exact nonnegative GCD of an integer list and explains the documented all-zero convention.
Find the greatest shared divisor with Euclid’s algorithm
The greatest common factor is the largest positive integer that divides every entered integer without a remainder, provided at least one input is nonzero. GCF, greatest common divisor (GCD), and highest common factor (HCF) name the same integer result. Enter the numbers you want to compare, separated by commas, whitespace or new lines. Commas separate entries; they are not thousands separators. The default method uses Euclid’s algorithm: replace a nonnegative pair by its divisor and the division remainder until that remainder is zero. Any common divisor of the old pair divides the new remainder, and any common divisor of the new pair divides the old first value. The set of common divisors is preserved. The last nonzero value is therefore the GCF. A list is handled by folding that result into the next integer, as explained in Clark’s Euclidean Algorithm chapter.
Keep the original signs and omit thousands separators, decimal points and scientific notation.
Review the named primary result and open calculation details to check the arithmetic.
GCF of three integers: worked example
The three-integer preset enters 48, 180, 72. Its GCF is 12. The engine records these pair-fold and division steps:
gcd(48, 180) = 12
48 = 0 × 180 + 48
180 = 3 × 48 + 36
48 = 1 × 36 + 12
36 = 3 × 12 + 0
gcd(12, 72) = 12
12 = 0 × 72 + 12
72 = 6 × 12 + 0
Dividing each original value by the GCF gives 4:15:6. The companion LCM is 720. It answers a separate shared-multiple question.
GCF, HCF, GCD and the least common multiple
GCF selects a shared divisor; LCM selects a shared multiple. Under the usual nonzero integer definitions, GCF is positive and LCM is the smallest positive shared multiple. OpenStax describes the prime-factor method: the GCF keeps primes shared by every input, using the smallest exponent of each shared prime. The optional prime setting shows each entered decomposition so you can make that comparison.
For the prime-power preset, the decompositions are 24 = 2^3 × 3; 36 = 2^2 × 3^2; 60 = 2^2 × 3 × 5. The shared minimum powers give GCF 12. The companion LCM is 360.
A GCF of one means the entire list has no shared positive divisor greater than one. It proves pairwise coprimality only for a pair. For the list 6, 10, 15, the GCF is 1 even though its individual pairs share factors. The Ratio Calculator handles proportional relationships and reduction when the output you need is an equivalent ratio.
Negative integers, zero and exact input limits
Signs do not change common positive divisors. The signed preset enters -24, 36, 0 and returns GCF 12. A zero entry does not remove the divisors of the other nonzero entries. When every input is zero, the tool returns 0 under the Python math library’s documented convention. That answer is a convention, not the largest positive divisor of zero.
The main calculation accepts 32 integers at most, with at least two entries and up to 64 digits per integer. Exact integer strings keep values beyond floating-point precision intact. Decimal points, fractions, exponents, missing values and malformed comma separators are rejected. These are declared input policies, not mathematical limits.
Prime explanations are optional because finding the GCF does not require factorization. They accept only nonzero integers with at most 14 digits; a larger value produces an explicit validation error for that option. Leave the option off to use the main exact Euclidean calculation on larger integers.
To find a shared integer multiple or a common denominator, the Least Common Multiple Calculator folds the exact pair formula across the list.
The Prime Factorization Calculator decomposes one integer into prime powers and repeated factors; this differs from comparing a list.
A complete divisor list and product-checked factor pairs belong in the Factors Calculator, which also explains signed inputs.
When you need coefficients that reproduce the GCD, the Extended Euclidean Algorithm Calculator checks the original-input identity and its inverse residue.