{
  "id": "board-and-batten",
  "version": "f9aadd808d2c",
  "status": "published",
  "name": "Board and Batten Calculator",
  "question": "How much board and batten?",
  "summary": "A board and batten calculator for a wall: how many vertical battens fit with even gaps no wider than you choose, the exact gap, horizontal rails, the total length and the boards to buy.",
  "category": "construction",
  "subcategory": "materials",
  "url": "https://www.acalculator.org/construction/board-and-batten-calculator",
  "markdown": "https://www.acalculator.org/construction/board-and-batten-calculator.md",
  "kind": "function",
  "method": "Battens n = ⌈(W − b) ÷ (g + b)⌉ + 1 (at least 2); gap = (W − n × b) ÷ (n − 1); vertical length = H − rows × b; total = n × vertical + rows × W; boards = ⌈total × (1 + waste ÷ 100) ÷ board length⌉.",
  "assumptions": [
    "Battens run from edge to edge: one at each end of the wall, with equal gaps between.",
    "Horizontal rows run the full wall width, and the vertical battens fit between them.",
    "Boards are counted by total length; the count does not plan each cut. Waste is 10% by default."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "w": {
        "title": "Wall width",
        "description": "The width of the wall, edge to edge.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "minimum": 0.01,
        "maximum": 100
      },
      "h": {
        "title": "Wall height",
        "description": "The height to cover, for example from the baseboard up.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "minimum": 0.01,
        "maximum": 30
      },
      "b": {
        "title": "Batten width",
        "description": "The face width of one batten: 2.5 in for a 1×3, 3.5 in for a 1×4.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "minimum": 0.001,
        "maximum": 1
      },
      "g": {
        "title": "Gap between battens, at most",
        "description": "The widest space you want between two battens.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "minimum": 0.001,
        "maximum": 10
      },
      "rows": {
        "title": "Horizontal rows",
        "description": "Battens running across the wall, such as a top rail (1) or a top and middle rail (2).",
        "type": "integer",
        "minimum": 0,
        "maximum": 20
      },
      "board": {
        "title": "Board length",
        "description": "The length of the boards the battens are cut from.",
        "type": "string",
        "enum": [
          "6",
          "8",
          "10",
          "12",
          "16",
          "2.4",
          "3.0",
          "3.6"
        ]
      },
      "waste": {
        "title": "Extra for waste",
        "description": "Length to add, in percent, for cut-offs and bad boards.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 100
      }
    }
  },
  "outputs": {
    "battens": {
      "label": "Vertical battens",
      "description": "The fewest battens, one at each edge, whose equal gaps are no wider than the gap you chose.",
      "format": "integer"
    },
    "gapOut": {
      "label": "Gap between battens",
      "description": "The equal space between two battens: (wall width − battens × batten width) ÷ (battens − 1).",
      "format": "quantity",
      "unit": "in"
    },
    "centers": {
      "label": "Center to center",
      "description": "The distance from the center of one batten to the next: gap + batten width.",
      "format": "quantity",
      "unit": "in"
    },
    "vertical": {
      "label": "Length of each vertical batten",
      "description": "The wall height less the horizontal rows.",
      "format": "quantity",
      "unit": "in"
    },
    "total": {
      "label": "Total batten length",
      "description": "Vertical battens × their length + horizontal rows × the wall width.",
      "format": "quantity",
      "unit": "ft"
    },
    "boards": {
      "label": "Boards to buy",
      "description": "The total length with the extra for waste ÷ the board length, rounded up.",
      "format": "integer"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "w": 3.6576,
      "h": 2.4383999999999997,
      "b": 0.0635,
      "g": 0.4064,
      "rows": 1,
      "board": "8",
      "waste": 10
    },
    "outputs": {
      "battens": 9,
      "gapOut": 0.3857625,
      "centers": 0.4492625,
      "vertical": 2.3749000000000002,
      "total": 25.0317,
      "boards": 12
    },
    "text": "A 12 ft wall takes 9 vertical battens with 15.188 in gaps, 12 boards in all."
  },
  "examples": [
    {
      "given": {
        "w": 3.6576,
        "h": 2.4383999999999997,
        "b": 0.0635,
        "g": 0.4064,
        "rows": 1,
        "board": "8",
        "waste": 10
      },
      "expect": {
        "battens": 9,
        "gapOut": 0.3857625,
        "total": 25.0317,
        "boards": 12
      },
      "source": "OpenStax Prealgebra 2e, section 9.4 (length and area of rectangles, https://openstax.org/books/prealgebra-2e/pages/9-4-use-properties-of-rectangles-triangles-and-trapezoids); NIST Handbook 44 (1 in = 2.54 cm); hand calculation in content.mdx: 141.5 ÷ 18.5 = 7.65, so 8 + 1 = 9 battens, gap 121.5 ÷ 8 = 15.1875 in",
      "tolerance": 1e-12
    },
    {
      "given": {
        "w": 3.048,
        "h": 1.524,
        "b": 0.08889999999999999,
        "g": 0.30479999999999996,
        "rows": 2,
        "board": "8",
        "waste": 0
      },
      "expect": {
        "battens": 9,
        "gapOut": 0.2809875,
        "total": 18.2118,
        "boards": 8
      },
      "source": "NIST Handbook 44 (1 in = 2.54 cm); hand calculation in content.mdx: 116.5 ÷ 15.5 = 7.5, so 9 battens, gap 88.5 ÷ 8 = 11.0625 in, 717 in of battens",
      "tolerance": 1e-12
    }
  ],
  "sources": [
    "OpenStax, Prealgebra 2e, section 9.4, Use Properties of Rectangles, Triangles, and Trapezoids (lengths and perimeters of rectangles), CC BY 4.0, retrieved 2026-10-01. https://openstax.org/books/prealgebra-2e/pages/9-4-use-properties-of-rectangles-triangles-and-trapezoids",
    "NIST Handbook 44 (2024), Appendix C, General Tables of Units of Measurement: 1 in = 2.54 cm, 1 ft = 12 in = 0.3048 m. https://www.nist.gov/pml/owm/nist-handbook-44-current-edition"
  ],
  "related": [
    "drywall",
    "paint",
    "board-foot"
  ],
  "changelog": []
}
