A Least Common Multiple (LCM) calculator finds the smallest positive integer that is divisible by both input numbers.
What is an LCM calculator?
An LCM calculator finds the least common multiple of two positive whole numbers, the smallest value divisible by both inputs. It uses prime factorization and the formula LCM = |a × b| ÷ GCF(a, b). The screen shows prime powers for each number and how they combine into the LCM. Scheduling two buses that arrive every a and b minutes repeats at the LCM stop time. Gear teeth counts that mesh cleanly also share an LCM on their rotation periods.
How to use the LCM Calculator
- Enter the first positive whole number.
- Enter the second positive whole number.
- Read the LCM in the blue result card.
- Review prime factor rows for each input.
- Use the fraction hint to add unlike denominators.
About this calculator
A Least Common Multiple (LCM) calculator finds the smallest positive integer that is divisible by both input numbers. LCM is used in adding fractions with different denominators, scheduling recurring events, and solving problems in number theory.
LCM is calculated using the relationship: LCM(a, b) = |a × b| / GCF(a, b), where GCF is the Greatest Common Factor.
How the math works
- : The two integers
- : Greatest Common Factor of a and b
- : Smallest number divisible by both a and b
LCM example: 12 and 18
Enter 12 and 18. Prime factors: 12 = 2² × 3 and 18 = 2 × 3². Take the highest power of each prime: 2² and 3², so LCM = 4 × 9 = 36. Check: 36÷12 = 3 and 36÷18 = 2.
To add 1/12 + 1/18, use 36 as the common denominator: 3/36 + 2/36 = 5/36. The calculator shows that same sum line when both numbers are entered.
You can also verify with LCM = (12×18)÷GCF(12,18) = 216÷6 = 36. Bus routes that repeat every 12 and 18 minutes align every 36 minutes at the same stop. Changing either input updates the prime factor rows and the sample fraction sum instantly.
Common uses
- Find a common denominator for adding or subtracting fractions
- Schedule events that repeat at different intervals
- Solve gear ratio problems in engineering
- Determine when two periodic processes align
Frequently asked questions
What is the LCM of 4 and 6?
LCM(4, 6) = |4 × 6| / GCF(4, 6) = 24 / 2 = 12. The LCM is 12 because 12 is the smallest number divisible by both 4 (12÷4=3) and 6 (12÷6=2).
How do I use LCM to add 2/5 and 3/7?
LCM(5, 7) = 35. Convert to 14/35 + 15/35 = 29/35. Enter 5 and 7 in the LCM tool to confirm 35 before you rewrite the fractions.
Is LCM always at least as large as the bigger input?
Yes. The LCM is a multiple of both numbers, so it must be ≥ the larger input. When one number divides the other, the LCM equals the larger number.
What is the LCM of 15 and 20?
LCM(15, 20) = 60. Prime form: 15 = 3×5 and 20 = 2²×5, so LCM = 2²×3×5 = 60. Both 15 and 20 divide 60 evenly.
What is the LCM of 8 and 12 for adding fractions?
LCM(8, 12) = 24. Use 24 as the common denominator: 1/8 = 3/24 and 1/12 = 2/24, so 1/8 + 1/12 = 5/24. Enter 8 and 12 to see prime steps 2³ and 2²×3.
Related calculators
- Standard Deviation Calculator
- Average Calculator
- GCF Calculator
- Binary Converter
- Hex Converter
- Roman Numeral Converter
- Unit Converter
- Probability Calculator
Maintained by J Jaya Prakash · Last updated: October 2026