{
  "version": "v1",
  "source": "https://craftquantities.com",
  "licence": "CC BY 4.0",
  "licenceUrl": "https://creativecommons.org/licenses/by/4.0/",
  "attribution": "Craft Quantities — craftquantities.com",
  "documentation": "https://craftquantities.com/api/",
  "versioning": "Fields are added, never removed or repurposed, within a version. A breaking change becomes /api/v2/ and v1 keeps being built.",
  "slug": "common-rafter-length-calculator",
  "category": "materials-quantities",
  "title": "Common Gable Rafter Length Calculator",
  "description": "Calculate common rafter length from building width and roof pitch, including the overhang tail.",
  "url": "https://craftquantities.com/calculators/materials-quantities/common-rafter-length-calculator/",
  "json": "https://craftquantities.com/api/v1/calculators/common-rafter-length-calculator.json",
  "inputCount": 3,
  "testCaseCount": 2,
  "sourceCount": 1,
  "lastVerified": "2026-09-17",
  "translations": {
    "es-US": "https://craftquantities.com/es/calculators/materials-quantities/common-rafter-length-calculator/"
  },
  "citation": {
    "author": "Craft Quantities",
    "title": "Common Gable Rafter Length Calculator",
    "version": "1.0.2",
    "sourcesChecked": "2026-09-17",
    "url": "https://craftquantities.com/calculators/materials-quantities/common-rafter-length-calculator/",
    "accessDate": null,
    "accessDateNote": "Add the date you retrieved this. It is deliberately absent: a static file cannot know when you read it, and the build date would be wrong.",
    "permanentVersionedUrl": null,
    "permanentVersionedUrlNote": "Not offered. This site keeps no archive of previous builds, so any such URL would resolve to the current page or to nothing. The version and sourcesChecked fields identify the calculation instead.",
    "formats": {
      "plain": "Craft Quantities. Common Gable Rafter Length Calculator. Version 1.0.2. Sources checked 2026-09-17. https://craftquantities.com/calculators/materials-quantities/common-rafter-length-calculator/",
      "apa": "Craft Quantities. (2026). Common Gable Rafter Length Calculator (Version 1.0.2) [Web calculator]. Retrieved from https://craftquantities.com/calculators/materials-quantities/common-rafter-length-calculator/",
      "harvard": "Craft Quantities (2026) Common Gable Rafter Length Calculator (Version 1.0.2). Available at: https://craftquantities.com/calculators/materials-quantities/common-rafter-length-calculator/",
      "bibtex": "@misc{craftquantities-calculators-materials-quantities-common-rafter-length-calculator,\n  author       = {{Craft Quantities}},\n  title        = {Common Gable Rafter Length Calculator},\n  version      = {1.0.2},\n  year         = {2026},\n  howpublished = {\\url{https://craftquantities.com/calculators/materials-quantities/common-rafter-length-calculator/}},\n}"
    }
  },
  "inputs": [
    {
      "id": "buildingWidth",
      "label": "Building Width",
      "type": "number",
      "dimension": "length",
      "defaultValue": 8,
      "min": 0.01,
      "max": 30,
      "step": 0.1,
      "help": "The overall width of the building, wall to wall."
    },
    {
      "id": "roofPitch",
      "label": "Roof Pitch (rise per 12 run)",
      "type": "number",
      "defaultValue": 6,
      "min": 1,
      "max": 24,
      "step": 0.5,
      "help": "The roof's slope, expressed as inches of rise per 12 inches of horizontal run."
    },
    {
      "id": "overhang",
      "label": "Overhang (Horizontal)",
      "type": "number",
      "dimension": "length",
      "defaultValue": 0.4,
      "min": 0,
      "max": 1.5,
      "step": 0.05,
      "help": "The horizontal distance the rafter tail extends past the wall plate."
    }
  ],
  "sources": [
    {
      "label": "Standard carpentry rafter-length formula: rafter length = run × √(1 + (rise/12)²), where run is the horizontal distance from wall plate to ridge"
    }
  ],
  "testCases": [
    {
      "name": "8m building, 6/12 pitch, 0.4m overhang",
      "inputs": {
        "buildingWidth": 8,
        "roofPitch": 6,
        "overhang": 0.4
      },
      "expected": 4.919,
      "toleranceDecimalPlaces": 1,
      "unit": "m",
      "confidence": "high",
      "steps": [
        {
          "label": "Rafter length to ridge (no overhang)",
          "value": 4.47213595499958,
          "unit": "m"
        },
        {
          "label": "Overhang tail length",
          "value": 0.447213595499958,
          "unit": "m"
        }
      ],
      "basis": "sole-source",
      "sourceIndex": 0
    },
    {
      "name": "10m building, 8/12 pitch, 0.5m overhang",
      "inputs": {
        "buildingWidth": 10,
        "roofPitch": 8,
        "overhang": 0.5
      },
      "expected": 6.61,
      "toleranceDecimalPlaces": 1,
      "unit": "m",
      "confidence": "high",
      "steps": [
        {
          "label": "Rafter length to ridge (no overhang)",
          "value": 6.009252125773315,
          "unit": "m"
        },
        {
          "label": "Overhang tail length",
          "value": 0.6009252125773316,
          "unit": "m"
        }
      ],
      "basis": "sole-source",
      "sourceIndex": 0
    }
  ]
}
