Use this free least common multiple calculator to find the LCM of any list of whole numbers. Enter your numbers to see the LCM with every GCD step shown, plus the GCD and worked examples.

Least Common Multiple Calculator

Find the least common multiple of two or more whole numbers, with each pairwise GCD step shown so you can follow the maths.

Free to use Any list length Every GCD step shown GCD cross-check included

Enter your values

Fill in the fields below — the result appears with every step shown.

Shown on the printed, PDF and PNG copies of your result. Leave blank to stay anonymous.

Enter a valid value for numbers (comma separated).

Two or more whole numbers, separated by commas, e.g. 12, 18, 30.

Local browser calculation

Review your inputs and the tool’s supported scope before using the result.

Calculator loading… If this message stays, this view is not running the calculator's script — open this file in a full browser tab, then press Calculate.

Your result will appear here

Enter your values above, then press Calculate — or press Enter in any field.
TinyExe Least Common Multiple Calculator tinyexe.comFree online calculators

TinyExe · Least Common Multiple Result

Calculated locally in your browser

Calculated on
—

–
—

Name

—

Numbers (comma separated)

—

Input 2

—

Result

—

How this was calculated

    What to do next

      TinyExe · tinyexe.com — Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.

      TinyExe PDF & PNG exports carry the TinyExe logo and tinyexe.com header & footer.

      Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.

      Embed this tool

      Add this Least Common Multiple Calculator to your own page — copy the code below and paste it where you want the tool to appear.

      The embed loads the live calculator in a frame, so it stays up to date automatically. Choose a width, check the code, then copy it. When you publish on WordPress, keep the src pointing at your live tool URL.

      Works in WordPress (Custom HTML block), HTML pages, and most site builders.

      The short answer

      The least common multiple is the smallest number divisible by every number in the list, found with LCM(a, b) = a x b divided by GCD(a, b): the LCM of 12 and 18 is 36, of 7 and 5 is 35, and of 12, 18 and 30 is 180.

      • LCM(a,b) = a x b / GCD(a,b)
      • LCM is always at least the largest number in the list
      • For two numbers, a x b = LCM x GCD always

      Small LCM reference values

      Reference values for this calculator.

      PairGCDLCM
      4 and 6212
      6 and 8224
      9 and 12336
      5 and 7135
      12 and 18636
      8 and 12424

      The formula

      The exact formula this calculator uses — every variable in it is explained in the card below.

      The formula

      LCM(a, b) = a x b / GCD(a, b), applied pairwise across the list; equivalently the product of the highest prime powers appearing in any one number

      Enhancement: handles a whole list at once (not just a pair), shows each pairwise GCD step, and cross-checks with the prime-factor view in the explanation - the two methods students are taught, reconciled in one result.

      Worked examples

      Worked examples with the full working shown — try them in the calculator to check.

      Example 1

      The textbook pair

      12 and 18

      CalculationSteps
      GCD(12, 18) = 6, so LCM = 12 x 18 / 6 = 216 / 6 = 36.LCM(12, 18) = 36.

      Result

      Example 2

      Coprime numbers

      7 and 5

      CalculationSteps
      GCD(7, 5) = 1, so LCM = 7 x 5 / 1 = 35.LCM(7, 5) = 35.

      Result

      Example 3

      Three numbers

      12, 18 and 30

      CalculationSteps
      LCM(12, 18) = 36; then LCM(36, 30): GCD = 6, so 36 x 30 / 6 = 180.LCM(12, 18, 30) = 180.

      Result

      How to use this calculator

      Step 1

      List the whole numbers separated by commas.

      Step 2

      Read the LCM as the headline result.

      Step 3

      Follow the steps to see each pairwise LCM(a,b) = a x b / GCD step.

      Step 4

      Check the verdict: the LCM divided by each of your numbers should leave no remainder.

      Step 5

      Use the reference table to sanity-check small pairs by eye.

      In short: The least common multiple of a set of whole numbers is the smallest positive whole number that is a multiple of every number in the set.

      Frequently asked questions

      How do you find the LCM by hand?

      List the prime factors of each number, take the highest power of every prime that appears, and multiply them. For 12 = 2^2 x 3 and 18 = 2 x 3^2, the LCM is 2^2 x 3^2 = 36. The calculator's pairwise formula LCM(a,b) = a x b / GCD(a,b) gives the same answer.

      What is the difference between LCM and GCD?

      The GCD (greatest common divisor) is the largest number that divides all your numbers; the LCM is the smallest number that all your numbers divide into. For 12 and 18 the GCD is 6 and the LCM is 36, and note 12 x 18 = 216 = 6 x 36.

      Can the LCM be smaller than the largest number?

      No - the LCM is always at least the largest number in the list, and equals it only when every other number divides that largest number (for example LCM(4, 8) = 8).

      What is the LCM used for in real life?

      Adding fractions with different denominators (the LCM is the common denominator), scheduling repeating events so they coincide, gear and timing problems, and working out when buses, shifts or maintenance cycles line up again.

      Does the order of the numbers matter?

      No. LCM is commutative and associative, so LCM(12, 18, 30) is 180 regardless of order; the calculator folds the list in pairwise, one number at a time.

      About this calculator

      The least common multiple (LCM) of a set of whole numbers is the smallest positive number that every number in the set divides exactly. The LCM of 4 and 6 is 12 because 12 is the first number appearing in both the 4-times table (4, 8, 12) and the 6-times table (6, 12).

      There are two classic ways to find an LCM. The prime-factor method writes each number as a product of primes and takes the highest power of each prime: 12 = 2^2 x 3 and 18 = 2 x 3^2, so the LCM is 2^2 x 3^2 = 36. The GCD method uses the identity LCM(a, b) = a x b / GCD(a, b), which is faster for large numbers because the GCD is cheap to compute with Euclid's algorithm.

      For more than two numbers the same idea folds pairwise: LCM(12, 18, 30) = LCM(LCM(12, 18), 30) = LCM(36, 30) = 180. A useful check is the two-number identity a x b = LCM x GCD - for 12 and 18, 12 x 18 = 216 and 36 x 6 = 216. If your hand calculation breaks that identity, something is wrong.

      A frequent misconception is that the LCM is just the product of the numbers. That only works when the numbers share no common factor (coprime), like 7 and 5 giving 35. Whenever a GCD above 1 exists, the true LCM is the product divided by that shared factor, which is why 12 and 18 give 36, not 216.

      Use it when you add or compare fractions with different denominators, when repeating schedules need to coincide (two buses, two shifts, two machine cycles), or in school number-theory work where LCM and GCD appear together.

      How to calculate it yourself

      Step 1

      Write down the numbers whose LCM you need.

      Step 2

      Find the GCD of the first two numbers (Euclid's algorithm: divide, keep the remainder, repeat).

      Step 3

      Divide their product by the GCD to get the pairwise LCM.

      Step 4

      Fold in each remaining number the same way: LCM(current result, next number).

      Step 5

      Verify by dividing the final LCM by each original number - every division must be exact.

      Real-life examples

      Two buses leaving together

      Bus A leaves a depot every 12 minutes and bus B every 18 minutes. Both leave together at 9:00 and a passenger wants the next joint departure.

      LCM(12, 18) = 36, so the departures coincide every 36 minutes.

      The next joint departure is at 9:36, then 10:12 - found from the LCM, not by listing timetables.

      Adding fractions for a recipe scale-up

      A cook must add 5/12 and 7/18 of a cup while scaling a sauce and needs one common denominator.

      LCM(12, 18) = 36. 5/12 = 15/36 and 7/18 = 14/36, so the sum is 29/36 of a cup.

      The combined amount is 29/36 cup, using 36 as the lowest common denominator.

      Ideas & use cases

      • Timetable coincidence planner: enter the headways of two or three bus or train routes to find when they next leave together from a shared stop.
      • Fraction pre-check: find the LCM of a set of denominators before a homework session so every addition problem in the set uses one known common denominator.
      • Gear and cycle timing: enter the tooth counts or cycle times of two rotating parts to find when their marks realign.

      Limitations & sources

      • Non-negative whole numbers only - fractions and decimals must be scaled to integers first (for example LCM of 0.5 and 0.75 via 50 and 75). Very long lists of large numbers can exceed exact integer range in the browser.

      Sources: Standard number theory: LCM via GCD identity, e.g. Rosen, Elementary Number Theory; calculator.net LCM calculator behaviour cross-checked

      Least Common Multiple Calculator · TinyExe calculator suite Free to use · No sign-up · Instant results