Decks & Fences
Fence Calculator
Enter one straight length or list each section in feet or metres to get posts and panels with section-by-section rounding, shared corners and an optional GST/HST-aware cost estimate.
Formula tested · Local units · No sign-up
Project inputs
Enter measurements
Use your preferred units. Results update automatically.
Show the calculation methodFormula, conversions, rounding, and assumptions+
Panel bays = fence length ÷ post spacing, rounded up. Canadian wood fences are commonly built in 8 ft bays to suit 8 ft rails and 4 × 4 posts — the calculator accepts feet or metres and converts internally.
Posts = total bays + disconnected fence lines. An L-shaped fence whose two sections meet at one corner is one connected line, so the corner post is shared.
Each gate occupies one bay on posts already counted, so panels to buy = bays − gates.
Real-world example
Worked example: L-shaped yard, 48 ft + 32 ft, 8 ft spacing, one connected line
- Enter the straight sections as 48, 32. Their bay counts are ceil(48 ÷ 8) + ceil(32 ÷ 8) = 6 + 4 = 10.
- Posts: 10 bays + 1 connected fence line = 11 posts; the two sections share the corner post.
- Panels to buy: 10 bays − 0 gates = 10 panels.
Buy 11 posts and 10 panels. Enter your supplier's post and panel prices and your province's combined GST/HST or GST+PST rate for a cost estimate.
Before you start
How to measure
- Enter each straight boundary section separately in the comma-separated list; the calculator rounds each section before adding the bay counts.
- Use one disconnected line for sections that join at shared corners. Increase the count only when fence lines do not share an end or corner post.
- Measure in feet or metres — the calculator converts either way; just make sure the length and spacing units match what you actually measured.
- Count each gate as one bay; wide driveway gates may need their own engineered posts outside this estimate.
Local guidance
Notes for Canada
- Frost depth drives Canadian post holes: posts set shallower than the local frost depth heave and tilt with freeze–thaw cycles. Frost depth varies widely across the country — ask your municipal building department for the local figure and dig below it.
- Confirm the property line before digging — a real property report or survey beats the existing fence line, which may itself be misplaced.
- Contact your local utility-location service before digging (Click Before You Dig — each province runs a one-call service that marks buried lines for free).
- Check municipal bylaws for height limits and pool-fence rules; some municipalities require permits for fences over a set height.
- Sales tax is 5% federal GST plus provincial tax, or a combined HST, depending on the province — enter your combined rate.
Quick reference
Common Canadian fence planning values
| Item | Common value |
|---|---|
| Post spacing (wood privacy fence) | 8 ft (matches 8 ft rails) |
| Post size | 4 × 4 in pressure-treated |
| Post embedment | Below local frost depth (ask your municipality) |
| Panel height | 5–6 ft where bylaws allow |
Planning values only — local frost depth, bylaws and your materials govern.
Good to know
Common mistakes to avoid
- Setting posts above the frost line — they heave within a few winters.
- Digging without a Click Before You Dig locate — buried gas and telecom lines run through many suburban yards.
- Entering only the pooled perimeter of an L-shaped fence — partial bays cannot turn the corner, so list the straight sections instead.
- Treating joined sections as disconnected lines and buying a duplicate corner post.
- Relying on the old fence as the boundary line instead of a survey.
- Leaving concrete, screws and gate hardware out of the budget — this estimate covers posts and panels only.
Need help?
Frequently asked questions
How deep should my fence posts go?
Below the local frost depth, which varies widely across Canada — your municipal building department publishes the figure used locally. This calculator counts posts; it does not size holes or estimate concrete (see the post-hole concrete calculator).
How many posts for 60 ft of fence at 6 ft spacing?
60 ÷ 6 = 10 bays exactly, so a single run needs 10 + 1 = 11 posts and 10 panels if there are no gates.
Who do I call before digging?
Use your province's one-call service — collectively promoted as Click Before You Dig — which arranges free marking of buried utilities. Request locates several business days before you plan to dig.
Keep planning
Related calculators
Transparency
About this calculator
- Written by:
- BuildMeasure Editorial Team
- Technically reviewed by:
- Pending independent technical reviewer (formula unit-tested; see methodology)
- Last reviewed:
- 2026-07-20
- Formula version:
- 1.2.0
- Region reviewed for:
- Canada
- Spotted an error?
- Report a correction
Methodology
- For one straight section, panel bays = section length ÷ post spacing, rounded UP. For a fence with corners, enter every straight-section length: the calculator rounds each section separately before adding its bays, so pooled partial bays cannot cause an under-order. Lengths are converted to metres internally.
- Posts = total bays + number of disconnected fence lines. Straight sections in one connected line share their corner posts; each disconnected line needs one additional end post. Exact multiples are not bumped up an extra bay.
- Each gate is assumed to occupy one bay and hang on posts already counted, so panels to buy = bays − gates. Gates and gate hardware are never costed by this tool.
- The cost estimate multiplies the post and panel counts by the prices you enter, then applies the tax rate you enter. No prices are built in.
- When prices are entered, material cost per foot or metre = the tax-inclusive calculated material total ÷ the full measured fence length in the region's default length unit. It is a comparison rate, not a contractor quote, and excludes gates, concrete, fixings, delivery and labour.
- The formula is covered by automated unit tests, including hand-calculated worked examples, and is versioned (see formula version on this page).
Sources & standards
- Utility location: Provincial one-call services (Click Before You Dig) provide free utility locates across Canada.
- Unit definitions: 1 ft = 0.3048 m (exact); calculations run in metres internally.
This tool provides a material estimate for planning purposes only. It is not a quotation, and it does not check boundary positions, wind loading, post embedment or local rules. Confirm the boundary line, any permit or approval requirements, and underground services before digging, and confirm quantities with your supplier before ordering.