CalculatorVilla

LCM Calculator

Compute the Least Common Multiple (LCM)—the smallest positive integer that is divisible by both given numbers without a remainder. Essential for adding fractions and harmonizing cyclical periodic intervals.

Least Common Multiple (LCM): 1

First positive integer

Second positive integer

Least Common Multiple (LCM)
1.00

How to Use This Calculator

  1. Enter the first integer (A).
  2. Enter the second integer (B).
  3. View the computed LCM, dual GCD equivalent, and sequential multiples.

Formula & Calculation Methodology

lcm(a, b) = (|a × b|) ÷ gcd(a, b)

The least common multiple is calculated by multiplying both integers and dividing their absolute product by their greatest common divisor (GCD).

lcm(a, b)Least common multiple of integers a and b
gcd(a, b)Greatest common divisor
|a × b|Absolute product of operands

Worked Example

Finding LCM of 12 and 18

numA: 12
numB: 18
Result: LCM = 36 (GCD = 6, Product = 216)

Finding LCM of 15 and 25

numA: 15
numB: 25
Result: LCM = 75 (GCD = 5, Product = 375)

Frequently Asked Questions

How is LCM used in adding fractions?↓

The LCM of the denominators is the Lowest Common Denominator (LCD). Converting fractions to this common denominator allows straightforward addition or subtraction.

What is the LCM of two prime numbers?↓

Because two distinct primes have no common factors other than 1 (GCD = 1), their LCM is simply their direct product (a × b).

Can the LCM be smaller than either input number?↓

No. The LCM must be a multiple of both inputs, so it is always greater than or equal to the larger of the two numbers.

What is a limitation when evaluating very large integers?↓

If a × b exceeds JavaScript’s safe integer limit (9,007,199,254,740,991), dividing before multiplying (e.g. (a / gcd) * b) is required to prevent overflow.

Related Calculators

Source Citation & Disclaimer

Informational tool only; not licensed tax, legal, or financial advice.