Home / Math / LCM Calculator

Least Common Multiple (LCM) Calculator

Enter two or more whole numbers to find the smallest number that every one of them divides into evenly. The prime factorisation of each number is shown so you can check the working.

By Adzita Editorial Team · Updated 2026-11-03 · How we build and check our tools

Two to twelve positive whole numbers, up to 1,000,000,000,000 each, separated by commas, spaces or new lines.

What the least common multiple is

A multiple of a number is what you get by multiplying it by a whole number. The common multiples of 4 and 6 include 12, 24 and 36, and the smallest of them, 12, is the least common multiple. It is the first moment two repeating cycles line up again.

The prime factor method

Write each number as a product of primes. For each prime that appears anywhere, keep its highest power, then multiply those together. For 12 = 2² × 3 and 18 = 2 × 3², the highest powers are 2² and 3², so the LCM is 4 × 9 = 36. With three numbers such as 4, 6 and 10 the same rule gives 2² × 3 × 5 = 60.

The faster route for two numbers is LCM(a, b) = a × b ÷ GCF(a, b). Dividing first, as in a ÷ GCF × b, keeps the intermediate numbers small and avoids overflow in other software. This calculator uses exact integer arithmetic, so large results stay exact.

Where the LCM helps

Checking an LCM by hand

Every input must divide the result exactly, and no smaller positive number should do so. The table row showing how many times each number goes into the LCM helps: for 4, 6 and 10 and the LCM 60 it reads 15, 10 and 6 times. A useful sanity test is that the LCM is never smaller than the largest input and never larger than the product of all inputs. When the numbers are coprime in pairs the product is exactly the LCM; otherwise shared primes make it smaller, and that saving is what the prime factor method captures.

Notes and limits

Inputs must be positive whole numbers up to one trillion. The LCM of several numbers can be far larger than any one of them, and values beyond about nine quadrillion are shown exactly in the result text but lose precision in other fields. If the numbers share no factor other than 1, the LCM is simply their product. See the GCF calculator for the greatest common factor and the steps behind it.

Worked example

Three buses leave a stop every 4, 6 and 10 minutes. The LCM tells you after how many minutes they all leave together again.

Inputs

Whole numbers4, 6, 10

Result

60

Least common multiple of 4, 6, 10.

LCM60
Built from the highest power of each prime2^2 × 3 × 5 = 60
Matching GCF2
Each number goes into the LCM15, 10, 6 times

Prime factorisation of each number

NumberPrime factors
42^2
62 × 3
102 × 5

Accuracy note: Results use standard double-precision arithmetic, so very large or very small values may be rounded. Check important results by another method.

Frequently asked questions

What is the LCM of 12 and 18?

The multiples of 12 are 12, 24, 36 and those of 18 are 18, 36, so the first shared one is 36. By primes: 2² × 3² = 36.

How do I find the LCM of three numbers?

Factor each number into primes and multiply the highest power of every prime that appears. Alternatively, find the LCM of two numbers and then the LCM of that result with the third.

Is LCM the same as lowest common denominator?

For fractions, the lowest common denominator is the LCM of the denominators. The two ideas are the same calculation applied to different problems.

What is the LCM of two numbers with no common factor?

It is their product. For 8 and 15 there is no shared prime, so the LCM is 120.

Can I include 1?

Yes. Since 1 divides every number, including it never changes the LCM.

GCF CalculatorGreatest common factor (GCD) of two or more whole numbers, with Euclidean algorithm steps.Prime Factorization CalculatorPrime factors of a whole number up to 10^12, with divisor count, divisor sum and a factor table.Fraction CalculatorAdd, subtract, multiply and divide fractions and mixed numbers with simplified, mixed and decimal answers.Percentage CalculatorPercent of a number, percent change, and increase or decrease by a percent, with working.

References and sources

  1. Euclid, Elements Book VII, for the relationship between the greatest common divisor and the least common multiple.
  2. Hardy, G. H. and Wright, E. M., An Introduction to the Theory of Numbers, on prime factorisation and multiples.

Check primary sources for anything you rely on.