← All blog posts

How to use the GCD and LCM Calculator — step by step

WhiteUI · A plain-English guide to the GCD and LCM Calculator

The GCD and LCM Calculator finds two answers from two whole numbers: the greatest common divisor (GCD) and the least common multiple (LCM). It takes three steps, and the worked example below uses the numbers the tool starts with, 48 and 180.

The three steps

  • Step 1 — Type the first number. Enter it in the first box, or drag the slider underneath it. The tool starts with 48.
  • Step 2 — Type the second number. Same again in the second box. The tool starts with 180.
  • Step 3 — Read the answers. The big number is the GCD. Underneath it, the page shows the LCM and a check line proving both answers: GCD × LCM equals the product of your two numbers.

Change either number and both answers update at once, so you can try a few pairs without starting over.

Worked example

With 48 and 180, the calculator shows a GCD of 12 and an LCM of 720. You can see why: 48 splits into 4 groups of 12, and 180 splits into 15 groups of 12, so 12 is the largest number that divides both exactly. The LCM follows from the same numbers: 48 × 180 ÷ 12 = 720.

GCD of 48 and 180 = 12
LCM of 48 and 180 = 48 × 180 ÷ 12 = 720
Check: 12 × 720 = 8,640 = 48 × 180

At a glance

48 and 180 share a GCD of 1248 = 4 groups of 12180 = 15 groups of 12Both bars split into groups of 12 — 4 groups and 15 groups.
Forty-eight is 4 groups of 12 and 180 is 15 groups of 12, so 12 is their GCD.

The mistake to avoid

Typing a decimal. The calculator works with whole numbers and rounds decimals to the nearest whole number first, so 48.5 becomes 49 and the answers change. If your numbers have decimal places, they are not whole numbers — check whether you meant to enter something else, or round them yourself before you type.

Frequently asked questions

What two numbers do I enter?

Any two whole numbers from 0 up to 1,000,000,000. The tool starts with 48 and 180.

Which answer is the GCD?

The big number at the top. The LCM is listed just underneath it, with a check line proving both answers.

What happens if I enter zero?

If one number is zero, the GCD is the other number and the LCM is zero. If both are zero, the GCD and LCM are not defined.

Does the calculator work with three numbers?

No, it takes two numbers at a time. For three numbers, work out the GCD or LCM of the first two, then combine that answer with the third.

More guides on the GCD and LCM Calculator

Try it yourself

Find the GCD and LCM of any two whole numbers — free, in your browser.

Open the GCD and LCM Calculator