{
  "id": "framing",
  "version": "20f539edf3ca",
  "status": "published",
  "name": "Framing Calculator",
  "question": "How many studs do I need?",
  "summary": "A stud calculator for wall framing: the studs for a wall at 12, 16, 19.2 or 24 in on center (or 400 and 600 mm), with extras for openings and corners, waste, and the plate boards.",
  "category": "construction",
  "subcategory": "materials",
  "url": "https://www.acalculator.org/construction/framing-calculator",
  "markdown": "https://www.acalculator.org/construction/framing-calculator.md",
  "kind": "function",
  "method": "Layout studs = ⌈wall length ÷ spacing⌉ + 1; studs = layout + openings × extra per opening + corners × extra per corner; to buy = ⌈studs × (1 + waste ÷ 100)⌉; plate boards = ⌈wall length × (1 + top plates) × (1 + waste ÷ 100) ÷ board length⌉.",
  "assumptions": [
    "One straight wall with a stud at each spacing from one end and one at the other end.",
    "By default 2 extra studs per opening and 2 per corner, an estimating allowance and not a code rule; set your own counts for your framing.",
    "One bottom plate and a single or double top plate; headers, cripples, blocking and sheathing are not counted.",
    "Waste is 10% by default."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "l": {
        "title": "Wall length",
        "description": "The length of the wall, end to end.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 1000
      },
      "oc": {
        "title": "Stud spacing",
        "description": "The distance from the center of one stud to the next (on center).",
        "type": "string",
        "enum": [
          "12",
          "16",
          "24",
          "400",
          "600",
          "19.2"
        ]
      },
      "open": {
        "title": "Doors and windows",
        "description": "How many door and window openings the wall has.",
        "type": "integer",
        "minimum": 0,
        "maximum": 100
      },
      "po": {
        "title": "Extra studs per opening",
        "description": "Studs to add for each opening (king and jack studs).",
        "type": "integer",
        "minimum": 0,
        "maximum": 100
      },
      "corn": {
        "title": "Corners and wall ends",
        "description": "How many corners or wall junctions need extra studs.",
        "type": "integer",
        "minimum": 0,
        "maximum": 100
      },
      "pc": {
        "title": "Extra studs per corner",
        "description": "Studs to add for each corner or junction.",
        "type": "integer",
        "minimum": 0,
        "maximum": 100
      },
      "top": {
        "title": "Top plates",
        "description": "One top plate, or a double top plate as on most load-bearing walls.",
        "type": "string",
        "enum": [
          "1",
          "2"
        ]
      },
      "board": {
        "title": "Plate board length",
        "description": "The length of the boards the plates are cut from.",
        "type": "string",
        "enum": [
          "8",
          "10",
          "12",
          "16",
          "2.4",
          "3.6",
          "4.8"
        ]
      },
      "waste": {
        "title": "Extra for waste",
        "description": "Studs and plates to add, in percent, for bad boards and cutting mistakes.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 100
      }
    }
  },
  "outputs": {
    "buy": {
      "label": "Studs to buy",
      "description": "All studs with the extra for waste, rounded up.",
      "format": "integer"
    },
    "layout": {
      "label": "Studs on the layout",
      "description": "One stud at each spacing from the start of the wall, plus one at the end.",
      "format": "integer"
    },
    "studs": {
      "label": "Studs before waste",
      "description": "The layout studs plus the extras for openings and corners.",
      "format": "integer"
    },
    "plateLength": {
      "label": "Plate length",
      "description": "The wall length × (1 bottom plate + the top plates).",
      "format": "quantity",
      "unit": "ft"
    },
    "boards": {
      "label": "Plate boards to buy",
      "description": "The plate length with the extra for waste ÷ the board length, rounded up.",
      "format": "integer"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "l": 6.096,
      "oc": "16",
      "open": 1,
      "po": 2,
      "corn": 0,
      "pc": 2,
      "top": "2",
      "board": "8",
      "waste": 10
    },
    "outputs": {
      "buy": 20,
      "layout": 16,
      "studs": 18,
      "plateLength": 18.288,
      "boards": 9
    },
    "text": "A 20 ft wall needs 18 studs, 20 with waste, and 9 plate boards."
  },
  "examples": [
    {
      "given": {
        "l": 6.096,
        "oc": "16",
        "open": 1,
        "po": 2,
        "corn": 0,
        "pc": 2,
        "top": "2",
        "board": "8",
        "waste": 10
      },
      "expect": {
        "layout": 16,
        "studs": 18,
        "buy": 20,
        "boards": 9
      },
      "source": "IRC 2021 R602.3 and Table R602.3(5), stud spacing 16 or 24 in on center; R602.3.2 double top plate (https://codes.iccsafe.org/s/IRC2021P3/chapter-6-wall-construction/IRC2021P3-Pt03-Ch06-SecR602.3.2); hand calculation in content.mdx: 240 ÷ 16 = 15, + 1 = 16, + 2 = 18, × 1.1 = 19.8, so 20"
    },
    {
      "given": {
        "l": 2.4384,
        "oc": "16",
        "open": 0,
        "po": 2,
        "corn": 0,
        "pc": 2,
        "top": "2",
        "board": "8",
        "waste": 0
      },
      "expect": {
        "layout": 7,
        "buy": 7,
        "boards": 3,
        "plateLength": 7.3152
      },
      "source": "IRC 2021 R602.3 (16 in on center); hand calculation in content.mdx: 96 ÷ 16 = 6, + 1 = 7",
      "tolerance": 1e-12
    },
    {
      "given": {
        "l": 6,
        "oc": "600",
        "open": 0,
        "po": 2,
        "corn": 2,
        "pc": 2,
        "top": "2",
        "board": "3.6",
        "waste": 10
      },
      "expect": {
        "layout": 11,
        "studs": 15,
        "buy": 17,
        "boards": 6
      },
      "source": "IRC 2021 R602.3 (on-center spacing); hand calculation in content.mdx: 6,000 ÷ 600 = 10, + 1 = 11, + 4 = 15, × 1.1 = 16.5, so 17"
    }
  ],
  "sources": [
    "International Code Council, 2018 International Residential Code, Chapter 6, section R602.3 and Table R602.3(5), Size, height and spacing of wood studs (16 and 24 in on center; the 2021 edition keeps the table), retrieved 2026-10-01. https://codes.iccsafe.org/content/IRC2018P4/chapter-6-wall-construction",
    "International Code Council, 2021 International Residential Code, section R602.3.2, Top plate (double top plate). https://codes.iccsafe.org/s/IRC2021P3/chapter-6-wall-construction/IRC2021P3-Pt03-Ch06-SecR602.3.2"
  ],
  "related": [
    "drywall",
    "board-foot",
    "deck"
  ],
  "changelog": []
}
