LCM Calculator
Find the Least Common Multiple (LCM) of multiple numbers easily.
What Is the LCM Calculator?
LCM (Least Common Multiple) is the smallest positive number that is a multiple of every number you enter. It's commonly used to add or compare fractions with different denominators, since converting fractions to a shared denominator requires finding a number that all the original denominators divide into evenly.
LCM and its counterpart, GCD (Greatest Common Divisor, also called HCF), are two sides of the same coin: for any two numbers, their LCM and GCD are linked by the identity LCM(a, b) × GCD(a, b) = a × b, which is exactly the relationship this calculator uses to compute the LCM without listing out multiples one by one. The underlying idea traces back to Euclid's algorithm for finding GCD, one of the oldest algorithms still in everyday use, described in Euclid's Elements around 300 BCE.
For the closely related "largest shared factor" calculation, see the HCF (GCD) Calculator. If you're working with fractions directly rather than just their denominators, the Fraction Calculator applies this same LCM logic automatically when adding or subtracting.
LCM Calculator Formula
LCM(a, b) = (a × b) ÷ GCD(a, b)
How Is the LCM Calculator Calculated?
The product of two numbers always equals their LCM multiplied by their GCD, so dividing the product by the GCD isolates the LCM — this formula extends to more than two numbers by applying it pairwise across the list: first find the LCM of the first two numbers, then find the LCM of that result and the third number, and so on.
An equivalent way to think about it is through prime factorization: every number breaks down into a unique product of prime factors, and the LCM takes the highest power of each prime that appears in any of the numbers. For example, 12 = 2² × 3 and 18 = 2 × 3², so the LCM needs 2² and 3², giving 4 × 9 = 36 — the same answer the GCD-based formula produces, just arrived at from a different direction.
LCM Calculator Example
LCM(4, 6): GCD = 2, so LCM = (4 × 6) ÷ 2 = 12.
LCM(12, 18): GCD = 6, so LCM = (12 × 18) ÷ 6 = 216 ÷ 6 = 36.
LCM(4, 6, 8) with three numbers: first LCM(4, 6) = 12, then LCM(12, 8) — GCD(12, 8) = 4, so LCM = (12 × 8) ÷ 4 = 96 ÷ 4 = 24.
How to Use the LCM Calculator
Step 1
Enter your numbers separated by commas (e.g. 4, 6, 8).
Step 2
Click Calculate LCM.
Step 3
View the LCM and GCD (HCF) of the numbers.
Step 4
Use the LCM as the common denominator if you're adding or comparing fractions by hand.
Step 5
For scheduling problems, treat each recurring interval as one of the input numbers — the LCM tells you when they next align.
Step 6
Cross-check a small result by listing multiples of each number until you spot the first shared one.
Benefits
- Handles any number of values at once, not just pairs.
- Computes GCD (HCF) alongside LCM in a single step, saving a second lookup.
- Removes manual prime-factorization work and the risk of missing a factor.
- Scales instantly to larger numbers where listing out multiples by hand would be slow.
- Gives you a result card you can drop straight into a chat when settling a scheduling question with someone else.
- Free, fast, and works entirely in your browser.
Common LCM Calculator Scenarios
Scenario 1
Finding a common denominator to add or compare fractions.
Scenario 2
Solving scheduling problems, like when two repeating events next coincide.
Scenario 3
Simplifying ratios or step sizes in manufacturing and design.
Scenario 4
Working out when two blinking lights, alarms, or machine cycles next line up.
Scenario 5
Determining the smallest batch size that divides evenly across several different group sizes.
Scenario 6
Checking textbook or exam answers involving least common multiples.
Understanding Your Result
The LCM is the smallest number that all your entered values divide into evenly. The GCD (HCF) is the largest number that divides evenly into all of them — together they describe how the numbers relate multiplicatively, and their product always equals the product of the original two numbers (for the two-number case).
A useful sanity check: the LCM is always at least as large as the biggest number you entered, and it's only equal to the simple product of your numbers when they share no common factors (their GCD is 1). If your result looks smaller than the largest input, or exactly equal to the product when the numbers clearly share a factor, something went wrong with the input.
Tips
- For fractions with different denominators, the LCM of the denominators gives you the smallest common denominator to use.
- If all your numbers are already multiples of one of them, that number is the LCM.
- Prime numbers have an LCM equal to their simple product, since they share no common factors.
- For three or more numbers, the LCM is found by combining them two at a time, not by multiplying every number together.
- If two numbers are equal, their LCM is simply that number, since it trivially divides into itself.
Common Mistakes
- Confusing LCM (smallest common multiple) with GCD (largest common divisor) — they answer opposite questions.
- Assuming LCM of two numbers is always their product — that's only true when the GCD is 1.
- Entering zero or negative numbers, which are not valid for LCM calculations.
- Trying to find the LCM of three or more numbers by multiplying them all together, which overcounts shared factors.
- Forgetting that the LCM of a set including 1 is simply the LCM of the remaining numbers, since every number is a multiple of 1.
Frequently Asked Questions
Where is LCM used in real life?
LCM is commonly used to find a common denominator when adding or comparing fractions, and to solve scheduling problems (like when two repeating events coincide).
What is the relationship between LCM and GCD?
For two numbers, LCM × GCD equals the product of the two numbers — this calculator computes both simultaneously.
Can I calculate LCM for more than two numbers?
Yes, enter as many numbers as you like, separated by commas, and the calculator finds the LCM across all of them.
What is the LCM of two prime numbers?
Since two distinct prime numbers share no common factors besides 1, their LCM is simply their product.
Why is LCM useful for adding fractions?
Using the LCM of the denominators as the common denominator keeps the numbers as small as possible, avoiding unnecessarily large intermediate values.
What is the LCM of two numbers that share no common factors?
If two numbers share no common factors other than 1 (are coprime), their LCM is simply their product.
How is LCM used when adding fractions with different denominators?
Finding the LCM of the denominators gives you the smallest common denominator to convert both fractions to before adding or subtracting them.
Can LCM be smaller than one of the input numbers?
No — LCM is always greater than or equal to the largest number entered, since it must be a multiple of every number in the set.
What's the LCM of a number and itself?
The LCM of a number and itself is simply that number.
Can I share my LCM result as an image?
Yes — tap Share and, on supported devices, your result is shared as a branded image card, not just a text link.
How is LCM related to GCD (HCF) mathematically?
For any two numbers, LCM(a, b) × GCD(a, b) = a × b — knowing one lets you compute the other directly, which is exactly how this calculator finds the LCM without listing multiples.
What's the LCM of three or more numbers with no common factor among them?
If the numbers share no common factor across all of them, the LCM can still be smaller than their full product, since it only needs to account for factors shared between pairs, not necessarily by all numbers at once.
Does the order I enter the numbers change the LCM?
No — LCM is commutative, so entering 4, 6, 8 or 8, 6, 4 produces exactly the same result.
Why is LCM important for scheduling problems?
If two events repeat every m and n days respectively, they next coincide after LCM(m, n) days — the same math used for fraction denominators applies directly to recurring events.
References
Important Information
Only positive whole numbers are valid inputs for LCM and GCD calculations.
Last updated: July 25, 2026