{
  "id": "lcd",
  "version": "25b8459f9089",
  "status": "published",
  "name": "LCD Calculator",
  "question": "What is the LCD of my fractions?",
  "summary": "Finds the least common denominator (LCD) of two or more fractions and rewrites each fraction over it, with the prime factors of each denominator.",
  "category": "math",
  "subcategory": "fractions",
  "url": "https://www.acalculator.org/math/lcd-calculator",
  "markdown": "https://www.acalculator.org/math/lcd-calculator.md",
  "kind": "function",
  "method": "LCD = LCM of the denominators: factor each denominator into primes and multiply the highest power of each prime. Each fraction a/b becomes (a × LCD ÷ b)/LCD.",
  "assumptions": [
    "Denominators are used as typed. A fraction that is not in lowest terms (2/4) keeps its denominator (4); reduce it first if you want the smallest LCD of the values.",
    "A whole number has denominator 1. A mixed number w a/b is (w × b + a)/b; a minus sign applies to the whole mixed number.",
    "Fractions are separated by commas, semicolons or new lines; a space separates the whole part of a mixed number."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "f": {
        "title": "Fractions",
        "description": "Two or more fractions, whole numbers or mixed numbers, separated by commas, semicolons or new lines.",
        "type": "string",
        "maxLength": 1000
      }
    }
  },
  "outputs": {
    "lcd": {
      "label": "Least common denominator",
      "description": "The least common multiple of the denominators.",
      "format": "integer"
    },
    "rewritten": {
      "label": "Fractions over the LCD",
      "description": "Each fraction with its numerator and denominator multiplied by LCD ÷ its denominator.",
      "format": "text"
    },
    "steps": {
      "label": "Steps",
      "description": "The prime factors of each denominator and the LCD built from the highest powers.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "f": "7/12, 5/18"
    },
    "outputs": {
      "lcd": "36",
      "rewritten": "7/12 = 21/36; 5/18 = 10/36",
      "steps": "Denominators: 12 = 2² × 3, 18 = 2 × 3²; LCD = the highest power of each prime = 2² × 3² = 36; 7/12: multiply top and bottom by 36 ÷ 12 = 3, giving 21/36; 5/18: multiply top and bottom by 36 ÷ 18 = 2, giving 10/36"
    },
    "text": "The LCD is 36."
  },
  "examples": [
    {
      "given": {
        "f": "7/12, 5/18"
      },
      "expect": {
        "lcd": 36,
        "rewritten": "7/12 = 21/36; 5/18 = 10/36"
      },
      "source": "OpenStax, Prealgebra 2e, §4.5 Add and Subtract Fractions with Different Denominators (the LCD is the LCM of the denominators), https://openstax.org/books/prealgebra-2e/pages/4-5-add-and-subtract-fractions-with-different-denominators (Example: the LCD of 7/12 and 5/18 is 36)"
    },
    {
      "given": {
        "f": "8/15, 11/24"
      },
      "expect": {
        "lcd": 120,
        "rewritten": "8/15 = 64/120; 11/24 = 55/120"
      },
      "source": "OpenStax, Prealgebra 2e, §4.5 Add and Subtract Fractions with Different Denominators (the LCD is the LCM of the denominators), https://openstax.org/books/prealgebra-2e/pages/4-5-add-and-subtract-fractions-with-different-denominators (Example: the LCD of 8/15 and 11/24 is 120)"
    },
    {
      "given": {
        "f": "1 1/2; 2/3; -5/8"
      },
      "expect": {
        "lcd": 24,
        "rewritten": "1 1/2 = 36/24; 2/3 = 16/24; -5/8 = -15/24"
      },
      "source": "hand calculation in content.mdx: LCM(2, 3, 8) = 2³ × 3 = 24; 1 1/2 = 3/2 = 36/24; OpenStax, Prealgebra 2e, §4.5 Add and Subtract Fractions with Different Denominators (the LCD is the LCM of the denominators), https://openstax.org/books/prealgebra-2e/pages/4-5-add-and-subtract-fractions-with-different-denominators"
    },
    {
      "given": {
        "f": "2/4, 1/6, 3"
      },
      "expect": {
        "lcd": 12,
        "rewritten": "2/4 = 6/12; 1/6 = 2/12; 3 = 36/12"
      },
      "source": "hand calculation in content.mdx: LCM(4, 6, 1) = 12; OpenStax, Prealgebra 2e, §4.5 Add and Subtract Fractions with Different Denominators (the LCD is the LCM of the denominators), https://openstax.org/books/prealgebra-2e/pages/4-5-add-and-subtract-fractions-with-different-denominators"
    }
  ],
  "sources": [
    "OpenStax, Prealgebra 2e, §4.5 Add and Subtract Fractions with Different Denominators (the LCD is the LCM of the denominators; LCD of 7/12 and 5/18 is 36; of 8/15 and 11/24 is 120). https://openstax.org/books/prealgebra-2e/pages/4-5-add-and-subtract-fractions-with-different-denominators (retrieved 2026-10-02)"
  ],
  "related": [
    "lcm",
    "gcf",
    "fraction",
    "simplify-fraction"
  ],
  "changelog": []
}
