MMaxTools

GCD and LCM Calculator

Greatest common divisor and least common multiple of any numbers.

The GCD and LCM Calculator finds the greatest common divisor and least common multiple for any list of numbers — two, three, or a whole set. GCD powers fraction simplification; LCM finds common denominators and repeating schedules.

GCD (also called HCF) is the largest number dividing every input — the number that simplifies 12/18 to 2/3. LCM is the smallest number divisible by all inputs — what you need to add 1/6 and 1/4, or to find when two buses that leave every 15 and 20 minutes meet again (every 60).

The tool computes with the Euclidean algorithm, which is exact and fast for numbers of any practical size, and shows its work transparently. Everything runs locally in your browser.

GCD (greatest common divisor)

6

largest number dividing all inputs

LCM (least common multiple)

72

smallest number divisible by all inputs

Inputs

12, 18, 24

GCD × LCM = product of the two numbers (for pairs). Used for simplifying fractions (GCD) and finding common denominators or repeating schedules (LCM).

How to use the GCD and LCM Calculator

  1. Enter two or more whole numbers separated by commas, spaces or newlines.
  2. Read the GCD — the largest shared divisor.
  3. Read the LCM — the smallest common multiple.
  4. Use GCD to simplify fractions, LCM to sync schedules.
  5. Check the identity GCD × LCM = product for pairs.

Frequently asked questions

What is the difference between GCD and LCM?

GCD (greatest common divisor) is the largest number that divides all inputs — it reduces fractions. LCM (least common multiple) is the smallest number all inputs divide into — it syncs cycles and denominators. For a pair, GCD × LCM = a × b.

How is GCD calculated?

With the Euclidean algorithm: repeatedly replace the larger number by the remainder of dividing it by the smaller, until one reaches zero — the other is the GCD. It is exact, fast and needs no factoring.

Why is LCM useful for real schedules?

Two recurring events (buses, machines, medications) align every LCM of their periods. If one happens every 15 minutes and another every 20, they coincide every LCM(15,20) = 60 minutes.