Step-by-step
Key steps (using GCD):
This tool calculates the least common multiple (LCM) of two or three integers and shows the result step by step (with steps) using the GCD relationship. Enter $a$ and $b$ (negatives are allowed), and optionally $c$, to compute the LCM, see the GCD used behind the scenes, and handle cases like $0$. LCM is most useful when you need the smallest common denominator for adding or subtracting fractions. For more number-structure topics like LCM, explore Number Theory.
Enter two integers to compute the LCM (least common multiple).
Integer values only. Decimals are not allowed.
You can use negative numbers too.
Optional third value
The least common multiple (LCM) of two or three integers is the smallest positive integer that is a multiple of each. If you list the multiples of each number, the LCM is the first value that appears in all lists.
When you add or subtract fractions, you need a common denominator that both denominators can divide. Any common multiple works, but the LCM gives the smallest common denominator, which keeps the arithmetic clean.
If your goal is simplifying or factoring common integer parts, use the GCD Calculator. If you need to know whether a number is prime (which affects factor structure), use the Prime Checker.
A reliable way to compute the LCM is through the relationship between LCM and GCD. The calculator first finds the GCD using the Euclidean algorithm, then uses that value to compute the LCM. This avoids listing multiples and stays fast even for larger inputs. If you want to compute the GCD directly, use the GCD Calculator.
When $c$ is provided, the calculator applies the same rule step by step: first compute $\operatorname{lcm}(a,b)$, then compute the LCM of that result with $c$.
If any input is $0$, the LCM is $0$. If all inputs are $0$, this calculator returns $0$ by convention.
This tool is designed for integers. If you enter a negative number, the sign does not affect the LCM because the result is reported as a positive magnitude. If you enter a decimal, it is not treated as a standard integer LCM problem.
Use this for a quick LCM using the GCD relationship, without listing multiples.
Find: $$\operatorname{lcm}(12,18)$$ A clean approach is to use the GCD relationship instead of listing multiples.
First compute the GCD: $$\gcd(12,18)=6$$
Then: $$\operatorname{lcm}(12,18)=\frac{|12\cdot18|}{6}=36$$
Use this when adding fractions and you want the smallest common denominator.
Add: $$\frac{1}{6}+\frac{1}{8}$$ The smallest common denominator is: $$\operatorname{lcm}(6,8)$$
Compute: $$\gcd(6,8)=2,\quad \operatorname{lcm}(6,8)=\frac{|6\cdot8|}{2}=24$$
Convert and add: $$\frac{1}{6}=\frac{4}{24},\quad \frac{1}{8}=\frac{3}{24} \Rightarrow \frac{4}{24}+\frac{3}{24}=\frac{7}{24}$$
Use this when you need the LCM of $a$, $b$, and an optional $c$. The calculator computes it step by step (with steps) by chaining: first $\operatorname{lcm}(a,b)$, then $\operatorname{lcm}(\text{result},c)$.
Find: $$\operatorname{lcm}(12,18,30)$$ Use the chaining rule: $$\operatorname{lcm}(12,18,30)=\operatorname{lcm}(\operatorname{lcm}(12,18),30)$$
First compute $\operatorname{lcm}(12,18)$ using the GCD relationship. Start with the GCD (Euclidean algorithm steps): $$18 = 12\cdot 1 + 6$$ $$12 = 6\cdot 2 + 0 \Rightarrow \gcd(12,18)=6$$
Then: $$\operatorname{lcm}(12,18)=\frac{|12\cdot18|}{6}=36$$
Now combine with $c$: $$\operatorname{lcm}(36,30)$$ Compute the GCD (with steps): $$36 = 30\cdot 1 + 6$$ $$30 = 6\cdot 5 + 0 \Rightarrow \gcd(36,30)=6$$
Finally: $$\operatorname{lcm}(36,30)=\frac{|36\cdot30|}{6}=180$$ So: $$\operatorname{lcm}(12,18,30)=180$$
Use this to see how LCM behaves when one input is $0$.
Find: $$\operatorname{lcm}(0,15)$$ Any common multiple must be a multiple of $0$, and the only multiple of $0$ is $0$.
So: $$\operatorname{lcm}(0,15)=0$$
Keep exploring Mathematics or jump back to Calculators to browse more tools.
Quick answers about LCM, multiples, and common denominators.
Trusted by thousands of users every month. Fast, accurate and privacy-friendly tools.