Calculate the Greatest Common Divisor and Least Common Multiple
Separate numbers with commas, spaces, or new lines
Enter numbers and click Calculate
Add, subtract, multiply, and divide fractions with simplified results
Check if a number is prime, find prime factorization, or list primes in a range
Calculate mean, median, mode and other statistical averages
Full-featured scientific calculator with trigonometry, logarithms, and history
GCD & LCM Calculator is a free online tool that computes the Greatest Common Divisor (GCD) and Least Common Multiple (LCM) of two or more integers. The GCD is the largest positive integer that divides all the given numbers without a remainder, while the LCM is the smallest positive integer that is a multiple of all the given numbers. Enter your numbers separated by commas and get instant results with optional step-by-step calculations using the Euclidean algorithm. This tool is essential for simplifying fractions, finding common denominators, and solving number theory problems. All calculations happen in your browser.
Euclidean Algorithm for GCD: GCD(a, b) = GCD(b, a mod b), until remainder = 0 Example: GCD(48, 18) -> GCD(18, 12) -> GCD(12, 6) -> GCD(6, 0) = 6 LCM formula: LCM(a, b) = |a x b| / GCD(a, b) Example: LCM(12, 18) = |12 x 18| / GCD(12, 18) = 216 / 6 = 36