Math / calculator

LCM Calculator

Find the exact least common multiple of multiple signed integers using division before multiplication.

Calculator

Calculator

Find the least common multiple.

Use 2–100 signed integers, at most 30 digits each. Division before multiplication and BigInt arithmetic avoid integer overflow. A list containing zero has LCM zero.

Integer list

Your result

Enter details to see the result.

Complete the inputs and calculate to see the main result and its supporting breakdown.

Example

Worked example

Example inputs

Integers
12, 18

Calculation breakdown

LCM(a,b) = |(a/GCD(a,b)) × b| when neither is zero; otherwise LCM = 0. Reduce across the list.

Example result

Least common multiple

36

Exact nonnegative integer.

How to interpret the result

For nonzero inputs, the result is the smallest positive integer divisible by each input magnitude. Negative signs do not affect that multiple. A list containing zero returns zero under the stated convention.

How to use this calculator

  1. Paste at least two integers separated by commas, spaces or line breaks.
  2. Use up to 100 signed values, each no longer than 30 digits.
  3. Calculate the least common multiple; any zero produces a zero result.

How it works

Formula

LCM(a,b) = |(a/GCD(a,b)) × b| when neither is zero; otherwise LCM = 0. Reduce across the list.

What happens when an input is zero?

The least common multiple is zero by the convention used here. For 12 and 18 the nonnegative exact result is 36.

What this calculator does

Find the smallest positive multiple shared by a list of integers, useful for matching repeating cycles or fraction denominators.

Inputs you will need

Required or selected inputs

  • Integers

Assumptions

  • Signs are normalized; a zero anywhere in the list produces zero. Exact BigInt arithmetic is used.

Limitations

  • Enter 2–100 integers of up to 30 digits each within 4,000 characters. Fractions and exponent notation are rejected.

Useful next steps

Find the shared divisor used in reducing an LCM calculation with GCF Calculator (Greatest Common Factor).

See how HandyChest handles units, validation, rounding, and testing, or Report a problem with this calculator.

Good to know

Frequently asked questions

Can a negative input make the LCM negative?

No. The calculation uses absolute magnitudes and reports a nonnegative exact result. For example, −12 and 18 have LCM 36.

Keep going