The file is generated on your device; nothing is sent to a server. Tables are included.
Report an issue
Describe the problem — the page link, your inputs and the result are attached to the report automatically.
Standard mathematical formulas. Instant in-browser calculation, no account. Exact results, big numbers computed precisely.
Advertisement728 × 90320 × 250desktop 728×90 sticky · mobile 320×250
iHow 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:
Advertisement728 × 90320 × 250desktop 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).
Is GCD the same as HCF?
Yes. The greatest common divisor (GCD) is also called the highest common factor (HCF) or greatest common factor (GCF) — all three name the same value: the largest whole number that divides every input exactly.
Advertisement728 × 90320 × 250desktop 728×90 sticky · mobile 320×250