Calculadora de MCM y MCD

Encuentra el Mínimo Común Múltiplo y el Máximo Común Divisor al instante

LCM & GCD Calculator

Find the Least Common Multiple and Greatest Common Divisor

LCM & GCD

Enter two positive integers

Formula
LCM(a,b) = (a x b) / GCD(a,b)

What is an LCM & GCD Calculator?

An LCM & GCD Calculator is a math tool that finds two important number relationships:

  • GCD (Greatest Common Divisor) -- the largest positive integer that divides each number with no remainder
  • LCM (Least Common Multiple) -- the smallest positive integer that is a multiple of each number

These concepts are used constantly in arithmetic, fractions, and algebra. GCD is most commonly used to simplify fractions and reduce ratios. LCM is most commonly used to find common denominators, combine fractions, and solve problems involving repeating schedules or cycles.

Because finding LCM and GCD by hand can be slow—especially for large numbers or multiple values—this calculator lets you enter your numbers and get the correct result instantly.

How to Use This LCM & GCD Calculator

  1. Enter your numbers -- input two positive integers into the fields above
  2. Click 'Calculate' -- to compute both GCD and LCM
  3. Review both results -- the calculator displays the GCD and LCM simultaneously
  4. Use the output -- apply the GCD for fraction simplification or the LCM for common denominators, scheduling, or math problems

Tips:

  • Use whole positive numbers for the most standard interpretation of LCM and GCD
  • If you include 0, the behavior may differ depending on the definition used (many tools define gcd(a, 0) = |a| and lcm(a, 0) = 0)
  • For multiple numbers, calculators typically compute results by combining them step-by-step (pairwise)

Formulas

Greatest Common Divisor (GCD)

The GCD of two numbers a and b is the largest integer that divides both without remainder. A common method is the Euclidean Algorithm:

  1. Divide: a = bq + r
  2. Replace: a ← b, b ← r
  3. Repeat until r = 0

The last non-zero remainder is the GCD. In short:

gcd(a, b) = gcd(b, a mod b)

until the remainder is 0

Least Common Multiple (LCM)

For two non-zero integers:

lcm(a, b) = |a × b| / gcd(a, b)

Use the GCD to compute LCM efficiently

More than Two Numbers

For multiple values, compute pairwise:

gcd(a, b, c) = gcd(gcd(a, b), c)

lcm(a, b, c) = lcm(lcm(a, b), c)

Example Calculations

Example 1: Find GCD of 48 and 18

48 factors: 1, 2, 3, 4, 6, 8, 12, 16, 24, 48

18 factors: 1, 2, 3, 6, 9, 18

Largest common factor: 6

Result: gcd(48, 18) = 6

Example 2: Find LCM of 12 and 18

First find GCD: gcd(12, 18) = 6

Calculation: lcm(12, 18) = |12 × 18| / 6 = 216 / 6 = 36

Result: lcm(12, 18) = 36

Example 3: Simplify a Fraction Using GCD

Problem: Simplify 84/126

GCD: gcd(84, 126) = 42

Calculation: 84 ÷ 42 = 2, 126 ÷ 42 = 3

Result: 84/126 simplifies to 2/3

Example 4: LCM for Multiple Numbers

Problem: Find LCM of 4, 6, 10

Step 1: lcm(4, 6) = 12

Step 2: lcm(12, 10) = 60

Result: lcm(4, 6, 10) = 60

Frequently Asked Questions

What’s the difference between GCD and LCM?

GCD is the largest number that divides both numbers. LCM is the smallest number that both numbers divide into (the smallest shared multiple). GCD helps simplify; LCM helps combine or align values.

When do I use GCD?

Use GCD when simplifying fractions, reducing ratios, or finding the largest equal group size (for example, splitting items evenly).

When do I use LCM?

Use LCM when finding a common denominator for fractions, aligning repeating schedules (like events every 6 and 8 days), or solving problems involving cycles.

Can LCM & GCD be calculated for more than two numbers?

Yes. The standard approach is to compute the result pairwise (combine two numbers at a time) until all numbers are included.

What happens if one of the numbers is 0?

Many definitions treat gcd(a, 0) = |a| and lcm(a, 0) = 0, but calculators may vary. If your tool allows 0, it should clearly define how it handles it.

Embed This LCM & GCD Calculator on Your Website

Want to add this lcm & gcd calculator to your website? Get a custom embed code that matches your site's design and keeps visitors engaged.

Responsive design
Custom styling
Fast loading
Mobile optimized

¿Qué son el MCM y el MCD?

El Máximo Común Divisor (MCD) es el número más grande que divide a dos o más números sin dejar resto. El Mínimo Común Múltiplo (MCM) es el número positivo más pequeño que es múltiplo de todos los números dados. Ambos son conceptos esenciales en teoría de números y en la aritmética de fracciones, y los usarás constantemente a lo largo de las matemáticas.

El MCD se usa para simplificar fracciones: divide el numerador y el denominador entre el MCD para obtener la fracción en su mínima expresión. El MCM se usa para encontrar el denominador común al sumar o restar fracciones con distintos denominadores. Esta calculadora encuentra ambos valores al instante usando el algoritmo de Euclides.

Cómo usar la calculadora de MCM y MCD

  1. Ingresa dos o más enteros en los campos de entrada.
  2. Haz clic en Calcular.
  3. Lee los resultados del MCD y el MCM que aparecen a continuación.
  4. Usa el MCD para simplificar fracciones o el MCM para encontrar un denominador común.

Fórmulas y algoritmos

Algoritmo de Euclides (MCD): MCD(a, b) = MCD(b, a mod b) hasta que b = 0 Ejemplo: MCD(48, 18) → MCD(18, 12) → MCD(12, 6) → MCD(6, 0) = 6 MCM a partir del MCD: MCM(a, b) = |a × b| / MCD(a, b) Ejemplo: MCM(4, 6) = 24 / 2 = 12 Método de factorización prima: 48 = 2⁴ × 3, 18 = 2 × 3² MCD = 2¹ × 3¹ = 6, MCM = 2⁴ × 3² = 144

MCM(a, b) × MCD(a, b) = a × b. Esta identidad ofrece un atajo rápido en cuanto conoces uno de los dos valores.

Ejemplos resueltos

Ejemplo 1: MCD(12, 8) y MCM(12, 8)

MCD(12, 8): 12 mod 8 = 4, luego MCD(8, 4) = 4. Entonces MCD = 4. MCM = (12 × 8) / 4 = 96 / 4 = 24.

Ejemplo 2: Simplificar la fracción 18/24

Encontrar MCD(18, 24): 24 mod 18 = 6, luego MCD(18, 6) = 6. Dividir ambos entre 6: 18/24 = 3/4.

Ejemplo 3: Sumar 1/4 + 1/6

Encontrar MCM(4, 6) = 12. Reescribir: 1/4 = 3/12 y 1/6 = 2/12. Sumar: 3/12 + 2/12 = 5/12.

Preguntas frecuentes

¿Para qué sirve el MCD?
El MCD se usa principalmente para simplificar fracciones a su mínima expresión. También aparece en criptografía (algoritmo RSA), en problemas de planificación (encontrar intervalos repetidos) y en algoritmos de informática que involucran aritmética modular.
¿Para qué sirve el MCM?
El MCM es esencial para sumar y restar fracciones con distintos denominadores: necesitas un denominador común, que es precisamente el MCM de los denominadores individuales. También se usa en problemas de ciclos o patrones repetidos.
¿Cuál es la diferencia entre MCD y MCM?
El MCD es el número más grande que divide a todos los números dados de forma exacta, por lo que siempre es menor o igual al número más pequeño del conjunto. El MCM es el número más pequeño al que todos los números dados dividen de forma exacta, por lo que siempre es mayor o igual al número más grande del conjunto.
¿Qué significa que el MCD sea igual a 1?
Cuando MCD(a, b) = 1, los dos números se llaman coprimos o primos entre sí. No comparten factores comunes distintos de 1. Por ejemplo, 8 y 15 son coprimos. En ese caso, MCM(a, b) = a × b.
¿Cómo se calcula el MCD de tres o más números?
Aplica el algoritmo de Euclides de forma iterativa: MCD(a, b, c) = MCD(MCD(a, b), c). Por ejemplo, MCD(12, 18, 24) = MCD(MCD(12, 18), 24) = MCD(6, 24) = 6. El mismo enfoque funciona para cualquier cantidad de enteros.