LCM Calculator

Find the least common multiple of 2 to 6 numbers, with the prime factors, a Venn diagram for two numbers, and every step shown.

Greatest common factor

6

The greatest common factor (GCF) of 12, 18 and 30 is 6.

Show me how

All steps as text

    Tip: press ← and → to move between steps, or click any step.

    How to find the LCM

    1. Break each number into prime factors: 12 = 2² × 3 and 18 = 2 × 3².
    2. Take every prime that appears in any of them, each with its biggest power: 2² × 3².
    3. Multiply them: the LCM of 12 and 18 is 36.

    For two numbers there is a shortcut: LCM = a × b ÷ GCF. For 12 and 18, the GCF is 6, so the LCM is 12 × 18 ÷ 6 = 36.

    What the LCM is for

    The LCM of the denominators is the lowest common denominator for adding fractions: for 5/12 + 7/18, use 36. It also answers “when will they line up again?”: buses every 12 and 18 minutes leave together again after 36 minutes.

    Questions

    What is the difference between the LCM and the GCF?

    The LCM is the smallest number that all the numbers divide into; the GCF is the biggest number that divides all of them. The LCM is at least as big as the biggest number, and the GCF at most as big as the smallest.

    What is the LCM of two prime numbers?

    Their product, because they share no factors: the LCM of 7 and 11 is 77.

    Can I list multiples instead?

    Yes: multiples of 12 are 12, 24, 36…; multiples of 18 are 18, 36…; the first in both lists is 36. It is quick for small numbers, but prime factors are faster for big ones.