{"uid":"cap_z3QPiMQFh2ZNqZcEPmycm","slug":"fence-materials-calculator-1e7b7875","name":"Fence Materials Calculator","description":"Posts, rails and pickets for a straight fence from its length, post spacing, picket width and gap.","url":"https://construction-calc.x402tookit.com/fence-calc?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["lengthFt"],"properties":{"gates":{"type":"integer","description":"Gates, each takes 4 ft of fence length and 1 extra post, default 0"},"heightFt":{"type":"number","description":"Fence height in feet, default 6"},"lengthFt":{"type":"number","description":"Total fence length in feet"},"wastePct":{"type":"number","description":"Picket waste, default 5"},"picketGapIn":{"type":"number","description":"Gap between pickets in inches, default 0.5 (0 for privacy)"},"picketWidthIn":{"type":"number","description":"Actual picket width in inches, default 5.5"},"postSpacingFt":{"type":"number","description":"Post spacing in feet, default 8"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"gates":{"type":["null","number"]},"posts":{"type":["null","number"]},"rails":{"type":["null","number"]},"source":{"type":["null","string"]},"pickets":{"type":["null","number"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"heightFt":{"type":["null","number"]},"sections":{"type":["null","number"]},"disclaimer":{"type":["null","string"]},"fenceRunFt":{"type":["null","number"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"railLinearFt":{"type":["null","number"]},"postSpacingFt":{"type":["null","number"]},"picketsWithWaste":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_p1914HwpJ-hV1pv1mfuAJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates the number of posts, rails, and pickets needed for a straight fence given length, post spacing, picket width, and gap.","exampleAgentPrompt":"I need to build a straight fence that's 200 feet long — can you figure out how many posts, rails, and pickets I'll need, using 8-foot post spacing, 5.5-inch wide pickets, a 0.5-inch gap between them, and a 6-foot height? I've also got 2 gates.","exampleUseCases":[{"title":"Backyard privacy fence estimate","prompt":"I'm putting up a 6-foot privacy fence around my backyard — it's 120 feet long total with one gate. Using standard 5.5-inch pickets with no gap between them and 8-foot post spacing, how many posts, rails, and pickets do I need to buy?"},{"title":"Hardware store run for DIY fence","prompt":"Before I head to the hardware store, can you tell me how many posts, rails, and pickets I need for a 75-foot fence? I want 4-foot post spacing, 3.5-inch pickets with a 0.25-inch gap, and the fence will be 4 feet tall."},{"title":"Fencing estimate with gate allowance","prompt":"I'm planning a 300-foot fence with 3 gates and standard 8-foot post spacing. Pickets are 5.5 inches wide with a 0.5-inch gap and the fence is 6 feet tall — what's my total materials count, including a 5% waste buffer for pickets?"}],"resultDescription":"Returns the number of posts, rails, and pickets needed, along with picket count adjusted for waste, number of fence sections, total rail linear footage, the effective fence run length after accounting for gates, and a plain-language summary. May include a disclaimer about local building codes.","failureModes":["Missing required lengthFt parameter returns an error","Unrealistic input combinations (e.g. post spacing larger than fence length) may yield unexpected counts","Very large waste percentages or zero picket width cause nonsensical outputs","Non-positive fence length returns a validation error"],"whenToPreferThis":"Choose this endpoint when you need a fast, deterministic calculation of fence materials (posts, rails, pickets) for a straight fence run. It is purpose-built for residential and light commercial fencing estimation and handles gates, waste factors, and varying picket dimensions natively. Prefer it over general-purpose calculators or manual spreadsheet math when preparing a materials list or hardware store order.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:08:19.141Z","isFirstParty":false,"canonicalSlug":"fence-materials-calculator-1e7b7875"}