About GCD & LCM Calculator
The greatest common divisor (GCD) is the largest whole number that divides every number in a set; the least common multiple (LCM) is the smallest number they all divide into. This calculator finds the GCD with the Euclidean algorithm, repeatedly replacing (a, b) with (b, a mod b), and the LCM with |a × b| ÷ GCD(a, b), applied across the list. Decimals are rounded, zeros are ignored, and at least two numbers are required.
How to use GCD & LCM Calculator
- Type or paste into the "Whole numbers (separate with spaces or commas)" box, or press "Use example" to try it with sample data.
- The result appears below and updates as you type.
- Copy the result with the copy button, or download it as a file where that is offered.
Questions about GCD & LCM Calculator
Is GCD the same as GCF or HCF?
Yes. Greatest common divisor, greatest common factor, and highest common factor are three names for the same number. For 12, 18, and 30 it is 6.
Runs in your browser. Page last updated .