Cedar Fence Calculator
Calculate cedar pickets, 2x4 rails, 4x4 posts and concrete bags for Western Red Cedar privacy fences with live material estimates.
Fence calculator
Enter your specs. Every result updates live and shows its formula.
Overview
Western Red Cedar and Northern White Cedar are naturally rot-resistant woods that resist decay without chemical pressure treatments. This calculator configures full bills of materials specifically for cedar privacy and board fences, including post spacing and board counts.
Cedar lumber shrinks and expands less than pine, but requires stainless steel or hot-dipped galvanized fasteners to prevent black tannin streak corrosion around screw heads and nails.
Assumptions
- Calculations use standard 1x6 (5.5 in actual width) or 1x4 (3.5 in actual width) cedar picket dimensions.
- Posts are spaced on 6ft or 8ft centers and embedded to standard depth based on fence height.
- Each post hole includes a 6-inch crushed gravel drainage base underneath the concrete collar.
- Fastener estimates assume hot-dipped galvanized or ceramic exterior screws.
Common mistakes
- Using electro-galvanized or standard steel fasteners that react with cedar tannins and cause permanent black streaks down pickets.
- Allowing bottom edges of cedar pickets to sit directly in soil or wet ground vegetation where moisture wicks up the end grain.
- Burying cedar posts without gravel drainage beneath the base, trapping ground moisture against the end grain.
- Omitting a 10 percent waste factor for natural wood grain defects, loose knots, and off-square cutoffs.
Fence calculation formulas
The same math the calculator runs, in plain terms. Nothing here is a black box.
-
Sections
sections = max(ceil(effective run / post spacing), 1)
-
Post count
posts = (sections + 1) along the run, minus named corner and end posts already placed, plus 2 gate posts per gate
-
Effective run
effective run = total length - sum of gate widths
-
Rail count
total rails = sections x rails per section
-
Picket count
pickets = ceil(run in inches / (picket width + gap)); total = ceil(raw x (1 + waste %))
-
Board-on-board pitch
pitch = picket width - 1 in overlap
-
Panel count
full panels = floor(run / panel width); add 1 cut panel if the remainder is over 0.01 ft; total = ceil(raw x (1 + waste %))
-
Concrete volume
per-hole = pi x (diameter / 2)^2 x depth; total = per-hole x posts; bags = ceil(total / bag yield)
-
Slope-adjusted run
slope run = effective run / cos(atan(slope % / 100)); shown alongside, counts use the flat run
-
Cost
materials = (posts x post price + rails x rail price + infill x unit price + 60 lb bags x bag price) x regional multiplier; labor = effective run x labor per ft x terrain multiplier x regional multiplier; installed total = materials + gate hardware + removal + permit + labor
Every number the calculator shows comes from these formulas applied to your inputs.
Next step
Related calculators
- Wood fence calculator Calculate posts, rails, pickets and concrete for a pressure-treated pine, cedar or redwood fence. Every formula shown, cost optional.
- Privacy fence calculator Calculate posts, rails and pickets for a solid privacy fence in any material, with a zero-gap board layout by default.
- Redwood Fence Calculator Estimate premium redwood boards, stringers, posts and concrete needed for standard or board-on-board redwood fences.
- Pressure-Treated Fence Calculator Plan pine privacy fences with accurate counts for pressure-treated pickets, ground-contact posts, rails, and concrete bags.
Related reading
In-depth guides
Buying guide
Western Red Cedar and Northern White Cedar carry natural oils and tannins that resist decay and insect damage without a chemical pressure treatment, which is the main reason cedar commands a higher price than pine for the same board. The post, rail and picket formulas behind this page are the same ones the general wood fence calculator uses for every species; this page simply defaults the material to cedar and its common board sizes, since that is the usual reason someone lands here specifically rather than on the general tool.
Cedar's tannins react with plain steel fasteners, leaving black streaks down the face of a picket, so stainless steel or hot-dipped galvanized nails and screws are worth budgeting for alongside the lumber itself. A privacy layout, the most common cedar fence style, has no gap between boards, so the picket count is just run length divided by board width before waste, the same formula this calculator applies for cedar's standard 1x6 or 1x4 dimensions.
Against the other premium species covered on this site, redwood shares cedar's natural rot resistance and similar fastener requirements at a different price point and regional availability, while pressure-treated pine relies on chemical treatment rather than natural oils and is the lower-cost option most builders compare cedar against. None of the three change the post or rail formulas; the difference is entirely in cost, expected service life, and the fastener and drainage details each species calls for.
Posts set in concrete benefit from a gravel drainage layer under the footing regardless of species, which the fence post calculator accounts for when sizing holes. Once the lumber order is set, the fence stain calculator figures out how much finish a cedar fence needs once it has dried enough to accept it. How much does a wood fence cost and how to install a wood privacy fence cover budgeting and the build sequence, and the fence materials guide and wood fence installation guide go deeper on both. The wood fence calculators hub links every other species and style.
Kiln-dried cedar is close to its final dimension and ready to stain right away, while green, unseasoned cedar needs 2 to 4 weeks of drying time outdoors, until moisture content drops below roughly 15 percent, before an oil-based stain will take properly. That distinction does not change the board, rail or post counts this calculator returns, but it does change the project timeline, since staining too early on green cedar traps moisture under the finish rather than protecting the wood.
Keeping the bottom of cedar pickets at least a couple of inches above soil or mulch, rather than letting them sit in contact with wet ground, is one of the more overlooked details on a cedar build, since cedar's natural rot resistance is strongest against airborne decay and weaker against sustained ground moisture wicking up through the end grain. A sacrificial pressure-treated rot board along the bottom of the run is a common, low-cost way to protect the cedar pickets above it without changing the picket count itself.
Cedar also varies by cut and grain orientation in ways that affect how it weathers: vertical-grain boards, cut so the growth rings run roughly perpendicular to the face, resist cupping and warping better than flat-grain boards over time, which matters more on wider pickets than on narrow ones. Where a supplier offers both, vertical-grain is usually worth the modest premium on any board wider than about 6 inches.
Climate also shapes how a cedar fence should be detailed: in consistently dry regions, cedar needs less aggressive moisture management than in humid or rainy climates, where ventilation gaps at the bottom of the fence and more frequent sealant reapplication matter more to keeping rot at bay. None of this changes the board, rail or post counts this calculator returns, but it does shape how the installation and maintenance schedule should be planned once the material order is placed.
Cedar heartwood, the reddish inner wood, carries the species' natural rot resistance, while the pale sapwood band near the bark does not, so a board with a significant sapwood streak on a structural or ground-contact piece is weaker against decay than one that is mostly heartwood, even though both are labeled the same species and grade. Checking boards for sapwood content, especially on posts, is worth the extra look when the lumber yard has mixed stock.
Regional cedar species also vary: Western Red Cedar, common in the Pacific Northwest, and Eastern White Cedar or Northern White Cedar, more common in the Northeast and Upper Midwest, differ somewhat in density and natural oil content, which affects weathering and workability more than it affects the board, rail and post counts this calculator returns for a given run length and height.
Checking a board's grade stamp or mill marking before it goes into the ground is a quick habit that catches a mismatched or mislabeled board before it becomes a structural post buried under concrete, where a mistake is far more expensive to correct.
Frequently asked questions
Why choose cedar instead of pressure-treated pine?
Cedar contains natural oils and tannins that resist insect damage and decay without added chemical preservatives, and warps significantly less than southern yellow pine during seasonal moisture swings.
What kind of nails or screws should be used on a cedar fence?
Use stainless steel (grade 304 or 316) or high-quality hot-dipped galvanized fasteners. Standard zinc or electro-galvanized nails react chemically with cedar extractives and leave dark discoloration.
How far apart should posts be on a cedar privacy fence?
Six to eight feet on center is standard. In open windy regions, six-foot post spacing prevents excessive wind pressure from flexing rails or loosening posts.
Should cedar fence pickets touch the ground?
Never let cedar pickets touch wet turf or topsoil. Leave a minimum 2-inch clearance above grade or install a sacrificial pressure-treated rot board along the bottom.
Do cedar posts rot in concrete footings?
Cedar posts set in concrete can rot if moisture is trapped. Drill holes with a 6-inch gravel base so water drains downward, and slope the top concrete surface away from the wood.
How many rails does a 6-foot cedar fence need?
A standard 6-foot privacy fence requires 3 horizontal 2x4 backer rails per section to prevent boards from cupping or twisting over time.
Does cedar require immediate staining or sealing?
Kiln-dried cedar can be stained immediately, while unseasoned green cedar should dry for 2 to 4 weeks until moisture content drops below 15 percent before applying oil-based stain.
How long does a Western Red Cedar fence typically last?
A properly maintained cedar fence with good drainage and quality stain lasts 15 to 25 years, while untreated pine posts typically fail within 10 to 15 years.