LCM / polynomial LCM Calculator: Calculate the least common multiple of integers and polynomials

You can calculate the LCM (Least common multiple) of integers or polynomials by inputting the command lcm and integers in the form like this.

lcm 4 6

The LCM of (4, 6) is 12 and here is the output screen.

LCM of (4, 6)

12 is a multiple of 4 because 12 = 4 × 3 and 12 is a multiple of 6 because 12 = 6 × 2. The number is called the "common multiple" of 4 and 6 if it is the multiple of both 4 and 6. So 12 is the common multiple of 4 and 6. 12, 24, 36, 48, 60 are all the common multiples. 12 is the least of them so 12 is the "least common multiple", that is LCM of 4 and 6.

It's possible to calculate the LCM of three numbers such as (4, 6, 9).

lcm 4 6 9

If you input 4, 6, 9 after lcm, the calculator shows 36 as output.

LCM of three integers

All numbers must be separated by a comma or space. So lcm 4 6 and lcm 4, 6 are valid.

Polynomial LCM

You can calculate the polynomial LCM of polynomials by lcm.

lcm x-1, 2*x+3

The above input means calculating the polynomial LCM of x-1 and 2x+3. The output is

\[ 2 x^{2} + x - 3 \]

LCM of polynomials

Note that the calculator can't recognize the implicit multiplication like 2x, 3x and an asterisk is needed to express it. To calculate the polynomial LCM, polynomials input in the form should be separated by comma. The below won't work because they are separated by space.

lcm x-1 x-2

Auto simplification

The next example works.

lcm x-1, x+sin(pi/2)


\[ x^{2} - 1 \]

sin(pi/2) is 1 and the second polynomial is equal to x+1. The calculator simplifies all polynomials before producing the LCM of polynomials.