GCD & LCM Calculator
Find the greatest common divisor and the lowest common multiple of two or more whole numbers, with the prime factorisation of each input shown.
Fill in the fields above and select Calculate to see your result and the full working.
Formula used
GCD via the Euclidean algorithm; LCM(a, b) = a × b ÷ GCD(a, b)
How to use this calculator
- Enter two or more positive whole numbers.
- Decimals are rounded and negatives treated as positive.
- Prime factorisations are shown for the first few values so you can check the result by hand.
Example calculation
For 24, 36 and 60:
24 = 2³ × 3, 36 = 2² × 3², 60 = 2² × 3 × 5
Common factors: 2² × 3 = 12 → GCD = 12
Highest powers: 2³ × 3² × 5 = 360 → LCM = 360.
What does this result mean?
The GCD is the largest number that divides every input exactly — it is what you cancel by when simplifying a fraction. The LCM is the smallest number every input divides into, which is what you need as a common denominator when adding fractions, or to work out when two repeating cycles coincide.
Frequently asked questions
- Is HCF the same as GCD?
- Yes — highest common factor and greatest common divisor are two names for the same thing.
- What if the GCD is 1?
- The numbers are coprime: they share no common factor other than 1, and their LCM is simply their product.
- Where is LCM used in practice?
- Adding fractions, scheduling events that repeat on different cycles, and gear or pulley problems all rely on it.
Related calculators
More in Mathematics
- Average Calculator (Mean, Median, Mode)
- Exponent & Logarithm Calculator
- Percentage Calculator
- Prime Number Calculator
- Quadratic Equation Calculator
- Random Number Generator
Browse the Mathematics category or the full calculator directory.