Find the least common multiple of integers using prime factors or the relationship between LCM and GCF.

LCM Calculator

Find the least common multiple of two or more whole numbers. Enter numbers separated by commas, spaces, or new lines.

An LCM Calculator finds the smallest common multiple of two or more integers.

LCM stands for:

least common multiple

It is useful when several integer patterns need to meet at the same value, such as finding a common denominator, synchronizing repeating intervals, comparing cycles, or determining when regularly repeating events align.

For positive integers, the LCM is the smallest positive integer divisible by every number in the list.

Enter every integer that must divide the result, then check that the calculated LCM is divisible by each one without a remainder.

What a least common multiple means

Consider:

4 and 6

Positive multiples of 4 include:

4, 8, 12, 16, 20, 24…

Positive multiples of 6 include:

6, 12, 18, 24, 30…

The first positive number appearing in both lists is:

12

Therefore:

LCM(4, 6) = 12

There are many larger common multiples, such as:

24, 36, 48…

but 12 is the least one.

How to use the LCM Calculator

  1. Enter two or more integers.
  2. Include every value that must divide the final result.
  3. Calculate the LCM.
  4. Divide the result by each original input.
  5. Confirm that every quotient is a whole number.
  6. Check the calculator’s stated convention if zero is included.

Negative signs do not normally change the positive LCM of nonzero inputs.

LCM is different from GCF

The LCM asks:

What is the smallest number that all the inputs divide into evenly?

The GCF asks:

What is the largest number that divides all the inputs evenly?

For:

12 and 18

the results are:

GCF(12, 18) = 6

and:

LCM(12, 18) = 36

These solve different types of problems.

Three common ways to find an LCM

MethodUseful when
Listing multiplesInputs are small
Prime factorizationYou want to see exactly which prime powers are required
GCF formulaTwo integers are given and their GCF is known or easy to find

For several integers, pairwise LCM calculations can be repeated until every input has been included.

Method 1: listing multiples

For small numbers, you can list multiples until a common value appears.

Find:

LCM(6, 8)

Multiples of 6:

6, 12, 18, 24, 30, 36…

Multiples of 8:

8, 16, 24, 32, 40…

The smallest shared positive multiple is:

24

Therefore:

LCM(6, 8) = 24

This method is easy to understand but becomes inefficient for large values.

Method 2: prime factorization

Prime factorization expresses each number as a product of prime powers.

Consider:

24 and 90

Factor 24:

24 = 2³ × 3

Factor 90:

90 = 2 × 3² × 5

For the LCM, include every prime that appears and use the highest exponent required by any input.

So choose:

2³

3²

and:

5

Then:

LCM = 2³ × 3² × 5

= 8 × 9 × 5

= 360

Therefore:

LCM(24, 90) = 360

Why the highest prime exponents are used

The final LCM must contain enough prime factors to be divisible by every original number.

For:

24 = 2³ × 3

the result must contain at least:

2³

For:

90 = 2 × 3² × 5

it must contain at least:

3²

and:

5

Using smaller exponents would make the result fail to divide evenly by at least one input.

That is why the LCM uses the highest required exponent for each prime.

Do not use the GCF exponent rule

The GCF and LCM use opposite prime-factor rules.

For the GCF:

Use the lowest exponent shared by every number

For the LCM:

Use the highest exponent needed by any number

For example:

12 = 2² × 3

18 = 2 × 3²

GCF:

2¹ × 3¹ = 6

LCM:

2² × 3² = 36

Confusing these two rules changes the answer.

Method 3: use the GCF

For two nonzero integers:

LCM(a, b) = |a × b| ÷ GCF(a, b)

For example:

a = 12

b = 18

First:

GCF(12, 18) = 6

Then:

LCM(12, 18) = |12 × 18| ÷ 6

= 216 ÷ 6

= 36

So:

LCM(12, 18) = 36

Divide before multiplying when values are large

The equivalent formula can be evaluated as:

LCM(a, b) = |a ÷ GCF(a, b) × b|

when the division is exact.

For example:

LCM(48, 180)

First:

GCF(48, 180) = 12

Then:

48 ÷ 12 = 4

Now:

4 × 180 = 720

So:

LCM(48, 180) = 720

This can keep intermediate values smaller than multiplying 48 and 180 first.

That is especially useful in software or calculations involving very large integers.

Finding the LCM of more than two numbers

For several numbers, combine them pair by pair.

Find:

LCM(6, 8, 15)

First:

LCM(6, 8) = 24

Then:

LCM(24, 15) = 120

Therefore:

LCM(6, 8, 15) = 120

Check:

120 ÷ 6 = 20

120 ÷ 8 = 15

120 ÷ 15 = 8

Every quotient is a whole number.

The pairwise order does not change the final LCM

You could instead calculate:

LCM(8, 15) = 120

then:

LCM(120, 6) = 120

The same result appears.

For a finite collection of positive integers, the final LCM is independent of the order in which pairwise combinations are performed.

A later number may introduce a new prime factor

Consider:

4, 8, and 15

First:

LCM(4, 8) = 8

But 15 introduces the prime factors:

3 × 5

So:

LCM(8, 15) = 120

The later value can substantially increase the result even when the first pair has a small LCM.

Duplicate inputs do not change the result

For example:

LCM(6, 8, 8)

is the same as:

LCM(6, 8)

which is:

24

Repeating a number does not introduce any new prime factor requirement.

A number that divides another input may add nothing

Consider:

LCM(4, 12)

Because:

12

is already divisible by:

4

the LCM is simply:

12

Likewise:

LCM(3, 6, 12) = 12

Every smaller input already divides the largest one.

The largest input is not always the LCM

Consider:

8 and 12

The largest input is:

12

But:

12 ÷ 8 = 1.5

so 12 is not divisible by 8.

The actual LCM is:

24

Never assume the largest input is automatically the answer.

It works only when every other input divides it exactly.

Coprime numbers have an LCM equal to their product

If two positive integers share no common factor greater than 1, then:

GCF = 1

For example:

8 and 15

are coprime.

Therefore:

LCM(8, 15) = 8 × 15 = 120

This follows directly from:

LCM(a,b) = |ab| / GCF(a,b)

Use the LCM to find a common denominator

One of the most common uses of the LCM is fraction addition and subtraction.

Consider:

5/12 + 7/18

The denominators are:

12 and 18

Find:

LCM(12, 18) = 36

So use:

36

as the least common denominator.

Convert:

5/12 = 15/36

and:

7/18 = 14/36

Now add:

15/36 + 14/36 = 29/36

Using the LCM keeps the common denominator as small as possible.

Any common denominator can work, but the LCM is efficient

For:

1/4 + 1/6

you could use:

24

as a common denominator.

But:

LCM(4, 6) = 12

So:

1/4 = 3/12

and:

1/6 = 2/12

Then:

3/12 + 2/12 = 5/12

Using 12 produces smaller intermediate values than using 24.

LCM and repeating schedules

Suppose one event occurs every:

12 seconds

and another occurs every:

18 seconds

If both occur together at time zero, they will next align after:

LCM(12, 18)

which is:

36 seconds

At 36 seconds:

36 ÷ 12 = 3

and:

36 ÷ 18 = 2

So both schedules reach an event point simultaneously.

Starting together is an important assumption

The LCM alone works for synchronization when the cycles begin at the same reference point.

Suppose:

Signal A repeats every 12 seconds

and:

Signal B repeats every 18 seconds

but Signal B starts:

5 seconds later

The LCM of the periods is still:

36

but that does not automatically tell you the next time their events occur together.

The phase or starting offset must also be included.

LCM can describe repeating machine cycles

Imagine one machine completes a cycle every:

8 minutes

and another every:

12 minutes

If both begin together:

LCM(8,12) = 24

So their cycle completions align again every:

24 minutes

This same idea can apply to:

  • maintenance cycles;
  • machine operations;
  • signals;
  • lights;
  • recurring tasks;
  • or other exact integer-period events.

Gear and tooth-count cycles can use LCM ideas

For idealized gear or rotating-position problems, least common multiples can help identify when repeating integer positions realign.

But real mechanical systems may also involve:

  • phase;
  • rotation direction;
  • backlash;
  • tolerances;
  • gear ratios;
  • and noninteger timing.

The LCM provides the integer-cycle relationship, not the complete mechanical analysis.

Calendar schedules are not always simple integer-cycle problems

Suppose one task repeats every:

4 days

and another every:

6 days

If they start on the same day, the interval to their next shared recurrence is:

LCM(4,6) = 12 days

But calendar schedules can contain exceptions such as:

  • weekends;
  • holidays;
  • variable month lengths;
  • skipped dates;
  • daylight-saving changes;
  • or business-day rules.

A simple LCM cannot model those exceptions automatically.

Real processes may not have exact integer periods

LCM works naturally with exact integer cycles.

Suppose one event repeats every:

2.5 seconds

and another every:

4 seconds

The ordinary integer LCM Calculator is not directly designed for 2.5 as an integer input.

You may sometimes scale compatible rational periods:

2.5 seconds = 25 tenths

4 seconds = 40 tenths

Then:

LCM(25, 40) = 200 tenths = 20 seconds

But this scaling should be deliberate.

Do not silently round decimal cycles into integers.

Integer inputs should remain exact

The ordinary LCM is an integer concept.

If an input is:

7.6

do not automatically round it to:

8

That changes the value and the repeating pattern.

If the data represent rational periods or measured quantities, use a method suited to those values.

Negative inputs usually use absolute values

For nonzero integers:

LCM(−6, 8)

is normally treated the same as:

LCM(6, 8)

So:

LCM(−6, 8) = 24

The standard LCM is reported as a nonnegative value.

The sign of the original integer does not create a negative LCM.

Zero requires a stated convention

Zero is a special case.

In many elementary definitions and software systems:

LCM(a, 0) = 0

for nonzero integer:

a

This convention is useful algebraically and computationally.

However, if LCM is defined strictly as the:

least positive common multiple

then zero creates a wording issue because zero has no positive multiples of its own.

For ordinary calculator use, follow the calculator’s documented convention when zero is entered.

Why zero behaves differently

The multiples of a nonzero number such as 5 include:

0, 5, 10, 15, 20…

The only multiple of zero is:

0

So there is no positive number that is a multiple of both:

0

and:

5

under a strict positive-multiple definition.

This is why conventions should be stated rather than assumed.

LCM(0,0) is also convention-dependent

Many computational definitions set:

LCM(0,0) = 0

Other elementary treatments avoid assigning an ordinary least positive common multiple because no positive common multiple exists.

If zero handling matters, use the definition required by the course, software, or specification.

Verify the result by division

Suppose the calculator gives:

LCM(9, 12) = 36

Check:

36 ÷ 9 = 4

and:

36 ÷ 12 = 3

Both are whole numbers.

So 36 is a common multiple.

Now verify that no smaller positive number works for both.

The prime-factor method can confirm this.

Verify by prime factors

For:

9 = 3²

and:

12 = 2² × 3

The LCM needs:

2²

and:

3²

So:

LCM = 4 × 9 = 36

This independently confirms the result.

Check every number in a longer list

Suppose the result is:

LCM(6, 8, 15) = 120

Check:

120 ÷ 6 = 20

120 ÷ 8 = 15

120 ÷ 15 = 8

Do not stop after verifying only two inputs.

The result must be divisible by every number in the original list.

GCF and LCM have a useful product relationship

For two nonzero integers:

GCF(a,b) × LCM(a,b) = |a × b|

For:

12 and 18

GCF:

6

LCM:

36

Then:

6 × 36 = 216

and:

12 × 18 = 216

This identity provides another useful check.

The relationship can solve for the LCM

If you know:

GCF(20,30) = 10

then:

LCM(20,30) = |20 × 30| ÷ 10

= 600 ÷ 10

= 60

Likewise, if the LCM and one of the other values are known, the same identity may be rearranged when appropriate.

LCM can simplify planning intervals

Suppose three maintenance checks repeat every:

4 weeks

6 weeks

and:

10 weeks

Find:

LCM(4,6,10)

Prime factors:

4 = 2²

6 = 2 × 3

10 = 2 × 5

Use:

2² × 3 × 5 = 60

If all three schedules start together, they realign every:

60 weeks

assuming no schedule exceptions.

LCM can help coordinate package quantities

Suppose one product is packed in groups of:

6

and another matching component is packed in groups of:

8

If you want an equal total number of each without partial packages, the first common package-compatible quantity is:

LCM(6,8) = 24

That corresponds to:

4 packages of 6

and:

3 packages of 8

Whether that is commercially useful depends on the actual purchasing problem.

Common LCM mistakes to avoid

Choosing the largest input automatically

The largest number is the LCM only when all other inputs divide it.

Confusing LCM with GCF

LCM finds a common multiple, while GCF finds a common divisor.

Using the lowest prime exponents

For LCM, use the highest required exponent.

Multiplying two numbers without accounting for their GCF

For:

12 and 18

the product is:

216

but the LCM is:

36

because shared factors should not be duplicated unnecessarily.

Ignoring one value in a multi-number list

The final LCM must be divisible by every input.

Rounding decimals into integers

LCM is intended for exact integer inputs.

Assuming recurring events started together

Phase offsets can change when events actually coincide.

Ignoring zero conventions

Check how the calculator defines LCM when zero is present.

Quick examples

IntegersLCM
2, 36
4, 612
6, 824
9, 1236
12, 1836
8, 15120
6, 8, 15120
24, 90360

The:

8 and 15

example shows coprime inputs, so their LCM is their product.

When to use another calculator

Use the GCF Calculator when you need the largest positive factor shared by several integers.

Use the Prime Factorization Calculator when you want to break integers into their prime components before comparing factors.

For everyday addition, subtraction, multiplication, division, percentages, and grouped arithmetic, use the Basic Calculator.

FAQ

What is the LCM?

The least common multiple is the smallest common multiple of all entered integers.

For positive nonzero inputs, it is the smallest positive integer divisible by every input.

How do I find the LCM of 12 and 18?

Their GCF is:

6

So:

LCM(12,18) = |12 × 18| ÷ 6

= 36

Is the LCM the same as the GCF?

No.

The GCF is a common divisor.

The LCM is a common multiple.

What is the LCM of coprime numbers?

For two positive coprime integers, the LCM is their product.

For example:

LCM(8,15) = 120

Can the LCM equal the largest input?

Yes.

That happens when every other input divides the largest one.

For example:

LCM(3,6,12) = 12

Can I calculate the LCM of more than two numbers?

Yes.

Combine them pair by pair.

For example:

LCM(6,8) = 24

then:

LCM(24,15) = 120

Does input order matter?

No.

The final LCM is the same regardless of the order in which the integer inputs are combined.

Can the LCM be negative?

The standard LCM is reported as nonnegative.

Negative inputs are normally handled using their absolute values.

What happens if an input is zero?

Zero handling depends on the adopted convention.

Many calculators and algebraic definitions return:

LCM(a,0) = 0

while a strict “least positive common multiple” definition requires special explanation because no positive common multiple exists.

How does LCM help with fractions?

The LCM of the denominators gives the least common denominator.

For:

5/12 + 7/18

the LCM of 12 and 18 is:

36

How does LCM help with repeating events?

If events start together and repeat every fixed integer number of time units, their LCM gives the interval until their schedules align again.

What if the repeating events start at different times?

The LCM of their periods alone is not enough.

The starting offset or phase also needs to be considered.

Can decimals be used in an LCM?

The ordinary LCM is defined for integers.

Do not silently round decimals. Rational quantities can sometimes be scaled deliberately into integer units first.

How are GCF and LCM related?

For two nonzero integers:

GCF(a,b) × LCM(a,b) = |a × b|

Mathematics reference

For additional explanations and worked examples involving multiples, factors, prime factorization, fractions, GCF, and LCM, see:

OpenStax — Prealgebra 2e

Find the first value every input can reach

An LCM Calculator answers a common-multiple question:

What is the smallest shared multiple of all these integers?

For fractions, that can produce the least common denominator.

For repeating cycles, it can identify when schedules that begin together align again.

Prime factorization explains the result by taking every required prime at its highest exponent, while the GCF formula provides a fast method for two nonzero integers.

Whatever method is used, verify the answer by dividing it by every original input.

If every quotient is a whole number and no smaller positive candidate satisfies all the nonzero inputs under the chosen definition, the LCM has been found.

Share on: