Greatest common divisor
6
Every number divides by 6
Least common multiple
5040
The smallest number they all divide into
Find the greatest common divisor and least common multiple of two or more integers, then inspect the Euclidean steps, prime factors, divisor counts, and the exact relationship between the results.
Step by step
01Enter the integers
Paste two or more whole numbers separated by commas, spaces, or lines.
02Read GCD and LCM together
The GCD is the largest shared divisor; the LCM is the smallest positive multiple shared by every value.
03Follow the Euclidean reduction
For the first pair, each division and remainder shows why the last non-zero remainder is the GCD.
04Inspect the factors
Use prime factorizations and divisor counts to see which powers are shared and which the LCM must retain.
Worked example
Given
Euclidean algorithm
126 = 84 × 1 + 42
84 = 42 × 2 + 0
gcd = 42
lcm = (84 × 126) / 42 = 252For two non-zero integers, gcd(a,b) × lcm(a,b) = |ab|. It is a useful check and avoids computing the LCM by listing multiples.
Why this one
GCD is about grouping
It gives the largest equal group size that divides every quantity with no remainder.
LCM is about synchronization
It gives the first positive point where repeating cycles or denominators meet.
Euclid avoids listing factors
Repeated remainders find the GCD quickly even when the integers are large.
Prime powers explain both
The GCD keeps the lowest shared exponent of each prime; the LCM keeps the highest exponent appearing anywhere.
The judgement call
Cut identical largest tiles from two lengths
GCD
You need the largest size dividing both exactly.
Simplify a fraction
GCD
Divide numerator and denominator by their greatest shared factor.
Find when repeating schedules coincide
LCM
You need the earliest shared multiple.
Add fractions with different denominators
LCM
It supplies the least common denominator.
Reference
FAQ
The GCD is the largest integer dividing every input. The LCM is the smallest positive integer divisible by every input.
Take the GCD of the first pair, then take the GCD of that result and the next number, continuing through the list.
Two or more integers are coprime when their only common positive divisor is 1. They do not each need to be prime.
Yes. Signs do not change divisibility, and the calculator uses magnitudes. An LCM containing zero is zero.
The Euclidean algorithm reaches the exact GCD with a short sequence of divisions and is far faster than enumerating every divisor.
All integer parsing, factoring, and reductions happen locally in your browser.
Keep going