LCM and GCD Calculator
Compute the Least Common Multiple and Greatest Common Divisor of two or more positive integers, with prime factorization.
GCD
6
Greatest Common Divisor
LCM
72
Least Common Multiple
▶ Show prime factorization
What is LCM and GCD Calculator?
Computes the LCM (Least Common Multiple) and GCD (Greatest Common Divisor) of two or more numbers. LCM: smallest number that all numbers divide into. GCD: largest number that divides all of them. Show up in fraction addition, simplification, proportional division and school arithmetic.
How to use
- Type numbers separated by comma or space.
- See LCM and GCD computed in real time.
- Prime factor breakdown is shown too.
- Works with any number of inputs.
Frequently asked questions
What is the difference between LCM and GCD?
GCD is the largest number that divides every input exactly. LCM is the smallest number that is a multiple of every input.
How are they calculated?
GCD uses the Euclidean algorithm pairwise across the list. LCM uses the identity LCM(a, b) = |a × b| / GCD(a, b), applied pairwise.
Can I enter more than two numbers?
Yes — separate them with commas, spaces or semicolons. The calculator works on any number of positive integers (minimum 2).