ToCalculator
Math

LCM Calculator

LCM calculator: find the least common multiple of two or three numbers, plus their greatest common factor, for fractions and homework.

Editorial review: Farrow (pseudonym; identity and professional credentials are not disclosed). This page is for educational purposes, not professional advice.

Your inputs

Results update as you type. Nothing you enter leaves your device.

Results

LCM
36
GCF
6

Example with the starting values

These results use the calculator's initial inputs. Change the values above to calculate your own estimate.

Inputs

First number
12
Second number
18
Third number (0 to skip)
0

Results

LCM
36
GCF
6

How to find the least common multiple

  1. Enter the first two whole numbers

    Enter positive whole numbers in the first and second number fields.

  2. Optionally enter a third number

    Enter a third positive whole number, or leave 0 to calculate using only the first two numbers.

  3. Review the LCM and GCF

    Review the least common multiple and greatest common factor for the entered numbers.

How does the LCM Calculator work?

The least common multiple (LCM) is the smallest positive number that every input divides evenly. For two numbers, LCM(a, b) = a × b / GCF(a, b). For 12 and 18 the GCF is 6, so the LCM is 12 × 18 / 6 = 36.

For three numbers the calculator takes the LCM of the first two, then the LCM of that result with the third. Leave the third number at 0 to use only two.

Use positive whole numbers; the optional third input must be 0 or a positive whole number. If one input is a multiple of another, the LCM is the larger number—for example, LCM(6, 24) = 24. If the numbers share no factor except 1, their LCM is their product.

Sources

Frequently asked questions

What is the LCM of 4 and 6?

The LCM of 4 and 6 is 12, because 12 is the smallest number both 4 and 6 divide into evenly.

How is the LCM used with fractions?

The LCM of the denominators is the least common denominator, which you use to add or subtract unlike fractions.

Can the LCM be smaller than an input?

No. The LCM is always at least as large as the biggest input. If one number divides the other, the LCM is the larger number.

How do I find the LCM by prime factors?

Factor each number, then multiply the highest power of every prime that appears. For 12 (2²×3) and 18 (2×3²) that is 2²×3² = 36.

Related calculators

All math calculators