MATH CALCULATOR
LCM Calculator
Find the least common multiple of two positive integers quickly, with the standard GCF-based method and a worked example.
Formula: LCM(a,b) = (a × b) ÷ GCF(a,b).
What is the LCM?
The least common multiple is the smallest positive whole number that is divisible by both input numbers. It is useful for comparing repeating cycles, matching schedules, and solving fraction problems with different denominators.
LCM example
For 12 and 18, the greatest common factor is 6. Therefore, LCM = (12 × 18) ÷ 6 = 36.
When to use an LCM calculator
Use it when you need the first shared multiple of two integers or a common denominator for fractions. The result is a whole number when the inputs are positive integers.
FAQ
Can I use decimals? This calculator is designed for positive whole numbers.
What is the difference between LCM and GCF? LCM finds the smallest shared multiple, while GCF finds the largest shared factor.
How the GCF method works
The relationship LCM(a,b) = (a × b) ÷ GCF(a,b) avoids counting shared factors twice. For positive integers, the result is the smallest positive number divisible by both inputs.
Worked example
For 12 and 18, GCF(12,18) = 6, so LCM = (12 × 18) ÷ 6 = 36. The common multiples include 36, 72 and 108; 36 is the first positive one.
Practical uses
LCM is useful when repeating events need to line up, when fractions need a common denominator, or when schedules repeat at different intervals.
Prime-factor view
Another way to find an LCM is to factor each integer and take the highest power of every prime that appears. For 12 = 2² × 3 and 18 = 2 × 3², the LCM is 2² × 3² = 36.
Least common multiple: two methods
The least common multiple (LCM) of positive integers is the smallest positive integer divisible by each input. One efficient method uses the greatest common factor: LCM(a,b) = (a × b) ÷ GCF(a,b). For large integers, compute the GCF first and divide before multiplying where possible to reduce intermediate overflow in software.
Worked example: 8 and 14
The multiples of 8 are 8, 16, 24, 32, 40, 48, 56, … and the multiples of 14 are 14, 28, 42, 56, …. The first shared positive multiple is 56. Using the GCF method, GCF(8,14) = 2, so LCM = (8 × 14) ÷ 2 = 56.
Prime factor method and common use
Write 8 = 2³ and 14 = 2 × 7. Take the highest power of each prime that appears: 2³ × 7 = 56. LCM is useful for finding common denominators in fractions and for determining when repeating cycles line up. For example, cycles of 8 and 14 units coincide every 56 units when both start at the same time.
Step-by-step approach and input checks
- Use positive whole-number inputs when solving a standard school arithmetic LCM problem.
- Find the GCF of the two values, either by listing factors or using the Euclidean algorithm.
- Multiply the inputs and divide by their GCF to obtain the LCM.
- Check that the answer divides evenly by both original numbers.
For 9 and 12, GCF = 3, so LCM = (9 × 12) ÷ 3 = 36. The checks 36 ÷ 9 = 4 and 36 ÷ 12 = 3 confirm that 36 is a common multiple. The GCF formula avoids writing out long lists when numbers are large. With more than two numbers, calculate the LCM of the first pair, then combine that result with the next value and repeat.
LCM helps add fractions and align repeating cycles. It assumes exact integer periods and a common start; real schedules may include delays. If the calculator accepts zero, negative numbers or decimals, check its documented convention because the most common introductory definition is for positive integers. Always verify the returned answer against the intended mathematical definition.
LCM calculator FAQs
What is the difference between LCM and GCF?
LCM is the smallest positive shared multiple; GCF is the largest positive integer that divides both inputs.
Can the LCM be smaller than both inputs?
For positive integers, the LCM is at least as large as each input and is a multiple of both.
What if both inputs are the same?
The LCM of a positive integer with itself is that integer, because it is already the smallest positive multiple shared by both.