Skip to main content
Skip to calculator
Advertisement

Last updated: August 1, 2026

Least Common Multiple Calculator

Quick Answer

The Least Common Multiple Calculator finds the LCM of two or more positive integers by repeatedly applying lcm(a,b) = |a*b|/gcd(a,b), returning the combined LCM and the count of valid numbers used.

Enter two or more positive integers separated by commas, and the calculator returns their least common multiple.

Helpful
Not helpful
Save as image
Share
Embed
Cite
Write feedback

Formula

lcm(a, b) = |a x b| / gcd(a, b), extended across the full list

Where:

  • a, b, ...=Positive integers to combine
  • gcd(a,b)=Greatest common divisor of a and b
Least Common MultipleRows listing multiples of two numbers with the smallest shared value highlighted as the least common multiple.Multiples of 33, 6, 9, 12, 15, 18...Multiples of 44, 8, 12, 16, 20...LCM(3, 4) = 12
The smallest value shared by both multiple lists is the least common multiple.

Worked Examples

Two small numbers

Find the LCM of 3 and 4.

  1. 1gcd(3,4) = 1
  2. 2lcm(3,4) = 3x4 = 12
  3. 33 and 4 are coprime
Final Answer: lcm = 12, count = 2

Three numbers

Find the LCM of 3, 4, and 6.

  1. 1lcm(3,4) = 12
  2. 2lcm(12,6) = 12
  3. 312 is divisible by 3, 4, and 6
Final Answer: lcm = 12, count = 3

Multiple divides another

Find the LCM of 7 and 21.

  1. 1gcd(7,21) = 7
  2. 2lcm(7,21) = (7x21)/7 = 21
  3. 321 is a multiple of 7
Final Answer: lcm = 21, count = 2

Coprime pair

Find the LCM of 9 and 8.

  1. 1gcd(9,8) = 1
  2. 2lcm(9,8) = 9x8 = 72
  3. 3Coprime numbers multiply directly
Final Answer: lcm = 72, count = 2

Introduction

The Least Common Multiple Calculator finds the smallest positive integer that every number in your list divides into evenly — essential for fraction arithmetic and scheduling problems.

What Is the Least Common Multiple?

The least common multiple (LCM) of two or more integers is the smallest positive number each of them divides into with no remainder.

  • LCM is always greater than or equal to the largest input number

  • LCM(a, 1) always equals a

  • LCM of coprime numbers equals their product

How the Calculator Works

The calculator applies lcm(a, b) = |a x b| / gcd(a, b) pairwise, computing each greatest common divisor with the Euclidean algorithm.

  • Numbers are parsed from a comma-separated list

  • Each value must be a positive whole number

  • The running LCM combines every input in sequence

Input Guide

Enter every number you want to combine, separated by commas.

  1. 1

    numbers: comma-separated positive integers, e.g. 3,4,6

Output Guide

The calculator returns the combined LCM and how many valid numbers were used.

  1. 1

    lcm: the least common multiple of all valid numbers

  2. 2

    count: how many valid integers were parsed

How to Use This Calculator

Type two or more positive integers separated by commas, then read the LCM result.

  • Enter at least two positive integers

  • Separate each value with a comma

  • Review the LCM and the count of numbers used

Common Mistakes

Most errors come from missing values or entering non-integer or negative numbers.

  • Entering only one number

  • Using decimals or negative numbers

  • Forgetting commas between values

Practical Uses

The LCM shows up whenever you need a shared cycle length or a common denominator.

  • Adding or comparing fractions

  • Scheduling repeating events that must align

  • Simplifying ratios and gear/tooth problems

Prime Factorization Method

An alternative way to find the LCM is to multiply the highest power of every prime that appears in any of the numbers.

  • Factor each number into primes

  • Take the highest power of each prime across all numbers

  • Multiply those powers together

FAQs

What does the Least Common Multiple Calculator compute?

It computes the least common multiple of every positive integer you enter, plus how many valid values were used.

How many numbers can I enter?

You can enter as many comma-separated positive integers as you need; the calculator reduces them pairwise.

What happens if I enter only one number?

The calculator requires at least two numbers and returns an error message asking for more input.

Can I use decimals or negative numbers?

No. Only positive whole numbers are accepted; decimals and negative values return a validation error.

How is LCM different from GCF?

The greatest common factor (GCF) is the largest number that divides every input, while the LCM is the smallest number every input divides into.

Why is the LCM useful for fractions?

Using the LCM as a common denominator lets you add or compare fractions without changing their value.

What is the LCM of two coprime numbers?

When two numbers share no common factors besides 1, their LCM equals their product.

Is the result always larger than my inputs?

The LCM is always greater than or equal to the largest number entered, and equals it only when that number is a multiple of all the others.