Home of Calculators Logo

GCD & LCM Calculator

GCD & LCM Calculator

Find the Greatest Common Divisor and Least Common Multiple

MATH
Greatest Common Divisor (GCD)
6
Least Common Multiple (LCM)
36

Prime Factors Intersection Venn Diagram

121822, 33Shared Prime Factors (overlap) product = GCD (6)

Prime Factorizations

122^2 × 3
182 × 3^2
Find the Greatest Common Divisor and Least Common Multiple of two or more numbers.

Evidence-based guide

Greatest Common Divisor (GCD) and Least Common Multiple (LCM)

GCD (also known as GCF) finds the largest integer that divides all entered numbers without a remainder. LCM finds the smallest positive integer that is a multiple of all entered numbers.

Formula and calculation methods

LCM(a, b) = |a × b| ÷ GCD(a, b)

Prime Factorization

Decompose numbers into prime factor powers. GCD takes the lowest powers of shared primes; LCM takes the highest powers of all primes.

Euclidean Algorithm

An efficient method for computing the GCD of two numbers by repeated remainder division.

Venn Diagram Mapping

Shows intersection of prime factors of two numbers visually to identify common divisors.

How to interpret your result

GCD is useful for simplifying fractions or dividing objects into equal groups. LCM is useful for finding common denominators or scheduling recurring synchronized events.

Limitations and safety

The calculator only operates on positive integers. Fractions, decimals, and negative numbers are excluded.

Frequently asked questions

How does factorization find the GCD?

For example, 12 = 2² × 3 and 18 = 2 × 3². The shared factors are one 2 and one 3. Their product (2 × 3 = 6) is the GCD.

What is the relationship between GCD and LCM?

For two numbers, the product of their GCD and LCM equals the product of the numbers themselves: GCD(a, b) × LCM(a, b) = a × b.

Can I calculate GCD/LCM for more than two numbers?

Yes. This upgraded calculator supports adding arbitrary rows of inputs or entering a comma-separated list of values.