LCM Calculator Formula
Understand the math behind the lcm calculator. Each variable explained with a worked example.
Formulas Used
Lcm Val
lcm_val = abs(a * b) / gcd(a, b)Gcd Val
gcd_val = gcd(a, b)Product
product = a * bVariables
| Variable | Description | Default |
|---|---|---|
a | Number A | 12 |
b | Number B | 18 |
How It Works
Least Common Multiple (LCM)
Definition
The LCM of two numbers is the smallest positive integer that is divisible by both numbers.
Formula
LCM(a, b) = / GCD(a, b)a × b
Example
LCM(12, 18):
Worked Example
Find LCM(12, 18).
- 01GCD(12, 18) = 6
- 02LCM = (12 × 18) / 6
- 03= 216 / 6
- 04= 36
Frequently Asked Questions
What is LCM?
The least common multiple is the smallest number that both numbers divide into evenly. For example, LCM(4, 6) = 12.
When is LCM useful?
LCM is used when adding fractions (finding a common denominator), scheduling events that repeat at different intervals, and in number theory.
What is the relationship between GCD and LCM?
GCD(a,b) × LCM(a,b) = a × b. Knowing one lets you calculate the other.
Learn More
Guide
Understanding Prime Numbers - Complete Guide
Learn what prime numbers are, how to identify them, prime factorization, the Sieve of Eratosthenes, and why primes matter in cryptography and mathematics.
Ready to run the numbers?
Open LCM Calculator