This account already has saved data. Do you want to keep this device's data, or use your account's saved data?
Appearance
Unit System
Temperature Format
Time Format
Greatest Common Factor and Least Common Multiple
GCF & LCM
GCF & LCM
Your Recent & Past Results
Restored a past calculation.
Compare Calculations
Side-by-Side Comparison
A comparison of your calculations' results.
Downloads
Includes your inputs and results for this calculation, plus any additional calculations you've compared.
Share & Print
The link includes your inputs and results, so anyone who opens it sees this exact calculation.
Calculating the GCF and LCM
The Greatest Common Factor (GCF, also called GCD) of a set of numbers is the largest number that
divides evenly into all of them, and the Least Common Multiple (LCM) is the smallest number that
all of them divide evenly into. Enter two or more whole numbers, and this calculator finds both
instantly.
The Method
GCF is found using the Euclidean algorithm — a method dating back over 2,000 years: repeatedly
divide the larger number by the smaller and replace the larger with the remainder, until the
remainder reaches zero. The last non-zero value is the GCF.
Once the GCF is known, the LCM of two numbers follows directly:
LCM(a,b)=GCF(a,b)a×b
For more than two numbers, this calculator applies both methods pairwise across the whole list.
Worked Example
Finding the GCF and LCM of 12 and 18:
Euclidean algorithm: 18 ÷ 12 leaves a remainder of 6; 12 ÷ 6 leaves a remainder of 0. The GCF is
6.
LCM(12,18)=(12×18)÷6=216÷6=36.
Key Factors to Consider
Two numbers with a GCF of 1 are called “coprime” or “relatively prime,” a genuinely useful
classification. When the GCF is 1, the two numbers share no common factors other than 1 — this
matters in areas like cryptography and number theory, and it also means their LCM is simply
their product.
The Euclidean algorithm is dramatically faster than listing every factor for large numbers.
Finding the GCF by listing all factors of each number and comparing them becomes impractical for
large numbers — the Euclidean algorithm finds the answer in only a handful of steps regardless of
how large the numbers are, which is exactly why it’s the standard method after over 2,000 years.
GCF and LCM generalize cleanly to more than two numbers, using the same pairwise building
block. Applying the two-number formula across a list — GCF(GCF(a,b), c), and similarly for
LCM — correctly extends both concepts to any number of inputs, which is exactly how this
calculator handles a list longer than two numbers.
These concepts appear constantly outside pure math, in scheduling and resource-splitting
problems. Beyond simplifying fractions, LCM answers “when do two repeating events next align”
(like bus schedules or blinking lights), and GCF answers “what’s the largest equal-sized group
I can split these into” (like dividing items into identical bundles with nothing left over).
Common Mistakes
Mixing up which one is GCF and which is LCM. The names sound similar and are easy to swap
by mistake — GCF is always the smaller of the two results (a shared factor, so it can’t exceed
the smallest input number), while LCM is always the larger (a shared multiple, so it’s at least
as big as the largest input number).
Assuming the GCF must be one of the numbers being compared. As covered above, the GCF is
the largest number that divides evenly into every input — for 12 and 18, that’s 6, not 12 or
18 themselves, even though both of those also divide evenly into at least one of the inputs.
Listing out every factor by hand for large numbers instead of using the Euclidean
algorithm. As covered above, this becomes slow and error-prone as numbers grow — the
Euclidean algorithm this calculator uses finds the same answer in only a handful of steps
regardless of size.
Multiplying the two numbers together to get the LCM without dividing by the GCF first. As
covered above, straight multiplication only gives the correct LCM when the two numbers are
coprime (GCF of 1) — for numbers that share a common factor, skipping the division by the GCF
produces a multiple of the true LCM, not the LCM itself.
Useful to Know
Reducing a fraction to its simplest form is exactly a GCF calculation — the Fraction Calculator
simplifies fractions using the same GCF this calculator computes directly.
Finding a common denominator to add or subtract fractions is exactly an LCM calculation — the
same relationship in the other direction.
The Prime Factorization Calculator and the Ratio Calculator both lean on the same
shared-factor idea from a different angle — one breaks a number down into its prime building
blocks, the other reduces a ratio to its simplest whole-number form.
Calcular el MCD y el MCM
El Máximo Común Divisor (MCD, también llamado GCF/GCD en inglés) de un conjunto de números es el
número más grande que divide de forma exacta a todos ellos, y el Mínimo Común Múltiplo (MCM) es el
número más pequeño que es divisible de forma exacta por todos ellos. Ingresa dos o más números
enteros, y esta calculadora encuentra ambos al instante.
El método
El MCD se encuentra usando el algoritmo de Euclides — un método que se remonta a hace más de 2,000
años: se divide repetidamente el número mayor entre el menor y se reemplaza el mayor por el
residuo, hasta que el residuo llega a cero. El último valor distinto de cero es el MCD.
Una vez que se conoce el MCD, el MCM de dos números se obtiene directamente:
MCM(a,b)=MCD(a,b)a×b
Para más de dos números, esta calculadora aplica ambos métodos por pares a lo largo de toda la
lista.
Ejemplo resuelto
Encontrando el MCD y el MCM de 12 y 18:
Algoritmo de Euclides: 18 ÷ 12 deja un residuo de 6; 12 ÷ 6 deja un residuo de 0. El MCD es
6.
MCM(12,18)=(12×18)÷6=216÷6=36.
Factores Clave a Considerar
Dos números con un MCD de 1 se llaman “coprimos” o “primos entre sí”, una clasificación
genuinamente útil. Cuando el MCD es 1, los dos números no comparten ningún factor común más
allá de 1 — esto importa en áreas como la criptografía y la teoría de números, y también significa
que su mcm es simplemente su producto.
El algoritmo de Euclides es dramáticamente más rápido que listar cada factor para números
grandes. Encontrar el MCD listando todos los factores de cada número y comparándolos se vuelve
poco práctico para números grandes — el algoritmo de Euclides encuentra la respuesta en solo unos
pocos pasos sin importar qué tan grandes sean los números, razón por la cual es el método estándar
desde hace más de 2,000 años.
El MCD y el mcm se generalizan limpiamente a más de dos números, usando el mismo bloque de
construcción por pares. Aplicar la fórmula de dos números a lo largo de una lista — MCD(MCD(a,b),
c), y de forma similar para el mcm — extiende correctamente ambos conceptos a cualquier número de
entradas, que es exactamente cómo maneja esta calculadora una lista de más de dos números.
Estos conceptos aparecen constantemente fuera de las matemáticas puras, en problemas de
programación de horarios y división de recursos. Más allá de simplificar fracciones, el mcm
responde “cuándo vuelven a coincidir dos eventos que se repiten” (como horarios de autobús o
luces intermitentes), y el MCD responde “cuál es el grupo de tamaño igual más grande en el que
puedo dividir esto” (como dividir artículos en paquetes idénticos sin que sobre nada).
Errores comunes
Confundir cuál es el MCD y cuál es el mcm. Los nombres suenan parecido y es fácil
intercambiarlos por error — el MCD siempre es el menor de los dos resultados (un divisor
común, así que no puede superar el número de entrada más pequeño), mientras que el mcm siempre
es el mayor (un múltiplo común, así que es al menos tan grande como el número de entrada más
grande).
Suponer que el MCD debe ser uno de los números que se están comparando. Como se cubrió
antes, el MCD es el número más grande que divide de forma exacta a cada entrada — para 12 y
18, ese es 6, no 12 ni 18 mismos, aunque ambos también dividen de forma exacta al menos una de
las entradas.
Listar cada factor a mano para números grandes en lugar de usar el algoritmo de Euclides.
Como se cubrió antes, esto se vuelve lento y propenso a errores a medida que los números
crecen — el algoritmo de Euclides que usa esta calculadora encuentra la misma respuesta en
solo unos pocos pasos sin importar el tamaño.
Multiplicar los dos números para obtener el mcm sin dividir primero entre el MCD. Como se
cubrió antes, la multiplicación directa solo da el mcm correcto cuando los dos números son
coprimos (MCD de 1) — para números que comparten un factor común, omitir la división entre el
MCD produce un múltiplo del mcm real, no el mcm en sí.
Vale la pena saber
Reducir una fracción a su forma más simple es exactamente un cálculo de MCD — la Calculadora
de Fracciones simplifica fracciones usando el mismo MCD que esta calculadora calcula
directamente.
Encontrar un denominador común para sumar o restar fracciones es exactamente un cálculo de mcm
— la misma relación en la dirección opuesta.
La Calculadora de Factorización Prima y la Calculadora de Razones se apoyan ambas en la misma
idea de factor compartido desde un ángulo diferente — una descompone un número en sus bloques
primos, la otra reduce una razón a su forma entera más simple.
GCF (Greatest Common Factor, also called GCD) is the largest number that divides evenly into every number in the list. LCM (Least Common Multiple) is the smallest number that every number in the list divides evenly into. GCF is always less than or equal to the smallest input; LCM is always greater than or equal to the largest.
What is GCF/LCM used for?
GCF is commonly used to simplify fractions (dividing both the numerator and denominator by their GCF gives the simplest form). LCM is used to find a common denominator when adding or subtracting fractions with different denominators, and in scheduling problems (e.g. "these two events repeat every 4 and 6 days — when do they next coincide?").
Can I find the GCF/LCM of more than two numbers?
Yes — enter as many whole numbers as you like, separated by commas, spaces, or new lines. This calculator finds the GCF and LCM across the entire list, not just pairs.
We use cookies for analytics and ads to help support this free site. You can accept all, or decline and we'll only use what's needed for the site to work.