{
  "id": "lcm",
  "version": "77205f438fd0",
  "status": "published",
  "name": "LCM Calculator",
  "question": "What is the LCM of my numbers?",
  "summary": "Finds the least common multiple (LCM) of two or more numbers, exactly, however large the answer is.",
  "category": "math",
  "subcategory": "arithmetic",
  "url": "https://www.acalculator.org/math/lcm-calculator",
  "markdown": "https://www.acalculator.org/math/lcm-calculator.md",
  "kind": "function",
  "method": "LCM(a, b) = |a × b| ÷ GCF(a, b), and LCM(a, b, c) = LCM(LCM(a, b), c); decimals are scaled by a power of ten.",
  "assumptions": [
    "Negative numbers count by their absolute value: LCM(−4, 6) = 12.",
    "The LCM of a list that contains 0 is 0, because 0 is the only multiple of 0.",
    "Decimals are exact as typed: every number is multiplied by the same power of ten to make it whole, and the LCM is divided by it again.",
    "The answer keeps every digit, however large. Very large numbers typed in the box are read as 64-bit floats, so enter whole numbers below 9,007,199,254,740,992 (2^53) to keep them exact."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "input": {
        "title": "Your numbers",
        "description": "Two or more numbers, separated by commas, spaces, semicolons, or new lines.",
        "type": "array",
        "items": {
          "type": "number"
        }
      }
    }
  },
  "outputs": {
    "lcm": {
      "label": "Least common multiple",
      "description": "The smallest number that every number in the list divides a whole number of times.",
      "format": "number"
    },
    "numbers": {
      "label": "Numbers",
      "description": "The numbers as read from the list, written without thousands separators.",
      "format": "text"
    },
    "note": {
      "label": "Decimals",
      "description": "Shown when a number has decimals: how the LCM of decimals is found.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "input": "12, 18, 24"
    },
    "outputs": {
      "lcm": "72",
      "numbers": "12, 18 and 24"
    },
    "text": "The least common multiple of 12, 18 and 24 is 72."
  },
  "examples": [
    {
      "given": {
        "input": [
          12,
          18,
          24
        ]
      },
      "expect": {
        "lcm": 72
      },
      "source": "hand calculation in content.mdx: 12 = 2²×3, 18 = 2×3², 24 = 2³×3; highest powers 2³×3² = 72; OpenStax, Prealgebra 2e, §2.5 Prime Factorization and the Least Common Multiple. https://openstax.org/books/prealgebra-2e/pages/2-5-prime-factorization-and-the-least-common-multiple"
    },
    {
      "given": {
        "input": [
          4,
          6
        ]
      },
      "expect": {
        "lcm": 12
      },
      "source": "hand calculation in content.mdx: 4 × 6 ÷ GCF(4, 6) = 24 ÷ 2 = 12; OpenStax, Prealgebra 2e, §2.5 Prime Factorization and the Least Common Multiple. https://openstax.org/books/prealgebra-2e/pages/2-5-prime-factorization-and-the-least-common-multiple"
    },
    {
      "given": {
        "input": [
          2,
          3,
          4,
          5,
          6
        ]
      },
      "expect": {
        "lcm": 60
      },
      "source": "hand calculation in content.mdx: highest powers 2²×3×5 = 60; OpenStax, Prealgebra 2e, §2.5 Prime Factorization and the Least Common Multiple. https://openstax.org/books/prealgebra-2e/pages/2-5-prime-factorization-and-the-least-common-multiple"
    },
    {
      "given": {
        "input": [
          1000,
          999
        ]
      },
      "expect": {
        "lcm": 999000
      },
      "source": "hand calculation in content.mdx: GCF(1000, 999) = 1, so the LCM is 1000 × 999 = 999,000; OpenStax, Prealgebra 2e, §2.5 Prime Factorization and the Least Common Multiple. https://openstax.org/books/prealgebra-2e/pages/2-5-prime-factorization-and-the-least-common-multiple"
    },
    {
      "given": {
        "input": [
          0.5,
          0.2
        ]
      },
      "expect": {
        "lcm": 1
      },
      "source": "hand calculation in content.mdx: ×10 gives 5 and 2, LCM 10, ÷10 = 1; OpenStax, Prealgebra 2e, §2.5 Prime Factorization and the Least Common Multiple. https://openstax.org/books/prealgebra-2e/pages/2-5-prime-factorization-and-the-least-common-multiple"
    }
  ],
  "sources": [
    "OpenStax, Prealgebra 2e, §2.5 Prime Factorization and the Least Common Multiple. https://openstax.org/books/prealgebra-2e/pages/2-5-prime-factorization-and-the-least-common-multiple"
  ],
  "related": [],
  "changelog": [
    {
      "date": "2026-09-28",
      "note": "The answer lists the numbers as 12, 18 and 24, without thousands separators; decimals get a note."
    },
    {
      "date": "2026-09-29",
      "note": "Worked examples name a published reference for their rule."
    }
  ]
}
