🔒 100% private — runs in your browser, nothing is uploaded

GCD & LCM Calculator

Greatest common divisor and least common multiple for two or more numbers, with Euclid’s steps shown.

The greatest common divisor and the least common multiple are the two meeting points of a set of numbers: the GCD is the largest number that divides every one of them, and the LCM is the smallest number that every one of them divides. For 48 and 180 the pair is GCD 12 and LCM 720 — and the two are linked by the identity GCD × LCM = 48 × 180, which is why computing one helps find the other. These are working numbers, not trivia: the GCD is what a fraction reduces by (48/180 simplifies to 4/15 on dividing both by 12), and the LCM is the common denominator that lets fractions add, and the cycle length after which repeating schedules — buses, gears, blinking lights — line up again.

Whole numbers of any size are handled exactly with big-integer arithmetic in your browser. Negative signs are ignored (GCD and LCM are stated for absolute values). Nothing is uploaded or stored.

Quick answers

What are the GCD and LCM of 48 and 180?

GCD 12, LCM 720. Euclid: 180 = 3 × 48 + 36; 48 = 1 × 36 + 12; 36 = 3 × 12 + 0, so the GCD is 12 — and the LCM is 48 × 180 ÷ 12 = 720.

The GCD is also the reducing factor for the fraction 48/180, which simplifies to 4/15.

How do I find the LCM of several numbers?

Fold the pair operation across the list: LCM(a, b) = a × b ÷ GCD(a, b), then take the LCM of that result with the next number, and so on. For 12, 18, 20 the running LCMs are 36, then 180.

Order does not matter — folding in any order reaches the same final LCM, though the intermediate values differ.

How to use

  1. Type two or more whole numbers, separated by commas — for example 48, 180.
  2. Read the GCD (the largest number dividing all of them) and the LCM (the smallest number all of them divide).
  3. Check the worked steps under the result: Euclid’s algorithm applied to the first pair, remainder by remainder.
  4. Add a third or fourth number any time — the GCD and LCM are computed across the whole list.

About this tool

The method is Euclid’s, unchanged in substance for over two thousand years: divide the larger by the smaller, keep the remainder, and repeat with the smaller number and that remainder until the remainder is 0. For 48 and 180 the steps are 180 = 3 × 48 + 36, then 48 = 1 × 36 + 12, then 36 = 3 × 12 + 0 — so the last non-zero remainder, 12, is the GCD. The page shows those steps for your first pair and handles lists of any length by folding the pair operation across them. Signs are ignored (divisibility is about size), and big-integer arithmetic keeps very large inputs exact.

Frequently asked questions

How does Euclid’s algorithm find the GCD?

By remainders. Any common divisor of a and b also divides a − b and therefore the remainder when a is divided by b — so GCD(a, b) equals GCD(b, remainder), a strictly smaller problem. Repeating shrinks the numbers fast until a remainder of 0 leaves the last divisor standing as the GCD.

What is the relationship between GCD and LCM?

For two numbers, GCD(a, b) × LCM(a, b) = a × b. So once Euclid gives the GCD, the LCM follows as a × b ÷ GCD: 48 × 180 ÷ 12 = 720. The identity is special to pairs — for three or more numbers this page folds the pair operations across the list instead.

Can I enter more than two numbers?

Yes — any count of two or more. The GCD of a list divides every number in it, and the LCM of a list is divisible by every number in it. For example, 12, 18 and 20 together have GCD 2 and LCM 180.

What happens with 0 or negative numbers?

Negative signs are ignored, since divisibility does not depend on sign. Zero is handled by the standard convention: GCD(a, 0) is a itself, and any list containing 0 has LCM 0, because no positive number is a multiple of 0 in the intended sense. A list of only zeros has GCD 0.

📦 Embed this tool on your site

<iframe src="https://verystep.com/embed/gcd-lcm-calculator/" title="GCD & LCM Calculator" width="100%" height="520" loading="lazy" style="border:0"></iframe>

Free to use. The embed shows a small "Powered by Verystep" link.

First time embedding? Read the step-by-step guide →

More free tools