LCM Calculator

Find the least common multiple (LCM) of up to 20 whole numbers, with prime factorization working, lists of multiples and the GCF.

LCM calculator
Least common multiple

    Method 1: prime factorization

    Method 2: listing multiples

    Enter 2 to 20 positive whole numbers up to 1,000,000,000,000, separated by commas or spaces. The LCM is the smallest positive number that every number divides into exactly.

    On this page

    An LCM calculator finds the least common multiple of two or more whole numbers: the smallest positive number that each of them divides into exactly. It shows the prime factorization method step by step, lists the multiples for small numbers so you can see where they first meet, and also gives the greatest common factor (GCF) and a check of the result.

    For example, the LCM of 4 and 6 is 12, the LCM of 12, 18 and 30 is 180, and the LCM of every number from 1 to 10 is 2,520.

    How to use the LCM calculator

    1. Type two or more positive whole numbers, separated by commas or spaces. You can enter up to 20 numbers.
    2. Press Find LCM.
    3. Read the answer, then follow the prime factorization working and, for small numbers, the lists of multiples.

    What is the least common multiple?

    A multiple of a number is what you get when you multiply it by a whole number. The multiples of 4 are 4, 8, 12, 16, 20 and so on, and the multiples of 6 are 6, 12, 18, 24 and so on. A common multiple appears in both lists; 12, 24 and 36 are common multiples of 4 and 6. The least common multiple is the smallest of them: 12.

    The LCM is also called the lowest common multiple or the least common denominator when it’s used to add fractions.

    Method 1: listing multiples

    For small numbers, write out the multiples of each until you find the first number that appears in every list.

    • Multiples of 4: 4, 8, 12
    • Multiples of 6: 6, 12

    The first match is 12. This method is easy to understand but slow for larger numbers, because the lists can get long.

    Method 2: prime factorization

    This method works for any size of number:

    1. Write each number as a product of prime factors.
    2. For each prime that appears, take the highest power found in any of the numbers.
    3. Multiply those prime powers together.

    For 12, 18 and 30: 12 = 2² × 3, 18 = 2 × 3², and 30 = 2 × 3 × 5. The highest powers are 2², 3² and 5. So the LCM is 4 × 9 × 5 = 180.

    Method 3: using the GCF

    For two numbers, there’s a shortcut: LCM(a, b) = a × b ÷ GCF(a, b). For 4 and 6, the GCF is 2, so the LCM is 4 × 6 ÷ 2 = 12. For more than two numbers, apply the rule repeatedly: find the LCM of the first two, then the LCM of that result and the third number, and so on.

    Method 4: the ladder (division) method

    Write the numbers in a row and divide them by a prime that goes into at least two of them, bringing down any number that doesn’t divide. Repeat until no prime divides two or more of the remaining numbers. The LCM is the product of all the divisors and the numbers left at the bottom. For 12, 18 and 30, dividing by 2 gives 6, 9, 15; dividing by 3 gives 2, 3, 5. Those are now pairwise coprime, so the LCM is 2 × 3 × 2 × 3 × 5 = 180.

    Using the LCM to add fractions

    To add or subtract fractions with different denominators, you need a common denominator, and the LCM gives the smallest one. To work out 1/4 + 1/6, the LCM of 4 and 6 is 12, so rewrite the fractions as 3/12 + 2/12 = 5/12. Using the smallest common denominator keeps the numbers small and often means you don’t need to simplify at the end.

    Real-life uses of the LCM

    Repeating events

    One bus leaves every 12 minutes and another every 18 minutes. If they both leave at 9:00, they’ll next leave together after the LCM of 12 and 18, which is 36 minutes, at 9:36.

    Buying in packs

    Hot dogs come in packs of 10 and buns in packs of 8. To have exactly the same number of each, you need the LCM of 10 and 8, which is 40: 4 packs of hot dogs and 5 packs of buns.

    Gears and cycles

    Two meshing gears with 12 and 18 teeth return to their starting positions together after 36 teeth have passed: 3 turns of the small gear and 2 turns of the large one.

    Planning rotas and schedules

    One volunteer works every 4th day, another every 6th day and a third every 10th day. They all work on the same day after the LCM of 4, 6 and 10, which is 60 days. Planners use the same idea for maintenance cycles, such as servicing one machine every 15 days and another every 20 days: both are serviced together every 60 days.

    Worked example with larger numbers

    Find the LCM of 84 and 90. First factor them: 84 = 2² × 3 × 7 and 90 = 2 × 3² × 5. Take the highest power of each prime: 2², 3², 5 and 7. Multiply: 4 × 9 × 5 × 7 = 1,260. As a check, the GCF of 84 and 90 is 2 × 3 = 6, and 84 × 90 ÷ 6 = 7,560 ÷ 6 = 1,260. Listing multiples would have taken 15 steps for 84 and 14 for 90, which shows why factorization is the better method for bigger numbers.

    Why the prime factor method works

    For a number to be a multiple of 12 = 2² × 3, it must contain at least two 2s and one 3 in its prime factorization. To also be a multiple of 18 = 2 × 3², it needs at least one 2 and two 3s. The smallest number meeting both conditions has exactly two 2s and two 3s, which is 36. Taking the highest power of each prime satisfies every number in the list with nothing extra, so the result is the least common multiple.

    LCM and GCF together

    The greatest common factor is the largest number that divides into all the numbers, while the least common multiple is the smallest number they all divide into. For two numbers, they’re linked by LCM × GCF = a × b. For 4 and 6: 12 × 2 = 24 = 4 × 6. The calculator shows this check whenever you enter two numbers.

    Useful facts

    • If one number divides another, the LCM is the larger number. The LCM of 5 and 20 is 20.
    • If two numbers share no common factor other than 1, their LCM is their product. The LCM of 8 and 9 is 72.
    • The LCM is always at least as large as the largest number in the set.
    • The LCM of distinct primes is their product: the LCM of 7, 11 and 13 is 1,001.

    Common mistakes

    • Confusing the LCM with the GCF. The LCM is a multiple, so it’s at least as big as each number; the GCF is a factor, so it’s no bigger than the smallest.
    • Simply multiplying the numbers together. That gives a common multiple, but not always the least one: 4 × 6 = 24, but the LCM is 12.
    • Taking the lowest power of each prime instead of the highest. The lowest powers give the GCF.
    • Leaving out a prime that appears in only one of the numbers.

    Related calculations

    For related questions, use the factor calculator to list all the factors and factor pairs of a number, or the fraction calculator to add, subtract, multiply and divide fractions.

    Frequently asked questions

    12. It's the smallest number that both 4 and 6 divide into exactly.

    Factor each number into primes and multiply the highest power of each prime. For 12, 18 and 30, that's 2² × 3² × 5 = 180.

    The LCM is the smallest number all the numbers divide into. The GCF is the largest number that divides into all of them.

    It gives the least common denominator. To add 1/4 + 1/6, use 12 as the denominator: 3/12 + 2/12 = 5/12.

    Their product. The LCM of 7 and 11 is 77.

    No. The LCM is always at least as large as the biggest number in the set.

    For two numbers, LCM(a, b) × GCF(a, b) = a × b.

    2,520, the smallest number divisible by every whole number from 1 to 10.

    The calculator works with positive whole numbers. For decimals, scale them to whole numbers first; for negatives, use their absolute values.

    Yes, when the numbers are the denominators of fractions. The least common denominator is simply the LCM of the denominators.

    24. Since 8 = 2³ and 12 = 2² × 3, the LCM is 2³ × 3 = 24.

    20, because 5 divides into 20 exactly. When one number divides another, the LCM is the larger one.

    From 2 to 20 numbers, each up to one trillion. Very large results are calculated exactly.

    For timing repeating events, matching pack sizes, scheduling rotations and adding fractions.