GCD/LCM Calculator

Find the Greatest Common Divisor and Least Common Multiple of two or more numbers with detailed steps

GCD (Greatest Common Divisor)

6

LCM (Least Common Multiple)

36

Euclidean Algorithm

12 = 0 × 18 + 12

18 = 1 × 12 + 6

12 = 2 × 6 + 0

GCD = 6

Prime Factorization

12 = 2² × 3

18 = 2 × 3²

How to Use This Tool

1

Enter two or more positive numbers using the input fields.

2

Click "Add Number" to include additional numbers in the calculation.

3

View the GCD (Greatest Common Divisor) and LCM (Least Common Multiple).

4

See the step-by-step Euclidean algorithm and prime factorizations.

About This Tool

GCD/LCM Calculator finds the Greatest Common Divisor and Least Common Multiple of two or more numbers. For two numbers, it shows the step-by-step Euclidean algorithm used to compute the GCD. Prime factorizations of each input number are displayed with superscript exponents. Supports any number of inputs — just add more fields.

Frequently Asked Questions

An efficient method for computing GCD: repeatedly divide the larger number by the smaller and take the remainder, until the remainder is zero. The last non-zero remainder is the GCD.

For two numbers a and b: GCD(a,b) times LCM(a,b) = a times b. So LCM = (a times b) / GCD(a,b).

Share This Tool

Related Tools

Back to Math