AI Tools Free

LCM Calculator

Paste 2 to 100 positive whole numbers separated by commas, spaces, or line breaks into this LCM calculator to compute their exact least common multiple in your browser using arbitrary-precision BigInt math.

Free to useNo sign-upRuns in your browser
Enter your details

Enter the inputs, then select Calculate result.

Separate values with commas, spaces or new lines. At most 1,000 finite numbers, each with magnitude no greater than 1 billion.

Your result
Enter your details

Result will appear here

How to calculate LCM with this least common multiple calculator

This least common multiple calculator finds the smallest positive integer divisible by every number in your list by folding pairwise Euclidean greatest common divisors (GCD) across up to 100 inputs. For any two positive integers a and b, LCM(a, b) = (a ÷ gcd(a, b)) × b.

Two-Number Formula: LCM(a, b) = (a ÷ gcd(a, b)) × b. Multi-Number Folding: r_1 = a_1, and r_k = (r_{k-1} ÷ gcd(r_{k-1}, a_k)) × a_k for k = 2 ... n.

JavaScript Number loses precision above 2^53 - 1. This tool executes every step in BigInt up to 10,000 digits, pairing with our GCF Calculator and Prime Factorization Calculator.

Diagram showing pairwise GCD folding LCM(12, 18) = 36 followed by LCM(36, 30) = 180
Pairwise GCD folding computes LCM(12, 18) = 36 and then LCM(36, 30) = 180.

LCM Calculator Reference Table (2-Number, 3-Number & Coprime Sets)

Verified least common multiples, greatest common divisors, and prime-power decompositions for common integer sets.

Input Positive IntegersGreatest Common Divisor (GCD)Prime Power DecompositionLeast Common Multiple (LCM)Practical Use Case
4, 622^2 × 3^112Basic common denominator (1/4 + 1/6)
8, 1242^3 × 3^12424-hour cycle alignment
12, 1532^2 × 3^1 × 5^160Minute / second clock subdivisions
12, 18, 3062^2 × 3^2 × 5^1180Preloaded 3-number default example
15, 20, 2552^2 × 3^1 × 5^2300Three-denominator fraction addition
6, 8, 9, 1212^3 × 3^272Four-number classroom worksheet check
7, 11, 131 (coprime)7 × 11 × 131001Mutually prime product (a × b × c)
14, 21, 3572 × 3 × 5 × 7210Shared prime factor 7 across three terms
16, 24, 36, 4842^4 × 3^2144Imperial inch / foot / dozen grid
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 471 (first 15 primes)Primorial 47#614889782588491410Exceeds 53-bit float limit; exact in BigInt

How to use the LCM calculator for 2 to 100 numbers

Compute the least common multiple of your integer list in three steps.

Enter positive integers in the text box

Type or paste up to 100 positive whole numbers into the Positive integers field (12, 18, 30 is preloaded). Separate entries with commas, spaces, or line breaks.

Input and settings
LCM Calculator Positive integers textarea populated with 12, 18, 30
Step 1: Enter 2 to 100 positive integers separated by commas, spaces, or line breaks.

Keep inputs positive up to 1 billion

Confirm every entry is a positive integer from 1 to 1,000,000,000 with no decimal points, negative signs, or zeros.

Tool result
LCM Calculator result panel displaying 180 for inputs 12, 18, 30
Step 2: Ensure each integer is between 1 and 1,000,000,000 and click Calculate result.

Click Calculate result to copy or download

Select Calculate result to display the exact least common multiple, then use Copy or Download (result.txt) to save the value.

Review the details
LCM Calculator full workspace showing 180 alongside Copy and Download result.txt buttons
Step 3: Copy the exact BigInt LCM to your clipboard or download result.txt.

Worked examples: LCM of 3 numbers, common denominators, and cycles

See how the calculator solves three-number homework problems, fraction denominators, and repeating interval schedules.

LCM of 3 numbers (12, 18, 30 = 180)

With the default 12, 18, 30, the first fold computes LCM(12, 18) = (12 ÷ 6) × 18 = 36. The second fold computes LCM(36, 30) = (36 ÷ 6) × 30 = 180. By prime powers, 12 = 2^2 × 3, 18 = 2 × 3^2, and 30 = 2 × 3 × 5, so taking the highest power of each prime gives 2^2 × 3^2 × 5 = 180.

Worked example folding 12, 18, and 30 into LCM = 180
Folding 12, 18, and 30 pairwise produces LCM(12, 18) = 36 and LCM(36, 30) = 180.

Finding the least common denominator (LCD) for fractions

To add or subtract 5/12 + 7/18 - 11/30, enter the denominators 12, 18, 30 to get LCD = 180. Scaling each fraction to /180 gives (75 + 70 - 66) / 180 = 79/180. You can compute two-fraction sums directly in our Fraction Calculator or reduce the final ratio in the Fraction Simplifier.

Worked example finding Least Common Denominator LCD = 180 for 5/12 + 7/18 - 11/30
Use the LCM of fraction denominators (12, 18, 30 -> 180) as the Least Common Denominator.

Synchronizing recurring schedules and gear teeth

Suppose three automated health-check jobs run every 15, 20, and 45 minutes. Entering 15, 20, 45 returns 180, meaning all three jobs fire simultaneously every 180 minutes (3 hours). Similarly, meshing gears with 24 and 40 teeth return to their starting tooth alignment every LCM(24, 40) = 120 tooth engagements (5 turns of the first gear, 3 turns of the second).

Worked example aligning 15, 20, and 45 minute intervals at 180 minutes
Recurring intervals of 15, 20, and 45 minutes synchronize every 180 minutes.

How to read and verify the LCM calculator output

When you click Calculate result, the top headline (#result-main) prints the exact integer string whenever the result is under 40 digits (such as 180).

If you enter a large list of coprime numbers whose least common multiple is 40 digits or longer, the headline displays 'Result ready' while the scrollable output box (#result-extra) contains the complete BigInt integer string with one-click Copy and Download (result.txt) buttons.

You can verify any LCM result using two quick mathematical checks. First, the output must be greater than or equal to the largest input number (LCM >= max(a_1, ..., a_k)). Second, dividing the LCM by each original input must leave a remainder of 0, which you can test in the Modulo Calculator or Long Division Calculator.

Verification diagram showing 180 divided by 12, 18, and 30 with zero remainder
Every input integer (12, 18, 30) divides evenly into the LCM (180) with remainder 0.

LCM calculator input limits and 10,000-digit BigInt bounds

Keep four validation rules in mind when entering numbers into the workspace.

First, because every integer multiplied by 0 is 0, the least common multiple is strictly defined over positive whole numbers (1, 2, 3, ...). Entering 0, a negative integer, or more than 100 values triggers 'Use at most 100 supported integers.' Each individual integer in your list must also be at most 1,000,000,000 ('Each number must be finite with magnitude at most 1 billion.').

Second, the accumulated BigInt result can grow up to 10,000 digits ('The exact result exceeds 10,000 digits.'), which is more than enough to multiply 100 distinct nine-digit primes without overflow. To check whether an input is prime before factoring, use our Prime Number Checker.

Summary of the 100-integer count limit, 1-billion per-number cap, and 10,000-digit BigInt output limit
Supports 1 to 100 positive integers (up to 1 billion each) and up to 10,000 output digits.

Frequently asked questions about calculating the least common multiple

Answers about using LCM Calculator and understanding its results.

How do you calculate the LCM of two or more numbers?

Two methods work for any integer set: prime-power factoring or Euclidean GCD division. In the prime-power method, factor each input into primes and multiply the largest exponent of every prime that appears (8 = 2^3 and 12 = 2^2 × 3 give 2^3 × 3 = 24). In the Euclidean method used by this tool, divide the first number by gcd(a, b) and multiply by b.

How do you find the LCM of 3 numbers like 12, 18, and 30?

Find the LCM of the first two numbers, then find the LCM of that result and the third number: LCM(12, 18) = 36, and LCM(36, 30) = (36 ÷ gcd(36, 30)) × 30 = (36 ÷ 6) × 30 = 180.

What is the relationship between GCF (GCD) and LCM?

For any two positive integers a and b, the product of their greatest common divisor and least common multiple equals the product of the two numbers: GCD(a, b) × LCM(a, b) = a × b. Note that this direct identity holds for two numbers; for three or more numbers, fold LCM(r, v) = (r ÷ gcd(r, v)) × v pairwise rather than dividing a × b × c by GCD(a, b, c).

How do I use the LCM calculator for fractions?

When you need the Least Common Denominator (LCD) for fraction addition or subtraction, paste only the bottom numbers into the box (4, 6, 9 gives LCD = 36). When you need the true least common multiple of two reduced fractions a/b and c/d, divide the LCM of the numerators by the GCD of the denominators: LCM(a, c) / GCD(b, d).

Why does the calculator reject 0 and negative numbers?

By standard number-theory definition, the least common multiple is the smallest positive integer that is a multiple of every input. Because 0 has no nonzero multiples, any list containing 0 has no positive common multiple. If you have negative integers, enter their positive absolute values (12, 18 instead of -12, 18).

How many numbers can I enter into the LCM calculator at once?

You can enter from 1 up to 100 positive whole numbers per calculation, separated by commas, spaces, or line breaks, with each integer up to 1,000,000,000 (1 billion).

Calculate the least common multiple now

Choose another tool for your next calculation, conversion, or text task.

Calculate result