GCD and LCM Calculator

Common Factors and Multiples

GCD is the greatest common divisor. LCM is the smallest positive number divisible by all inputs.

Formula: LCM(a, b) = |a x b| / GCD(a, b).

Understanding GCD and LCM

1. What This Calculator Measures

This calculator compares positive whole numbers to find their greatest shared divisor and smallest shared multiple.

2. How the Calculation Works

The GCD is found with the Euclidean algorithm. The LCM is then built from the relationship between multiplication and common factors.

3. Formula or Rule Used

LCM(a, b) = |a x b| / GCD(a, b).

Explore Our Calculators

Explore Programming Tools

Programming Tools

Explore our interactive programming environments for learning, testing, and executing code directly in your browser. Perfect for students, professionals, and enthusiasts.