All tools · Utilities

GCD & LCM

Greatest common divisor and least common multiple.

Free to use, no sign-up required. GCD & LCM is one of 198 tools built into Xenition, alongside a chat that can use them for you.

Finds the greatest common divisor and least common multiple of two or more whole numbers, for simplifying fractions, finding common denominators or lining up repeating schedules.

How to use GCD & LCM

  1. Enter the Numbers, separated by commas or spaces.
  2. Read the GCD, the largest number that divides all of them.
  3. Read the LCM, the smallest number all of them divide into.

How it works

Each value is rounded to a whole number and made positive, and zeros are dropped. The GCD uses Euclid’s algorithm, applied across the list one pair at a time. The LCM is built the same way with LCM(a, b) = a × b ÷ GCD(a, b), using exact whole-number arithmetic so every digit of a large result is correct.

Example

For 12, 18 and 24, the GCD is 6 and the LCM is 72. For 4, 6 and 10, the GCD is 2 and the LCM is 60.

Questions about GCD & LCM

How does the LCM help add fractions?

The LCM of the denominators is the lowest common denominator. To add 1/4 + 1/6, use 12: 3/12 + 2/12 = 5/12.

What does a GCD of 1 mean?

The numbers share no common factor other than 1, which is called being coprime. Their LCM is then simply their product.

Use it from chat

You do not have to open GCD & LCM to use it. Ask Xenition in plain language and it runs the right tool, then carries the answer into whatever you are working on — a document, a spreadsheet, a deck.

Related tools