ToolBark
Calculators

LCM and GCD Calculator

Find the GCD and LCM of any set of numbers instantly

Enter Numbers

1218

Greatest Common Divisor

6GCD

The largest integer that divides every number in the set without a remainder.

Least Common Multiple

36LCM

The smallest positive integer that is divisible by every number in the set.

Prime Factorisation

12=2^2 × 3
18=2 × 3^2
GCD=2 × 3(common factors, lowest powers)
LCM=2^2 × 3^2(all factors, highest powers)

Key Relationship

GCD(12, 18) × LCM(12, 18) = 12 × 18

6 × 36 = 216

About

Use this free LCM and GCD calculator to find the Least Common Multiple and Greatest Common Divisor of two or more integers in one click. Whether you are simplifying fractions, solving number-theory problems, or scheduling repeating events, knowing the LCM and GCD is essential. Enter your numbers, get instant results, and explore the step-by-step Euclidean algorithm breakdown.

FAQ
What is the difference between GCD and LCM?+

The GCD (Greatest Common Divisor) is the largest integer that divides all given numbers without a remainder. The LCM (Least Common Multiple) is the smallest positive integer that is divisible by all given numbers. For any two numbers a and b, GCD(a, b) × LCM(a, b) = a × b.

How is the GCD calculated using the Euclidean algorithm?+

The Euclidean algorithm repeatedly replaces the larger number with the remainder of dividing the larger by the smaller, until the remainder is zero. The last non-zero remainder is the GCD. For example, GCD(48, 18): 48 = 2×18 + 12, then 18 = 1×12 + 6, then 12 = 2×6 + 0, so GCD = 6.

Can I calculate the LCM and GCD of more than two numbers?+

Yes. For a set of numbers, the GCD is computed by applying GCD pairwise: GCD(a, b, c) = GCD(GCD(a, b), c). The same applies to LCM. This calculator supports any quantity of numbers separated by commas or spaces.

What is the LCM used for in real life?+

LCM is used whenever you need to synchronise repeating cycles — for example, finding when two events that repeat every 4 and 6 days will coincide (LCM = 12 days). It is also used when adding or subtracting fractions, since you need the LCM of the denominators as the common denominator.

Related tools