About the LCM GCD Calculator
What is the LCM GCD Calculator?
The greatest common divisor (GCD), also called the highest common factor (HCF), is the largest whole number that divides every number in a set without a remainder. The least common multiple (LCM) is the smallest positive number that every number in the set divides into exactly.
HCF is used to simplify fractions and to split things into the largest possible equal groups. LCM is used to add fractions with different denominators and to find when repeating events line up again — for example, when two buses that leave every 12 and 18 minutes next depart together.
How to use the LCM GCD Calculator
- Whole Numbers (separated by commas) — two to fifty positive whole numbers, separated by commas or spaces. (sample: 12, 18, 30)
- Press Find LCM & GCD (results also refresh as you type). The result card shows the LCM (Least Common Multiple), along with GCD / HCF (Greatest Common Divisor) and Numbers checked.
Formula used
LCM(a, b) = a × b ÷ GCD(a, b)
- GCD(a, b) = found with Euclid's algorithm: GCD(a, b) = GCD(b, a mod b), repeated until the remainder is 0
For more than two numbers the rule is applied step by step: GCD(a, b, c) = GCD(GCD(a, b), c), and the same for the LCM.
Worked example
These are the sample values already filled in the calculator above, and the result it returns for them:
| Input | Sample value |
|---|---|
| Whole Numbers (separated by commas) | 12, 18, 30 |
| Result | Value |
|---|---|
| LCM (Least Common Multiple) | 180 |
| GCD / HCF (Greatest Common Divisor) | 6 |
| Numbers checked | 3 |
Tips for using the LCM GCD Calculator
- The GCD of two consecutive numbers is always 1, so their LCM is simply their product.
- For any two numbers, GCD × LCM equals the product of the two numbers.
- If one number divides the other (like 6 and 18), the GCD is the smaller number and the LCM is the larger one.
