Advertisement 320 × 50 mobile only · sticky top
Math · Updated 2026
GCD & LCM Calculator Instantly calculate the greatest common divisor (GCD) and least common multiple (LCM) of any number of integers.
Enter the numbers
Whole numbers
12 × 18 × 24 ×
+
▤ Edit as text 3 values ✕ Clear
Separate the numbers with a space or comma. GCD = greatest common divisor; LCM = least common multiple.
= GCD
6
Numbers 12, 18, 24
GCD 6
LCM 72
CMMDC = 6, CMMMC = 72 Recalculate Add to your site Share Email Print Report an issue Full embed page → Standard mathematical formulas. Instant in-browser calculation, no account. Exact results, big numbers computed precisely.
Advertisement 728 × 90 320 × 250 desktop 728×90 sticky · mobile 320×250
i How it is calculated The GCD is the largest number dividing all values exactly, and the LCM is the smallest number divisible by all of them. Both follow from prime factorization or Euclid’s algorithm:
LCM(a, b) = (a × b) ÷ GCD(a, b)
For 12 and 18 : GCD = 6, LCM = 36. Check: (12 × 18) ÷ 6 = 216 ÷ 6 = 36.
Advertisement 728 × 90 320 × 250 desktop 728×90 sticky · mobile 320×250
? Frequently asked questions What is the GCD (greatest common divisor)? It is the largest number that divides all the given numbers exactly. The GCD of 12 and 18 is 6.
What is the LCM (least common multiple)? It is the smallest number that is divisible by all the given numbers. The LCM of 12 and 18 is 36.
How is the GCD computed with Euclid’s algorithm? Repeatedly divide the larger number by the smaller and replace it with the remainder, until the remainder is 0. The last non-zero divisor is the GCD.
How do I get the LCM from the GCD? For two numbers: LCM = (a × b) ÷ GCD. For example, (12 × 18) ÷ 6 = 36.
What are GCD and LCM used for? GCD for simplifying fractions; LCM for finding a common denominator and for problems with events that repeat at different intervals.
What is the GCD of two coprime numbers? It is 1. Two numbers are coprime if they share no common divisor other than 1, for example 8 and 15.
Can I compute GCD and LCM for several numbers? Yes. Enter any number of values; the calculator applies the operation successively, two at a time.
Example: GCD and LCM of 12, 18 and 24? GCD = 6 (greatest common divisor), and LCM = 72 (least common multiple of the three).
Advertisement 728 × 90 320 × 250 desktop 728×90 sticky · mobile 320×250
→ Related tools