Enter two whole numbers. For example, 12 and 18 give GCD 6 and LCM 36.
Result
LCM 36 · GCD 6
- GCD
- 6
- LCM
- 36
GCD of 12 and 18 is 6; LCM is 36.
How this was calculated
- By Euclid, GCD(12, 18) = 6; LCM = 12 × 18 ÷ 6 = 36
Calculated at: https://xn--d6bxcvd.xn--54b7fta0cc/en/lcm-gcd/
The link includes the numbers you entered
How to use
- Enter two whole numbers.
- See the GCD and LCM together.
| What |
Formula |
Example |
| GCD |
Euclid’s method |
GCD(12, 18) = 6 |
| LCM |
a × b ÷ GCD |
12 × 18 ÷ 6 = 36 |
Examples
12 and 18: GCD 6, LCM 36.
5 and 7: GCD 1, LCM 35.
More: where they are used
LCM aligns denominators when adding fractions; GCD simplifies them. LCM also tells when repeating events coincide.
Frequently asked questions
What are LCM and GCD?
GCD is the largest number dividing both; LCM is the smallest multiple of both. For 12 and 18, GCD is 6 and LCM is 36.
What is the formula?
LCM = (a × b) ÷ GCD. GCD comes from Euclid's method with remainders.
Do fractions work?
No — enter positive whole numbers only.
What is the LCM of two primes?
For two primes the GCD is 1 and the LCM is their product. For 5 and 7: GCD 1, LCM 35.
How does GCD simplify a fraction?
Divide the numerator and denominator by the GCD. For 12/18 the GCD is 6, so it simplifies to 2/3.
Also searched as
lcm gcd finder · least common multiple