Resource · Guide or article
Least common multiple
Covers the least common multiple: definition, a listing method for small numbers, and the GCD-based formula.
Reviewed
Open the original: Least common multiple (opens the original site in a new tab)Add to a roadmap
Keep this resource with a roadmap you follow. It appears as your own extra resource; the roadmap's steps don't change and it doesn't count toward your tracked steps.
Source content: English
In arithmetic and number theory, the least common multiple, lowest common multiple, or smallest common multiple of two integers a and b, usually denoted by LCM(a, b), is the smallest positive integer that is divisible by both a and b. Since division of integers by zero is undefined, this definition has meaning only if a and b are both different from zero. However, some authors define lcm(a,0) as 0 for all a, which is the result of taking the lcm to be the least upper bound in the lattice of divisibility. Common multiples of 4 and 6 are simply the numbers that are in both lists: So, from this list of the first few common multiples of the numbers 4 and 6, their least common multiple is 12.
PrepKit overview
PrepKit editors wrote and reviewed this overview from the source repository. It is not text from the resource itself.
- Suited to
- The source does not state a level
- Format
- Reference
What it covers
- Definition, with the zero caveat and the lcm(a, 0) convention
- LCM(4, 6) = 12 found by listing multiples
- lcm(a, b) = |a * b| / gcd(a, b)
- A Venn diagram of 2, 3, 4, 5 and 7 with a 60-card dealing example
How to use it
PrepKit study advice, not a claim made by the source.
Implement lcm via GCD, dividing before multiplying, and fold it over 2, 3, 4 and 5 to get 60.
Scope and limitations
No overflow, complexity or GCD method is discussed.
Access and format
Free English README on GitHub in the MIT-licensed trekhleb/javascript-algorithms repository.
Reviewed by PrepKit on Oct 2, 2026. Listing source commit: 85293e3e2b88
Evidence behind this overview
- src/algorithms/math/least-common-multiple/README.md
Pages that include this
Get the PrepKit newsletter
Optional. You don't need it to use PrepKit.