Enter two, three, or four positive integers in this LCM calculator and get the Least Common Multiple instantly. The first two fields are required; fields No. 3 and No. 4 are optional. Click Calculate to see the result.
LCM Calculator
Least Common Multiple of up to 4 numbers
Fill in at least the first two fields with positive integers. Fields No. 3 and No. 4 are optional.
How to use the calculator
- Enter a positive integer in field No. 1 and another in field No. 2 — these two are required.
- To calculate the LCM of three or four numbers, also fill in fields No. 3 and No. 4.
- Click Calculate. The result will appear in the LCM field.
- Click Clear to reset.
What is the LCM
The Least Common Multiple (LCM) of two or more integers is the smallest positive value that is a multiple of all of them at the same time. In other words, it is the smallest number that each of the values divides exactly, leaving no remainder.
The LCM has concrete everyday applications: finding the least common denominator when adding fractions, discovering when two events that occur at regular intervals will coincide again, and solving fair-division problems are some of the most common contexts both in school exercises and in practical life.
How to calculate the LCM
The simultaneous division method — also called the "ladder" method — is widely taught:
- Write the numbers side by side, separated by a vertical bar.
- Choose the smallest prime that divides at least one of them and divide all that are divisible; carry down unchanged any that are not.
- Continue until all quotients are 1.
- Multiply all the prime divisors used: that product is the LCM.
For two numbers, there is also the direct formula:
LCM(a, b) = (a × b) ÷ GCD(a, b)
Example: LCM(12, 18)
- 12 and 18 divided by 2 → 6 and 9
- 6 divided by 2 → 3; 9 not divisible, stays 9
- 3 and 9 divided by 3 → 1 and 3
- 3 divided by 3 → 1
- LCM = 2 × 2 × 3 × 3 = 36
Practical examples
| Numbers | LCM | Typical situation |
|---|---|---|
| 4 and 6 | 12 | Least common denominator of ¼ and ⅙ |
| 12 and 18 | 36 | Smallest number divisible by both 12 and 18 |
| 8, 12 and 16 | 48 | Three events repeating every 8, 12 and 16 days coincide on day 48 |
| 6, 10 and 15 | 30 | Smallest quantity distributable into groups of 6, 10 and 15 |
| 5 and 7 | 35 | Coprime numbers: LCM is always their product |
Frequently asked questions about LCM
What is the LCM (Least Common Multiple)?
The LCM of two or more integers is the smallest positive value that is a multiple of all of them at the same time. For example, LCM(4, 6) = 12, because 12 is the smallest number that both 4 and 6 divide exactly without a remainder.
How do you calculate the LCM using the simultaneous division method?
Place the numbers side by side and divide all of them by a prime that divides at least one — numbers not divisible are carried down unchanged. Repeat until all quotients reach 1. The LCM is the product of all the prime divisors used throughout the process.
Is the LCM of two coprime numbers always their product?
Yes. When two numbers share no common prime factor — that is, their GCD is 1 — their LCM is exactly the product of the two. Examples: LCM(5, 7) = 35; LCM(4, 9) = 36.
What is the relationship between LCM and GCD?
For two positive integers a and b, it always holds that:
LCM(a, b) × GCD(a, b) = a × b
This property allows you to calculate the LCM from the GCD (and vice versa) without factoring the numbers again.
What is the LCM used for in practice?
The LCM is fundamental for adding or subtracting fractions with different denominators — the LCM of the denominators provides the least common denominator. It is also used in problems involving periodic events (finding when two or more cycles will coincide again) and in fair-distribution problems with no remainders.
Read also…
