{
  "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": "fence-calculator",
  "category": "auto-utility",
  "title": "Fence Calculator",
  "description": "Estimate the posts and rails needed for a wood fence run.",
  "url": "https://craftquantities.com/calculators/auto-utility/fence-calculator/",
  "json": "https://craftquantities.com/api/v1/calculators/fence-calculator.json",
  "inputCount": 12,
  "testCaseCount": 4,
  "sourceCount": 4,
  "lastVerified": "2026-10-31",
  "translations": {
    "es-US": "https://craftquantities.com/es/calculators/auto-utility/fence-calculator/"
  },
  "citation": {
    "author": "Craft Quantities",
    "title": "Fence Calculator",
    "version": "1.1.0",
    "sourcesChecked": "2026-10-31",
    "url": "https://craftquantities.com/calculators/auto-utility/fence-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. Fence Calculator. Version 1.1.0. Sources checked 2026-10-31. https://craftquantities.com/calculators/auto-utility/fence-calculator/",
      "apa": "Craft Quantities. (2026). Fence Calculator (Version 1.1.0) [Web calculator]. Retrieved from https://craftquantities.com/calculators/auto-utility/fence-calculator/",
      "harvard": "Craft Quantities (2026) Fence Calculator (Version 1.1.0). Available at: https://craftquantities.com/calculators/auto-utility/fence-calculator/",
      "bibtex": "@misc{craftquantities-calculators-auto-utility-fence-calculator,\n  author       = {{Craft Quantities}},\n  title        = {Fence Calculator},\n  version      = {1.1.0},\n  year         = {2026},\n  howpublished = {\\url{https://craftquantities.com/calculators/auto-utility/fence-calculator/}},\n}"
    }
  },
  "inputs": [
    {
      "id": "fenceLength",
      "label": "Fence Length",
      "type": "number",
      "dimension": "length",
      "defaultValue": 30,
      "min": 0.01,
      "max": 500,
      "step": 1,
      "help": "The total straight-line run of fence you're building."
    },
    {
      "id": "postSpacingFt",
      "label": "Post Spacing",
      "type": "select",
      "defaultValue": "8",
      "optionsBySystem": {
        "imperial": [
          {
            "value": "6",
            "label": "6 ft (sturdier, more posts)"
          },
          {
            "value": "8",
            "label": "8 ft (standard)"
          }
        ],
        "metric": [
          {
            "value": "6",
            "label": "1.8 m (~6 ft, sturdier, more posts)"
          },
          {
            "value": "8",
            "label": "2.4 m (~8 ft, standard)"
          }
        ]
      },
      "help": "Closer spacing is sturdier but needs more posts and concrete."
    },
    {
      "id": "fenceHeightFt",
      "label": "Fence Height",
      "type": "select",
      "defaultValue": "6",
      "optionsBySystem": {
        "imperial": [
          {
            "value": "4",
            "label": "Under 5 ft"
          },
          {
            "value": "6",
            "label": "5-7 ft"
          },
          {
            "value": "8",
            "label": "8 ft"
          }
        ],
        "metric": [
          {
            "value": "4",
            "label": "Under 1.5 m (~5 ft)"
          },
          {
            "value": "6",
            "label": "1.5–2.1 m (~5–7 ft)"
          },
          {
            "value": "8",
            "label": "2.4 m (~8 ft)"
          }
        ]
      },
      "help": "Taller fences need more horizontal rails per section to resist wind and sagging."
    },
    {
      "id": "corners",
      "label": "Corners (changes of direction)",
      "type": "number",
      "defaultValue": 0,
      "min": 0,
      "max": 200,
      "step": 1,
      "help": "How many times the fence line turns; each turn takes a post of its own."
    },
    {
      "id": "gateCount",
      "label": "Gates",
      "type": "number",
      "defaultValue": 0,
      "min": 0,
      "max": 20,
      "step": 1,
      "help": "Each gate takes its width out of the fenced run and needs a post on each side."
    },
    {
      "id": "gateOpening",
      "label": "Gate Width (each)",
      "type": "number",
      "dimension": "length",
      "defaultValue": 1,
      "min": 0.3,
      "max": 6,
      "step": 0.05,
      "help": "The clear opening of one gate, between its two posts."
    },
    {
      "id": "picketFace",
      "label": "Picket Width",
      "type": "number",
      "dimension": "length",
      "defaultValue": 0.1397,
      "min": 0,
      "max": 0.3,
      "step": 0.001,
      "help": "The face width of one picket or board; 0 leaves the pickets out (ready-made panels)."
    },
    {
      "id": "picketGap",
      "label": "Gap Between Pickets",
      "type": "number",
      "dimension": "length",
      "defaultValue": 0.00635,
      "min": 0,
      "max": 0.15,
      "step": 0.001,
      "help": "The space left between neighbouring pickets."
    },
    {
      "id": "spareRailsPickets",
      "label": "Spare Rails and Pickets (%)",
      "type": "number",
      "defaultValue": 5,
      "min": 0,
      "max": 30,
      "step": 1,
      "help": "Extra rails and pickets for knotty rejects, splits and the narrow closer in each bay."
    },
    {
      "id": "postHoleBore",
      "label": "Post Hole Diameter",
      "type": "number",
      "dimension": "length",
      "defaultValue": 0.254,
      "min": 0,
      "max": 0.6,
      "step": 0.0127,
      "help": "The diameter of each post hole; 0 leaves the concrete out."
    },
    {
      "id": "postHoleSet",
      "label": "Post Hole Depth",
      "type": "number",
      "dimension": "length",
      "defaultValue": 0.6096,
      "min": 0,
      "max": 2,
      "step": 0.0254,
      "help": "The depth of concrete in each hole."
    },
    {
      "id": "postSize",
      "label": "Post Size (square)",
      "type": "number",
      "dimension": "length",
      "defaultValue": 0.0889,
      "min": 0,
      "max": 0.3,
      "step": 0.001,
      "help": "The actual face of a square post, taken out of the hole's volume."
    }
  ],
  "sources": [
    {
      "label": "Post count = (fence length / post spacing) + 1; typical post spacing is 6-8 ft for wood fencing"
    },
    {
      "label": "Recommended rails: 2 for fences under 5 ft, 3 for 5-7 ft, 4 for 8 ft fences"
    },
    {
      "label": "Picket count = fenced length / (picket width + gap), the Fence Picket Calculator's rule; concrete per post hole = (π d² / 4 − post face²) × hole depth"
    },
    {
      "label": "Premix concrete yields about 0.0075 cubic feet per pound of dry mix (an 80 lb bag about 0.6 cubic feet), the Concrete Calculator's figure"
    }
  ],
  "testCases": [
    {
      "name": "30m fence, 8ft spacing, 5-7ft height",
      "inputs": {
        "fenceLength": 30,
        "postSpacingFt": 8,
        "fenceHeightFt": 6
      },
      "expected": 14,
      "toleranceDecimalPlaces": 0,
      "unit": "posts",
      "confidence": "high",
      "steps": [
        {
          "label": "Fence length",
          "value": 98.42519685039369,
          "unit": "ft"
        },
        {
          "label": "Sections",
          "value": 13,
          "unit": "sections"
        },
        {
          "label": "Line and end posts",
          "value": 14,
          "unit": "posts"
        },
        {
          "label": "Corner posts",
          "value": 0,
          "unit": "posts"
        },
        {
          "label": "Section width, as set out",
          "value": 7.571168988491822,
          "unit": "ft"
        },
        {
          "label": "Rails needed",
          "value": 39,
          "unit": "rails"
        },
        {
          "label": "Rails to order, spare added",
          "value": 41,
          "unit": "rails"
        },
        {
          "label": "Pickets before the spare",
          "value": 205.4091064703869,
          "unit": "pickets"
        },
        {
          "label": "Pickets to order, spare added",
          "value": 216,
          "unit": "pickets"
        },
        {
          "label": "Concrete per post hole",
          "value": 0.920691893607567,
          "unit": "ft³"
        },
        {
          "label": "Concrete for all post holes",
          "value": 12.889686510505937,
          "unit": "ft³"
        },
        {
          "label": "Post bags, 80 lb (30 kg metric)",
          "value": 22,
          "unit": "bags"
        }
      ],
      "basis": "cited",
      "sourceIndex": 0
    },
    {
      "name": "20m fence, 6ft spacing, under 5ft height",
      "inputs": {
        "fenceLength": 20,
        "postSpacingFt": 6,
        "fenceHeightFt": 4
      },
      "expected": 12,
      "toleranceDecimalPlaces": 0,
      "unit": "posts",
      "confidence": "high",
      "steps": [
        {
          "label": "Fence length",
          "value": 65.61679790026247,
          "unit": "ft"
        },
        {
          "label": "Sections",
          "value": 11,
          "unit": "sections"
        },
        {
          "label": "Line and end posts",
          "value": 12,
          "unit": "posts"
        },
        {
          "label": "Corner posts",
          "value": 0,
          "unit": "posts"
        },
        {
          "label": "Section width, as set out",
          "value": 5.965163445478407,
          "unit": "ft"
        },
        {
          "label": "Rails needed",
          "value": 22,
          "unit": "rails"
        },
        {
          "label": "Rails to order, spare added",
          "value": 24,
          "unit": "rails"
        },
        {
          "label": "Pickets before the spare",
          "value": 136.93940431359124,
          "unit": "pickets"
        },
        {
          "label": "Pickets to order, spare added",
          "value": 144,
          "unit": "pickets"
        },
        {
          "label": "Concrete per post hole",
          "value": 0.920691893607567,
          "unit": "ft³"
        },
        {
          "label": "Concrete for all post holes",
          "value": 11.048302723290805,
          "unit": "ft³"
        },
        {
          "label": "Post bags, 80 lb (30 kg metric)",
          "value": 19,
          "unit": "bags"
        }
      ],
      "basis": "cited",
      "sourceIndex": 0
    },
    {
      "name": "20m fence with two corners, 6ft spacing",
      "inputs": {
        "fenceLength": 20,
        "postSpacingFt": 6,
        "fenceHeightFt": 4,
        "corners": 2
      },
      "expected": 14,
      "toleranceDecimalPlaces": 0,
      "unit": "posts",
      "confidence": "high",
      "steps": [
        {
          "label": "Fence length",
          "value": 65.61679790026247,
          "unit": "ft"
        },
        {
          "label": "Sections",
          "value": 11,
          "unit": "sections"
        },
        {
          "label": "Line and end posts",
          "value": 12,
          "unit": "posts"
        },
        {
          "label": "Corner posts",
          "value": 2,
          "unit": "posts"
        },
        {
          "label": "Section width, as set out",
          "value": 5.965163445478407,
          "unit": "ft"
        },
        {
          "label": "Rails needed",
          "value": 22,
          "unit": "rails"
        },
        {
          "label": "Rails to order, spare added",
          "value": 24,
          "unit": "rails"
        },
        {
          "label": "Pickets before the spare",
          "value": 136.93940431359124,
          "unit": "pickets"
        },
        {
          "label": "Pickets to order, spare added",
          "value": 144,
          "unit": "pickets"
        },
        {
          "label": "Concrete per post hole",
          "value": 0.920691893607567,
          "unit": "ft³"
        },
        {
          "label": "Concrete for all post holes",
          "value": 12.889686510505937,
          "unit": "ft³"
        },
        {
          "label": "Post bags, 80 lb (30 kg metric)",
          "value": 22,
          "unit": "bags"
        }
      ],
      "basis": "cited",
      "sourceIndex": 0
    },
    {
      "name": "30m fence with one 1.2 m gate, 8ft spacing",
      "inputs": {
        "fenceLength": 30,
        "postSpacingFt": 8,
        "fenceHeightFt": 6,
        "gateCount": 1,
        "gateOpening": 1.2
      },
      "expected": 14,
      "toleranceDecimalPlaces": 0,
      "unit": "posts",
      "confidence": "high",
      "steps": [
        {
          "label": "Fence length",
          "value": 98.42519685039369,
          "unit": "ft"
        },
        {
          "label": "Sections",
          "value": 12,
          "unit": "sections"
        },
        {
          "label": "Line and end posts",
          "value": 13,
          "unit": "posts"
        },
        {
          "label": "Corner posts",
          "value": 0,
          "unit": "posts"
        },
        {
          "label": "Fenced length, gates taken out",
          "value": 94.48818897637796,
          "unit": "ft"
        },
        {
          "label": "Gate posts, two to each gate (in the count)",
          "value": 2,
          "unit": "posts"
        },
        {
          "label": "Section width, as set out",
          "value": 7.874015748031496,
          "unit": "ft"
        },
        {
          "label": "Rails needed",
          "value": 36,
          "unit": "rails"
        },
        {
          "label": "Rails to order, spare added",
          "value": 38,
          "unit": "rails"
        },
        {
          "label": "Pickets before the spare",
          "value": 197.1927422115714,
          "unit": "pickets"
        },
        {
          "label": "Pickets to order, spare added",
          "value": 208,
          "unit": "pickets"
        },
        {
          "label": "Concrete per post hole",
          "value": 0.920691893607567,
          "unit": "ft³"
        },
        {
          "label": "Concrete for all post holes",
          "value": 12.889686510505937,
          "unit": "ft³"
        },
        {
          "label": "Post bags, 80 lb (30 kg metric)",
          "value": 22,
          "unit": "bags"
        }
      ],
      "basis": "cited",
      "sourceIndex": 0
    }
  ],
  "usedByAssemblies": [
    {
      "id": "fence-run",
      "name": "Fence run"
    }
  ]
}
