GCD & LCM Calculator
Calculate the Greatest Common Divisor and Least Common Multiple of two or more numbers with step-by-step Euclidean algorithm.
Enter Numbers
Comma-separated positive integers (at least 2)
3 valid numbers parsed: 48, 36, 60
Results
GCD (Greatest Common Divisor)
12
LCM (Least Common Multiple)
720
Step-by-step (Euclidean Algorithm for first two numbers)
gcd(48, 36)
48 = 1 x 36 + 12
36 = 3 x 12 + 0
GCD = 12
For multiple numbers, GCD and LCM are computed iteratively:
Step 1: gcd(48, 36) = 12, lcm(48, 36) = 144
Step 2: gcd(12, 60) = 12, lcm(144, 60) = 720
Formulas
LCM(a, b) = |a * b| / GCD(a, b)
GCD(a, b): while b != 0: a, b = b, a mod b
Related tools
Scientific CalculatorMath
Perform scientific calculations with trigonometric, logarithmic, and power functions.
Matrix CalculatorMath
Add, subtract, multiply, transpose, and find determinants of matrices.
Aspect Ratio CalculatorMath
Calculate and simplify aspect ratios, find missing dimensions, and scale resolutions.
Percentage CalculatorMath
Calculate percentages (increase/decrease/of value) quickly.
Fraction CalculatorMath
Add, subtract, multiply, and divide fractions with step-by-step simplification.
Hex CalculatorMath
Hex arithmetic with results in hex, decimal, and binary.