GCD and LCM Calculator

Find the greatest common divisor and least common multiple of two or more numbers, with prime factors.

Separate with commas or spaces. Whole numbers above 0.
GCD (greatest common divisor)–
LCM (least common multiple)–

🔒 Runs in your browser. Your data never leaves your device.

How to use

  1. Type two or more whole numbers.
  2. Read the GCD and LCM.
  3. Check the prime factors for each number.

GCD and LCM in one step

The GCD (also called GCF or HCF) is the largest number that divides all your numbers. The LCM is the smallest number that all of them divide. They help with simplifying fractions and finding common denominators.

How it works

  • GCD uses the Euclidean algorithm.
  • LCM is computed pairwise from the GCD.
  • Prime factorization is shown for numbers up to 10¹².

Up to 20 numbers are supported.

Frequently asked questions

What is GCD?
The largest integer that divides every number in the list.
What is LCM?
The smallest positive integer that is a multiple of every number.
Can I enter more than two numbers?
Yes, up to 20.

Related tools