1001Ferramentas
🔢Calculators

MDC de Múltiplos Números

Calcula MDC de uma lista de inteiros (separados por vírgula).

MDC

GCD of multiple numbers: formula and example

For more than two numbers, the greatest common divisor falls out of associativity. You compute gcd(a,b,c,…) = gcd(gcd(a,b), c, …), folding the list one pair at a time. Each pair runs through the Euclidean algorithm, where gcd(a,b) = gcd(b, a mod b) repeats until the remainder hits zero. Take gcd(60, 48, 36) = gcd(gcd(60, 48), 36) = gcd(12, 36) = 12. A few facts worth keeping in mind: gcd is commutative and associative, gcd(a, 0) = a, and the gcd of any set divides every integer linear combination of its elements, which is what Bézout tells us.

Applications: fractions, scaling and team partitioning

The GCD does the work behind reducing fractions with multiple terms. It scales a recipe down when you divide every ingredient by the shared divisor. It also tells you how to split tasks or items into equal groups — the largest group size that divides each count cleanly. In linear algebra it reduces vectors, and in cryptography it sits under modular inverses, since RSA key generation needs gcd(e, φ(n)) = 1.

FAQ

Does the order of inputs matter? It doesn't. Since gcd is associative and commutative, gcd(a,b,c) = gcd(c,a,b) = gcd(b,c,a) all the same.

What if one number is 0? Because gcd(a, 0) = a, a zero in the list leaves the result untouched. The exception is when every number is 0, which has no defined gcd.

What about negative numbers? Convention keeps the gcd non-negative, so we work with absolute values: gcd(a,b) = gcd(|a|,|b|).

Relation to LCM? With two numbers, lcm(a,b) = |a·b| / gcd(a,b). For longer lists you just apply that step by step.

Related Tools