LCM vs GCD
LCM vs GCD compared — least common multiple vs greatest common divisor, formulas and uses, with a free calculator.
The GCD (greatest common divisor) is the largest number that divides two values; the LCM (least common multiple) is the smallest number both divide into. They are linked: LCM(a,b) × GCD(a,b) = a × b.
LCM vs GCD at a glance
| LCM | GCD | |
|---|---|---|
| Meaning | Smallest common multiple | Largest common divisor |
| Always | ≥ both numbers | ≤ both numbers |
| Used for | Adding fractions, cycles | Simplifying fractions |
When to use LCM
Use the LCM to find a common denominator or when two cycles re-align.
When to use GCD
Use the GCD to simplify a fraction or split into equal groups.
Tools for LCM & GCD
LCM & GCD Calculator
Greatest common divisor and least common multiple of any list of integers, exact. Client-side.
Open toolFraction Calculator
Add, subtract, multiply and divide fractions with automatic simplification, decimal and mixed-number output. Client-side.
Open toolPrime Factorization Visualizer
Animated prime factorization as a factor tree — splits a number into prime factors step by step. Runs in your browser.
Open toolEuclidean Algorithm (GCD) Visualizer
Animated Euclidean algorithm — compute the GCD of two numbers step by step with the (a, b) → (b, a mod b) reduction. Runs in your browser.
Open toolLCM vs GCD
How are LCM and GCD related?
For any two numbers, LCM(a,b) × GCD(a,b) = a × b. So once you have the GCD (e.g. via the Euclidean algorithm), the LCM is just a × b ÷ GCD.