Tools/🧮 Calculators/GCD & LCM Calculator

GCD & LCM Calculator

Calculate the GCD and LCM of 2–10 numbers with Euclidean steps and prime factorizations.

Version 1.0 · Last Updated: August 11, 2026 · Maintained by ToolLarder

Calculation Type
Positive Integers

Show both results with prime factors and Euclidean steps. Each number may not exceed 1,000,000,000,000.

GCD
LCM

Enter at least two positive integers and calculate.

GCD and LCM calculation methods

Find the greatest common divisor and least common multiple of 2–10 positive integers with exact arithmetic, Euclidean steps, and prime factors.

GCD calculator

The GCD is the greatest positive integer that divides every given number without a remainder.

GCD(a,b) = GCD(b, a mod b)

LCM calculator

The LCM is the smallest positive integer divisible by every given number.

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

Euclidean algorithm

Divide the larger number by the smaller and continue with divisor and remainder until the remainder is zero.

a = b×q + r

Prime factor method

Use minimum shared exponents for GCD and maximum exponents across all factors for LCM.

GCD: min exponents · LCM: max exponents

GCD and LCM of multiple numbers

Continue sequentially with pairwise results to support up to ten numbers.

GCD(a,b,c)=GCD(GCD(a,b),c)

GCD and LCM Frequently Asked Questions