Sign up

LCM

Find the smallest positive number divisible by all the given integers.

Number Input

Enter two or more integers separated by commas or spaces.

Least Common Multiple
—

Calculation Breakdown:

Enter values to compute.

Pairwise Relationship
—
Find the Least Common Multiple of numbers.

About this topic

Least Common Multiple (LCM) The smallest number divisible by a set of integers.

The LCM is the smallest positive integer that is divisible by all numbers in a given set. It is heavily used in adding fractions and synchronizing events.

Key formulas & rules

  • •Always positive
  • •LCM(a, b) ≥ max(a, b)
  • •LCM(a, a) = a
  • •LCM(1, a) = a
  • •Can be found by listing multiples
  • •Related to the GCD by a formula

Examples

Input Output Note
LCM(4, 6) 12 Smallest common
LCM(5, 7) 35 Coprime
LCM(10, 15) 30 Standard
LCM(3, 9) 9 One divides the other

Real-world uses

Adding fractions Gear rotations Traffic lights syncing
The GCD-LCM Identity How LCM and GCD are mathematically linked.

For any two positive integers a and b, the product of their LCM and GCD equals the product of the numbers themselves. This allows you to calculate LCM using the Euclidean algorithm.

Key formulas & rules

  • •Formula: LCM(a, b) × GCD(a, b) = a × b
  • •Provides a fast computational shortcut
  • •Works only for two numbers at a time
  • •Can be extended to multiple numbers
  • •Proves that LCM × GCD is constant for a pair

Examples

Input Output Note
LCM(4, 6) 12 GCD is 2
Product 24 4 × 6
12 × 2 24 Identity holds
LCM(8, 12) 24 GCD is 4

Real-world uses

Algorithm optimization Number theory Cryptography

Modes & formulas

1

LCM Calculation

• The LCM is the smallest positive integer divisible by every integer you enter. • Enter two or more positive integers. • The calculator uses the GCD identity to calculate the result efficiently and shows the pairwise relationship.
LCM(a, b) = |a × b| / GCD(a, b)

This identity converts the LCM problem into a GCD problem, which is much faster to compute via the Euclidean algorithm.

How to use it

Enter two or more integers separated by commas or spaces. The tool displays the LCM and the GCD-product relationship for the first pair.

Frequently asked questions

Why is the LCM of 0 undefined?
Zero is divisible by every integer, so there is no smallest positive common multiple. The tool rejects zero input.
What is the relationship between LCM and GCD?
For any two positive integers a and b: LCM(a, b) × GCD(a, b) = a × b.
What is the Least Common Multiple (LCM)?
The smallest positive integer that is perfectly divisible by two or more given integers.
How is LCM used in adding fractions?
The denominators must be the same before you can add fractions. The LCM of the denominators gives you the Least Common Denominator.
How is LCM related to GCD?
For any two positive integers a and b, the product of their GCD and LCM equals the product of the numbers: GCD × LCM = a × b.
What is the LCM of coprime numbers?
It is their product. For example, LCM(9, 10) = 90.

Related calculators

Read the full LCM guide — examples & 18 FAQs