Skip to content

LCM Calculator

Find the least common multiple of two numbers instantly.

How to use lcm calculator

  1. Type the first number into the "First number" box.
  2. Type the second number into the "Second number" box.
  3. The least common multiple appears instantly, with the greatest common factor shown underneath.
  4. Change either number or clear a box to start over.

Examples

LCM of 4 and 6

The smallest number appearing on both lists of multiples is 12 — that is the least common multiple.

When two buses meet again

One bus departs every 12 minutes, another every 18 minutes. They leave together every 36 minutes — LCM(12, 18).

Common denominator of 1/6 and 1/8

To add fractions you need a shared denominator: LCM(6, 8) = 24, so 1/6 + 1/8 becomes 4/24 + 3/24 = 7/24.

What is LCM?

The least common multiple (LCM) of two numbers is the smallest number that is a multiple of both. The multiples of 4 are 4, 8, 12, 16 and so on; the multiples of 6 are 6, 12, 18 and so on. The first number to appear on both lists is 12, so LCM(4, 6) = 12. Where the GCF shrinks numbers down to what they share, the LCM grows to the first place both cycles line up.

The classic LCM question is synchronization. If one bus leaves the station every 12 minutes and another every 18 minutes, they depart together every 36 minutes — the LCM of 12 and 18. The same math tells you when two blinking lights next flash at the same moment, how often two on-call rotations collide, or the smallest gear setup that brings both gears back to their starting marks. It is also the workhorse of fraction arithmetic: to add 1/4 and 1/6 you rewrite both fractions over the LCM of the denominators, 12.

This page computes the LCM from the greatest common factor using the relationship LCM(a, b) = |a × b| / GCF(a, b). Both numbers appear as you type, the LCM as the headline result with the GCF underneath, and everything runs locally in your browser — no uploads, no waiting.

Frequently asked questions

How do you use the LCM to add fractions?

Rewrite each fraction over the LCM of the denominators. To add 1/6 and 1/8, the LCM is 24, so the sum becomes 4/24 + 3/24 = 7/24. Using the LCM keeps the numbers as small as possible.

Two buses leave at the same time — when do they leave together again?

If one runs every 12 minutes and the other every 18 minutes, simultaneous departures recur every LCM(12, 18) = 36 minutes. Any repeating schedule with the same two intervals works the same way.

What is the difference between LCM and GCF?

The LCM is the smallest shared multiple; the GCF is the largest shared divisor. For 4 and 6 the LCM is 12 and the GCF is 2, and they always satisfy LCM(a, b) × GCF(a, b) = |a × b|.

What is the LCM if one number is 0?

Only 0 is a multiple of 0, and 0 is a multiple of every number, so this calculator reports LCM(0, n) = 0. For any non-zero pair you always get a positive result.

Is the LCM always at least as big as both numbers?

Yes. It is never smaller than either input, and it equals the larger number when one input divides the other — for example LCM(3, 6) = 6.

How is the LCM calculated here?

The calculator first finds the greatest common factor with the Euclidean algorithm, then divides the absolute product of the two numbers by it: LCM(a, b) = |a × b| / GCF(a, b). This is far faster than listing multiples.