LCM Calculator

Find the least common multiple.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Enter two whole numbers to get the smallest number both divide into. LCM(21, 6) is 42, the first time the 21s and the 6s line up.

How to use

1
Step 1
Enter the first whole number.
2
Step 2
Enter the second whole number.
3
Step 3
Press Calculate to see the LCM and the GCD used.

How it works

The tool finds the GCD first and then uses LCM = a × b ÷ GCD, which is faster than listing multiples. LCM is the common denominator you need to add fractions: 1/4 + 1/6 is added over LCM(4, 6) = 12.

LCM(a, b) = a × b ÷ GCD(a, b)

Worked example

Common denominator for 15 and 20

Input
a = 15, b = 20
Output
60
Walkthrough
GCD(15, 20) = 5, so LCM = 15 × 20 ÷ 5 = 300 ÷ 5 = 60.

Limitations

  • Whole numbers of 0 or more only.
  • LCM with 0 is returned as 0.
  • Two numbers per run.

Questions

What is the LCM of 4 and 6?
LCM(4, 6) = 12, the smallest number that both 4 and 6 divide into.
What is the LCM of 12 and 18?
36.
What is the LCM of 21 and 6?
42.
What is the LCM of 10,000,000,000 and 30,000,000,000?
30,000,000,000.

Features

  • Shows the GCD used
  • Large numbers
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Scientific notation examples

    Khan Academy

    Worked examples to compare with calculator output.

    Watch on YouTube
  • Finding a percentage

    Khan Academy

    Percentage basics used across many calculator pages.

    Watch on YouTube