$ man lcm-calculator
LCM Calculator
NAME
lcm-calculator — Find the lowest common multiple of any list of whole numbers, with the prime factorisation, the GCD and the step-by-step working shown.
SYNOPSIS
# What is a LCM calculator?
An LCM calculator finds the lowest common multiple of two or more whole numbers: the smallest positive number that every one of them divides into exactly.
WHY HERE
Maths, science and data tools for developers and analysts: SerpAPIs' technical audience.
| Number | Prime factorisation |
|---|---|
| 12 | 2^2 × 3 |
| 18 | 2 × 3^2 |
- lcm(12, 18) = 12 × 18 ÷ 6 = 36
The LCM is never smaller than your largest number and the GCD is never larger than your smallest. For exactly two numbers, LCM × GCD equals their product — the check row above.
USAGE
01 → Type the numbers
Two or more, separated by commas, spaces or new lines. A single number has no common multiple to find — its LCM is itself.
02 → Leave out zero
Every number divides zero, so a list containing 0 would give 0 as the answer, which is true and tells you nothing. Negative numbers are fine: the LCM is taken of their absolute values.
03 → Read the prime-power line
It shows every prime that appears in any of your numbers raised to its highest power. That is the factorisation method, and it is the one to copy into homework.
04 → Use the GCD as a check
For exactly two numbers, LCM × GCD always equals their product. If you are checking by hand and that does not hold, one of the two is wrong.
DESCRIPTION
The lowest common multiple of 4 and 6 is 12 because 12 is the first number in both times tables. Listing multiples works for small numbers but falls apart quickly, so the method that scales is prime factorisation: write each number as a product of primes, then take every prime that appears anywhere, raised to the highest power it reaches in any one of them. For 12 = 2² × 3 and 18 = 2 × 3², the LCM is 2² × 3² = 36.
The shortcut for two numbers is the GCD identity: lcm(a, b) = |a × b| ÷ gcd(a, b). For 12 and 18 that is 216 ÷ 6 = 36. It extends to longer lists by working pairwise — take the LCM of the first two, then the LCM of that result and the third, and so on — which is exactly the ladder of steps shown here. Running it pairwise is also why the answer never overflows: dividing by the GCD before multiplying keeps the intermediate numbers as small as possible.
The most common real use is adding fractions. The lowest common denominator of 1/4 and 1/6 is the LCM of 4 and 6, so both become twelfths: 3/12 + 2/12 = 5/12. Using any common multiple works — 24 would give 6/24 + 4/24 — but only the lowest one leaves the answer in lowest terms without extra cancelling. The same idea drives repeating schedules: two buses leaving every 12 and every 18 minutes next depart together after 36 minutes.
Watch the difference between the LCM and the GCD, because the words sound alike and the answers go opposite ways. The GCD (also called the HCF or greatest common factor) is never larger than your smallest number; the LCM is never smaller than your largest. If your answer sits between them, you have computed neither.
FAQ
## How do you calculate the LCM?
Factorise each number into primes, then multiply every prime that appears in any of them, each raised to the highest power it reaches. For two numbers you can instead divide their product by their greatest common divisor.
## What is the LCM of 4 and 6?
12. The multiples of 4 are 4, 8, 12, 16 and the multiples of 6 are 6, 12, 18, so 12 is the first number in both lists. By factors: 4 = 2², 6 = 2 × 3, so the LCM is 2² × 3 = 12.
## Is the LCM the same as the lowest common denominator?
Yes, when you are adding fractions the lowest common denominator is the LCM of the denominators. 1/4 + 1/6 both convert to twelfths because the LCM of 4 and 6 is 12.
## What is the LCM of two numbers that share no factors?
Their product. Coprime numbers such as 8 and 9 have a GCD of 1, so the identity gives 72 ÷ 1 = 72 and there is no smaller common multiple.
## Can the LCM be smaller than one of the numbers?
No. Every input has to divide into the LCM, so it is always at least as large as the biggest number you typed. It equals the biggest number exactly when that number is a multiple of all the others.