{
  "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": "layout-squaring-calculator",
  "category": "measurements-conversions",
  "title": "Squaring Calculator for Layout and Setting Out (3-4-5 Rule)",
  "description": "Check a building layout is square: the diagonal it should read, the largest 3-4-5 triangle to strike, and how far and which way to move a corner.",
  "url": "https://craftquantities.com/calculators/measurements-conversions/layout-squaring-calculator/",
  "json": "https://craftquantities.com/api/v1/calculators/layout-squaring-calculator.json",
  "inputCount": 5,
  "testCaseCount": 3,
  "sourceCount": 3,
  "lastVerified": "2026-10-05",
  "citation": {
    "author": "Craft Quantities",
    "title": "Squaring Calculator for Layout and Setting Out (3-4-5 Rule)",
    "version": "1.0.0",
    "sourcesChecked": "2026-10-05",
    "url": "https://craftquantities.com/calculators/measurements-conversions/layout-squaring-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. Squaring Calculator for Layout and Setting Out (3-4-5 Rule). Version 1.0.0. Sources checked 2026-10-05. https://craftquantities.com/calculators/measurements-conversions/layout-squaring-calculator/",
      "apa": "Craft Quantities. (2026). Squaring Calculator for Layout and Setting Out (3-4-5 Rule) (Version 1.0.0) [Web calculator]. Retrieved from https://craftquantities.com/calculators/measurements-conversions/layout-squaring-calculator/",
      "harvard": "Craft Quantities (2026) Squaring Calculator for Layout and Setting Out (3-4-5 Rule) (Version 1.0.0). Available at: https://craftquantities.com/calculators/measurements-conversions/layout-squaring-calculator/",
      "bibtex": "@misc{craftquantities-calculators-measurements-conversions-layout-squaring-calculator,\n  author       = {{Craft Quantities}},\n  title        = {Squaring Calculator for Layout and Setting Out (3-4-5 Rule)},\n  version      = {1.0.0},\n  year         = {2026},\n  howpublished = {\\url{https://craftquantities.com/calculators/measurements-conversions/layout-squaring-calculator/}},\n}"
    }
  },
  "inputs": [
    {
      "id": "baseSide",
      "label": "Side Along the Base Line",
      "type": "number",
      "dimension": "length",
      "defaultValue": 8,
      "min": 0.5,
      "max": 300,
      "step": 0.01,
      "help": "The side you hold fixed, measured from the corner: usually the longer side, or the one set off an existing wall."
    },
    {
      "id": "otherSide",
      "label": "Side to the Far Corner",
      "type": "number",
      "dimension": "length",
      "defaultValue": 5,
      "min": 0.5,
      "max": 300,
      "step": 0.01,
      "help": "The second side, running from the same corner and meant to be square to the base line."
    },
    {
      "id": "checkBy",
      "label": "How You Are Checking",
      "type": "select",
      "defaultValue": "one",
      "options": [
        {
          "value": "one",
          "label": "One diagonal, across the corner"
        },
        {
          "value": "two",
          "label": "Both diagonals of a rectangle"
        }
      ],
      "help": "A single diagonal across one corner, or the two diagonals of a four-cornered layout."
    },
    {
      "id": "measuredDiagonal",
      "label": "Diagonal You Measured",
      "type": "number",
      "dimension": "length",
      "defaultValue": 9.45,
      "min": 0.5,
      "max": 450,
      "step": 0.001,
      "help": "The tape reading from the end of the base side straight across to the end of the other side."
    },
    {
      "id": "diagonalDifference",
      "label": "Difference Between the Two Diagonals",
      "type": "number",
      "dimension": "length",
      "defaultValue": 0.017,
      "min": 0,
      "max": 1,
      "step": 0.001,
      "help": "How much longer one corner-to-corner reading is than the other."
    }
  ],
  "sources": [
    {
      "label": "Euclid, Elements, Book I, Proposition 48 (D. E. Joyce's edition, Clark University): if the square on one side of a triangle equals the squares on the other two together, the angle between those two is right — which is why any multiple of 3, 4 and 5 makes a square corner — and Proposition 47, its converse, which gives the expected diagonal √(a² + b²)",
      "url": "https://mathcs.clarku.edu/~djoyce/elements/bookI/propI48.html"
    },
    {
      "label": "The QUIKRETE Companies, Layout Basics for Slabs and Footers: stake out with the 3-4-5 triangular method, any multiple such as 6-8-10 or 9-12-15 giving the same result, then double-check for squareness by measuring the diagonals between opposite corners, which should be equal; batter boards set back from the work keep the lines",
      "url": "https://www.quikrete.com/PDFs/Projects/LayoutBasicsForSlabsAndFooters.pdf"
    },
    {
      "label": "NIST Digital Library of Mathematical Functions, §4.42 Solution of Triangles, the law of cosines (4.42.5): the corner angle from its two sides and the diagonal across it, and, applied to the two halves of a parallelogram, d₁² + d₂² = 2(a² + b²) and d₁² − d₂² = 4ab·cos θ, from which the racked shift and angle follow",
      "url": "https://dlmf.nist.gov/4.42"
    }
  ],
  "testCases": [
    {
      "name": "3 and 4 from the corner: the diagonal reads 5",
      "inputs": {
        "baseSide": 4,
        "otherSide": 3,
        "checkBy": "one",
        "measuredDiagonal": 5
      },
      "expected": 5,
      "toleranceDecimalPlaces": 9,
      "unit": "m",
      "confidence": "high",
      "steps": [
        {
          "label": "Squaring triangle: leg along the longer side",
          "value": 12,
          "unit": "ft"
        },
        {
          "label": "Squaring triangle: leg along the shorter side",
          "value": 9,
          "unit": "ft"
        },
        {
          "label": "Squaring triangle: diagonal between the two marks",
          "value": 15,
          "unit": "ft"
        },
        {
          "label": "Measured diagonal less the square figure",
          "value": 0,
          "unit": "mm"
        },
        {
          "label": "Angle at the corner",
          "value": 90,
          "unit": "°"
        },
        {
          "label": "Corner out of square by",
          "value": 0,
          "unit": "°"
        },
        {
          "label": "Move the far end of the second side by",
          "value": 0,
          "unit": "mm"
        }
      ],
      "basis": "cited",
      "sourceIndex": 0
    },
    {
      "name": "the setting-out guide's 8 by 5 base reads 9.434 corner to corner",
      "inputs": {
        "baseSide": 8,
        "otherSide": 5,
        "checkBy": "one",
        "measuredDiagonal": 9.45
      },
      "expected": 9.433981,
      "toleranceDecimalPlaces": 5,
      "unit": "m",
      "confidence": "high",
      "steps": [
        {
          "label": "Squaring triangle: leg along the longer side",
          "value": 20,
          "unit": "ft"
        },
        {
          "label": "Squaring triangle: leg along the shorter side",
          "value": 15,
          "unit": "ft"
        },
        {
          "label": "Squaring triangle: diagonal between the two marks",
          "value": 25,
          "unit": "ft"
        },
        {
          "label": "Measured diagonal less the square figure",
          "value": 16.01886794339613,
          "unit": "mm"
        },
        {
          "label": "Angle at the corner",
          "value": 90.21665018255794,
          "unit": "°"
        },
        {
          "label": "Corner out of square by",
          "value": 0.21665018255794166,
          "unit": "°"
        },
        {
          "label": "Move the far end of the second side by",
          "value": 18.906249999998792,
          "unit": "mm"
        }
      ],
      "basis": "cited",
      "sourceIndex": 0
    },
    {
      "name": "a 24 by 16 ft (7.32 by 4.88 m) slab reads 28.844 ft (8.792 m) corner to corner",
      "inputs": {
        "baseSide": 7.3152,
        "otherSide": 4.8768,
        "checkBy": "two",
        "diagonalDifference": 0.0127
      },
      "expected": 8.791776,
      "toleranceDecimalPlaces": 5,
      "unit": "m",
      "confidence": "high",
      "steps": [
        {
          "label": "Squaring triangle: leg along the longer side",
          "value": 20,
          "unit": "ft"
        },
        {
          "label": "Squaring triangle: leg along the shorter side",
          "value": 15,
          "unit": "ft"
        },
        {
          "label": "Squaring triangle: diagonal between the two marks",
          "value": 25,
          "unit": "ft"
        },
        {
          "label": "Longer diagonal the sides and the difference imply",
          "value": 8.798123936896921,
          "unit": "m"
        },
        {
          "label": "Shorter diagonal the sides and the difference imply",
          "value": 8.785423936896922,
          "unit": "m"
        },
        {
          "label": "Corners out of square by",
          "value": 0.08966271759396992,
          "unit": "°"
        },
        {
          "label": "Slide the far side along the base line by",
          "value": 7.631748209111912,
          "unit": "mm"
        }
      ],
      "basis": "cited",
      "sourceIndex": 1
    }
  ]
}
