CalKit

GCD/LCM Calculator

Calculate greatest common divisor and least common multiple.

최대공약수 (GCD)
12
최소공배수 (LCM)
144

소인수분해

362^2 × 3^2
482^4 × 3

유클리드 호제법 풀이

1단계36 = 48 × 0 + 36
2단계48 = 36 × 1 + 12
3단계36 = 12 × 3 + 0
4단계GCD = 12

LCM 계산

공식LCM = (36 × 48) / GCD
계산(36 × 48) / 12 = 144

Overview

The GCD/LCM Calculator finds the Greatest Common Divisor (GCD) and Least Common Multiple (LCM) of two or more natural numbers. It uses the Euclidean algorithm for fast and accurate computation.

Formula

Euclidean algorithm: GCD(a, b) = GCD(b, a mod b) (if a mod b = 0, then GCD = b)

Least Common Multiple: LCM(a, b) = (a × b) / GCD(a, b)

Three numbers: GCD(a, b, c) = GCD(GCD(a, b), c)
LCM(a, b, c) = LCM(LCM(a, b), c)

How to Use

  1. 1Enter two or more natural numbers.
  2. 2The GCD and LCM are calculated automatically.
  3. 3The step-by-step Euclidean algorithm process is also displayed.

Tips

  • Use GCD for simplifying fractions and LCM for finding common denominators.
  • If the GCD is 1, the two numbers are coprime (relatively prime).
  • The LCM is always at least as large as the larger number, and the GCD is at most as large as the smaller number.

FAQ

Q. What is the Euclidean algorithm?

An efficient algorithm for finding the GCD of two numbers. It repeatedly divides the larger number by the smaller and uses the remainder, until the remainder is 0. The divisor at that step is the GCD. It was described by Euclid around 300 BCE.

Q. What is the relationship between GCD and LCM?

For any two numbers a and b, GCD(a,b) × LCM(a,b) = a × b. So knowing the GCD makes it easy to find the LCM and vice versa.

Q. What does coprime (relatively prime) mean?

Two numbers are coprime if their GCD is 1, meaning they share no common factor other than 1. For example, 8 and 15 are coprime.

Related Calculators