Least Common Multiple (LCM) Calculator

Free, fast, and accessible LCM calculator. Compute the Least Common Multiple of two or more integers with step-by-step methods: prime factorization or GCD. Mobile-first, WCAG 2.1 AA compliant.

Least Common Multiple (LCM) Calculator

This professional LCM calculator finds the least common multiple of two or more positive integers. It is designed for students, teachers, engineers, and anyone needing accurate results with clear, step-by-step explanations via the GCD method or prime factorization.

Data Source and Methodology

Authoritative Data Source: Wolfram MathWorld — “Least Common Multiple.” Last updated 2024, available at https://mathworld.wolfram.com/LeastCommonMultiple.html.

Tutti i calcoli si basano rigorosamente sulle formule e sui dati forniti da questa fonte.

This tool implements exact arithmetic using the Euclidean algorithm for GCD and the identity LCM(a, b) = |a·b| / GCD(a, b), extended to multiple integers via pairwise reduction.

The Formula Explained

For two integers a, b:
$$\mathrm{lcm}(a,b) = \frac{\lvert a\,b \rvert}{\gcd(a,b)}$$
For n integers a₁, a₂, …, aₙ (n ≥ 2):
$$\mathrm{lcm}(a_1,\ldots,a_n)=\mathrm{lcm}\!\big(\mathrm{lcm}(a_1,a_2),a_3,\ldots,a_n\big)$$
Prime factorization method:
$$\text{If } a_i=\prod_{p} p^{\alpha_{i,p}},\ \ \text{then}\ \ \mathrm{lcm}(a_1,\ldots,a_n)=\prod_{p} p^{\max_i \alpha_{i,p}}$$

Glossary of Variables

  • Input integers: The set of positive integers for which the LCM is computed.
  • GCD: Greatest common divisor of two integers, used in the LCM identity.
  • LCM: Least common multiple; smallest positive integer divisible by every input integer.
  • Prime factorization: Representation of a number as a product of primes raised to powers.
  • Explanation method: Choose between GCD-based derivation or prime factorization summary.

How It Works: A Step-by-Step Example

Example inputs: 12, 18, 30.

  1. Compute GCD(12, 18) = 6. Then LCM(12, 18) = 12×18 / 6 = 36.
  2. Compute GCD(36, 30) = 6. Then LCM(36, 30) = 36×30 / 6 = 180.
  3. Final result: LCM(12, 18, 30) = 180.

Prime factorization check: 12 = 2²·3, 18 = 2·3², 30 = 2·3·5. Taking max exponents gives 2²·3²·5 = 180.

Frequently Asked Questions (FAQ)

What is the Least Common Multiple (LCM)?

The LCM is the smallest positive integer that is a multiple of all the input integers.

How do I compute the LCM of more than two numbers?

Use pairwise reduction: compute LCM(a, b), then LCM(that, c), and so on until all numbers are included.

Why do you require positive integers?

In practical arithmetic and most curricula, LCM is restricted to positive integers to avoid edge cases with zero and sign conventions.

Is the result exact for large inputs?

Yes. The calculator uses BigInt arithmetic, so results are exact within the supported input limits.

Which method is faster?

The GCD method is optimized and typically fastest. Prime factorization is shown for explanation and may be truncated for very large values.

How many numbers can I enter?

Up to 30 integers, each up to 1e12. This preserves responsiveness and an excellent user experience.


Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[\mathrm{lcm}(a,b) = \frac{\lvert a\,b \rvert}{\gcd(a,b)}\]
\mathrm{lcm}(a,b) = \frac{\lvert a\,b \rvert}{\gcd(a,b)}
Formula (extracted LaTeX)
\[\mathrm{lcm}(a_1,\ldots,a_n)=\mathrm{lcm}\!\big(\mathrm{lcm}(a_1,a_2),a_3,\ldots,a_n\big)\]
\mathrm{lcm}(a_1,\ldots,a_n)=\mathrm{lcm}\!\big(\mathrm{lcm}(a_1,a_2),a_3,\ldots,a_n\big)
Formula (extracted LaTeX)
\[\text{If } a_i=\prod_{p} p^{\alpha_{i,p}},\ \ \text{then}\ \ \mathrm{lcm}(a_1,\ldots,a_n)=\prod_{p} p^{\max_i \alpha_{i,p}}\]
\text{If } a_i=\prod_{p} p^{\alpha_{i,p}},\ \ \text{then}\ \ \mathrm{lcm}(a_1,\ldots,a_n)=\prod_{p} p^{\max_i \alpha_{i,p}}
Formula (extracted text)
For two integers a, b: $\mathrm{lcm}(a,b) = \frac{\lvert a\,b \rvert}{\gcd(a,b)}$ For n integers a₁, a₂, …, aₙ (n ≥ 2): $\mathrm{lcm}(a_1,\ldots,a_n)=\mathrm{lcm}\!\big(\mathrm{lcm}(a_1,a_2),a_3,\ldots,a_n\big)$ Prime factorization method: $\text{If } a_i=\prod_{p} p^{\alpha_{i,p}},\ \ \text{then}\ \ \mathrm{lcm}(a_1,\ldots,a_n)=\prod_{p} p^{\max_i \alpha_{i,p}}$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn

Full original guide (expanded)

Least Common Multiple (LCM) Calculator

This professional LCM calculator finds the least common multiple of two or more positive integers. It is designed for students, teachers, engineers, and anyone needing accurate results with clear, step-by-step explanations via the GCD method or prime factorization.

Data Source and Methodology

Authoritative Data Source: Wolfram MathWorld — “Least Common Multiple.” Last updated 2024, available at https://mathworld.wolfram.com/LeastCommonMultiple.html.

Tutti i calcoli si basano rigorosamente sulle formule e sui dati forniti da questa fonte.

This tool implements exact arithmetic using the Euclidean algorithm for GCD and the identity LCM(a, b) = |a·b| / GCD(a, b), extended to multiple integers via pairwise reduction.

The Formula Explained

For two integers a, b:
$$\mathrm{lcm}(a,b) = \frac{\lvert a\,b \rvert}{\gcd(a,b)}$$
For n integers a₁, a₂, …, aₙ (n ≥ 2):
$$\mathrm{lcm}(a_1,\ldots,a_n)=\mathrm{lcm}\!\big(\mathrm{lcm}(a_1,a_2),a_3,\ldots,a_n\big)$$
Prime factorization method:
$$\text{If } a_i=\prod_{p} p^{\alpha_{i,p}},\ \ \text{then}\ \ \mathrm{lcm}(a_1,\ldots,a_n)=\prod_{p} p^{\max_i \alpha_{i,p}}$$

Glossary of Variables

  • Input integers: The set of positive integers for which the LCM is computed.
  • GCD: Greatest common divisor of two integers, used in the LCM identity.
  • LCM: Least common multiple; smallest positive integer divisible by every input integer.
  • Prime factorization: Representation of a number as a product of primes raised to powers.
  • Explanation method: Choose between GCD-based derivation or prime factorization summary.

How It Works: A Step-by-Step Example

Example inputs: 12, 18, 30.

  1. Compute GCD(12, 18) = 6. Then LCM(12, 18) = 12×18 / 6 = 36.
  2. Compute GCD(36, 30) = 6. Then LCM(36, 30) = 36×30 / 6 = 180.
  3. Final result: LCM(12, 18, 30) = 180.

Prime factorization check: 12 = 2²·3, 18 = 2·3², 30 = 2·3·5. Taking max exponents gives 2²·3²·5 = 180.

Frequently Asked Questions (FAQ)

What is the Least Common Multiple (LCM)?

The LCM is the smallest positive integer that is a multiple of all the input integers.

How do I compute the LCM of more than two numbers?

Use pairwise reduction: compute LCM(a, b), then LCM(that, c), and so on until all numbers are included.

Why do you require positive integers?

In practical arithmetic and most curricula, LCM is restricted to positive integers to avoid edge cases with zero and sign conventions.

Is the result exact for large inputs?

Yes. The calculator uses BigInt arithmetic, so results are exact within the supported input limits.

Which method is faster?

The GCD method is optimized and typically fastest. Prime factorization is shown for explanation and may be truncated for very large values.

How many numbers can I enter?

Up to 30 integers, each up to 1e12. This preserves responsiveness and an excellent user experience.


Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[\mathrm{lcm}(a,b) = \frac{\lvert a\,b \rvert}{\gcd(a,b)}\]
\mathrm{lcm}(a,b) = \frac{\lvert a\,b \rvert}{\gcd(a,b)}
Formula (extracted LaTeX)
\[\mathrm{lcm}(a_1,\ldots,a_n)=\mathrm{lcm}\!\big(\mathrm{lcm}(a_1,a_2),a_3,\ldots,a_n\big)\]
\mathrm{lcm}(a_1,\ldots,a_n)=\mathrm{lcm}\!\big(\mathrm{lcm}(a_1,a_2),a_3,\ldots,a_n\big)
Formula (extracted LaTeX)
\[\text{If } a_i=\prod_{p} p^{\alpha_{i,p}},\ \ \text{then}\ \ \mathrm{lcm}(a_1,\ldots,a_n)=\prod_{p} p^{\max_i \alpha_{i,p}}\]
\text{If } a_i=\prod_{p} p^{\alpha_{i,p}},\ \ \text{then}\ \ \mathrm{lcm}(a_1,\ldots,a_n)=\prod_{p} p^{\max_i \alpha_{i,p}}
Formula (extracted text)
For two integers a, b: $\mathrm{lcm}(a,b) = \frac{\lvert a\,b \rvert}{\gcd(a,b)}$ For n integers a₁, a₂, …, aₙ (n ≥ 2): $\mathrm{lcm}(a_1,\ldots,a_n)=\mathrm{lcm}\!\big(\mathrm{lcm}(a_1,a_2),a_3,\ldots,a_n\big)$ Prime factorization method: $\text{If } a_i=\prod_{p} p^{\alpha_{i,p}},\ \ \text{then}\ \ \mathrm{lcm}(a_1,\ldots,a_n)=\prod_{p} p^{\max_i \alpha_{i,p}}$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn

Least Common Multiple (LCM) Calculator

This professional LCM calculator finds the least common multiple of two or more positive integers. It is designed for students, teachers, engineers, and anyone needing accurate results with clear, step-by-step explanations via the GCD method or prime factorization.

Data Source and Methodology

Authoritative Data Source: Wolfram MathWorld — “Least Common Multiple.” Last updated 2024, available at https://mathworld.wolfram.com/LeastCommonMultiple.html.

Tutti i calcoli si basano rigorosamente sulle formule e sui dati forniti da questa fonte.

This tool implements exact arithmetic using the Euclidean algorithm for GCD and the identity LCM(a, b) = |a·b| / GCD(a, b), extended to multiple integers via pairwise reduction.

The Formula Explained

For two integers a, b:
$$\mathrm{lcm}(a,b) = \frac{\lvert a\,b \rvert}{\gcd(a,b)}$$
For n integers a₁, a₂, …, aₙ (n ≥ 2):
$$\mathrm{lcm}(a_1,\ldots,a_n)=\mathrm{lcm}\!\big(\mathrm{lcm}(a_1,a_2),a_3,\ldots,a_n\big)$$
Prime factorization method:
$$\text{If } a_i=\prod_{p} p^{\alpha_{i,p}},\ \ \text{then}\ \ \mathrm{lcm}(a_1,\ldots,a_n)=\prod_{p} p^{\max_i \alpha_{i,p}}$$

Glossary of Variables

  • Input integers: The set of positive integers for which the LCM is computed.
  • GCD: Greatest common divisor of two integers, used in the LCM identity.
  • LCM: Least common multiple; smallest positive integer divisible by every input integer.
  • Prime factorization: Representation of a number as a product of primes raised to powers.
  • Explanation method: Choose between GCD-based derivation or prime factorization summary.

How It Works: A Step-by-Step Example

Example inputs: 12, 18, 30.

  1. Compute GCD(12, 18) = 6. Then LCM(12, 18) = 12×18 / 6 = 36.
  2. Compute GCD(36, 30) = 6. Then LCM(36, 30) = 36×30 / 6 = 180.
  3. Final result: LCM(12, 18, 30) = 180.

Prime factorization check: 12 = 2²·3, 18 = 2·3², 30 = 2·3·5. Taking max exponents gives 2²·3²·5 = 180.

Frequently Asked Questions (FAQ)

What is the Least Common Multiple (LCM)?

The LCM is the smallest positive integer that is a multiple of all the input integers.

How do I compute the LCM of more than two numbers?

Use pairwise reduction: compute LCM(a, b), then LCM(that, c), and so on until all numbers are included.

Why do you require positive integers?

In practical arithmetic and most curricula, LCM is restricted to positive integers to avoid edge cases with zero and sign conventions.

Is the result exact for large inputs?

Yes. The calculator uses BigInt arithmetic, so results are exact within the supported input limits.

Which method is faster?

The GCD method is optimized and typically fastest. Prime factorization is shown for explanation and may be truncated for very large values.

How many numbers can I enter?

Up to 30 integers, each up to 1e12. This preserves responsiveness and an excellent user experience.


Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[\mathrm{lcm}(a,b) = \frac{\lvert a\,b \rvert}{\gcd(a,b)}\]
\mathrm{lcm}(a,b) = \frac{\lvert a\,b \rvert}{\gcd(a,b)}
Formula (extracted LaTeX)
\[\mathrm{lcm}(a_1,\ldots,a_n)=\mathrm{lcm}\!\big(\mathrm{lcm}(a_1,a_2),a_3,\ldots,a_n\big)\]
\mathrm{lcm}(a_1,\ldots,a_n)=\mathrm{lcm}\!\big(\mathrm{lcm}(a_1,a_2),a_3,\ldots,a_n\big)
Formula (extracted LaTeX)
\[\text{If } a_i=\prod_{p} p^{\alpha_{i,p}},\ \ \text{then}\ \ \mathrm{lcm}(a_1,\ldots,a_n)=\prod_{p} p^{\max_i \alpha_{i,p}}\]
\text{If } a_i=\prod_{p} p^{\alpha_{i,p}},\ \ \text{then}\ \ \mathrm{lcm}(a_1,\ldots,a_n)=\prod_{p} p^{\max_i \alpha_{i,p}}
Formula (extracted text)
For two integers a, b: $\mathrm{lcm}(a,b) = \frac{\lvert a\,b \rvert}{\gcd(a,b)}$ For n integers a₁, a₂, …, aₙ (n ≥ 2): $\mathrm{lcm}(a_1,\ldots,a_n)=\mathrm{lcm}\!\big(\mathrm{lcm}(a_1,a_2),a_3,\ldots,a_n\big)$ Prime factorization method: $\text{If } a_i=\prod_{p} p^{\alpha_{i,p}},\ \ \text{then}\ \ \mathrm{lcm}(a_1,\ldots,a_n)=\prod_{p} p^{\max_i \alpha_{i,p}}$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn
Formulas

(Formulas preserved from original page content, if present.)

Version 0.1.0-draft
Citations

Add authoritative sources relevant to this calculator (standards bodies, manuals, official docs).

Changelog
  • 0.1.0-draft — 2026-01-19: Initial draft (review required).