Cedar is generally the better fencing wood when durability, natural rot resistance, and dimensional stability matter most; pine is the better choice when upfront cost and paintability dominate and you can accept more maintenance or a shorter service life. That answer assumes the comparison is between naturally durable western red cedar and a typical untreated or pressure-treated pine fence in a North American residential setting. The question is genuinely ambiguous, though, because "pine" covers many species and treatments—untreated eastern white pine behaves very differently from pressure-treated southern yellow pine—and "cedar" covers western red cedar, northern white cedar, eastern red cedar (technically a juniper), and others. The material choice also depends on whether the fence will be left natural, stained, or painted, and on local climate, since a humid coastal climate stresses rot resistance far more than a dry high-desert one.

Why Cedar Usually Wins on Durability

The core reason cedar outperforms pine in fencing is natural decay resistance. Western red cedar heartwood contains extractives—thujaplicins and related compounds—that suppress fungal decay and some insect attack. This is why untreated western red cedar can serve many years in contact with soil and weather, while untreated pine of most species rots comparatively quickly when exposed to moisture. In practical terms, an untreated pine fence in a wet climate may need replacement or major repair within a decade or less, whereas a western red cedar fence is commonly expected to last considerably longer, often two to three times as long depending on grade, climate, and detailing. These are general expectations, not guarantees, because fence life depends heavily on soil contact, drainage, airflow, end-grain sealing, and whether posts are set in concrete or gravel.

Species matters enormously here. Western red cedar is the benchmark naturally durable cedar for fences. Northern white cedar (arborvitae) is also rot-resistant and common in the northeastern United States and eastern Canada, though it is softer and more prone to mechanical damage. Eastern red cedar, despite the name, is a juniper and offers good natural durability but is often sold in smaller, knotty dimensions. If a supplier says "cedar" without naming the species, the durability claim is underspecified—this is the single most important ambiguity in the question.

Pressure-treated pine changes the comparison substantially. Modern residential pressure-treated lumber in the United States is typically southern yellow pine treated with copper-based preservatives (alkaline copper quaternary, or ACQ, and similar formulations) to resist decay and termites. A pressure-treated pine fence can last a long time—often comparable to or exceeding untreated cedar in ground-contact applications—because the treatment, not the wood species, provides the protection. So the honest answer is not "cedar always beats pine"; it is "naturally durable cedar beats untreated pine, but treated pine is a different product with its own long service life." The trade-off is that treated pine is heavier, can be more prone to checking and warping as it dries, and its preservative system raises environmental and disposal considerations that cedar does not.

Stability, Appearance, and Workability

Cedar is generally more dimensionally stable than pine. It shrinks and swells less with moisture changes, which means fewer popped fasteners, less cupping, and fewer gaps opening between pickets over the seasons. Western red cedar is also lightweight and easy to saw, drill, and carry, which matters for a do-it-yourself fence project. Its natural color—ranging from reddish-brown heartwood to lighter sapwood—weathers to a soft silver-gray if left unfinished, a look many homeowners want and that requires no paint.

Pine is typically straight-grained and takes paint very well, often better than cedar, because its surface accepts and holds coatings evenly. If the plan is a painted fence, pine is a sensible and economical substrate. Left unpainted, pine is less visually distinctive and, if untreated, will discolor and decay faster. Untreated pine also attracts insects more readily than cedar heartwood.

Knots and grade deserve mention. Both woods are sold in grades; a "select tight knot" cedar fence looks and performs differently from a utility-grade cedar full of large knots and sapwood. Pine fence boards are often sold in grades optimized for economy. Comparing a premium cedar grade to a budget pine grade is not a fair test, and vice versa. Sapwood is the weak point in both species: cedar sapwood is far less rot-resistant than cedar heartwood, and pine sapwood is the portion most dependent on preservative treatment.

Cost and Value Over Time

Pine is almost always cheaper per board foot and per linear foot of fence than cedar, sometimes dramatically so. That lower upfront cost is the main reason pine dominates budget fence projects. But cost comparisons should account for service life and maintenance. If untreated pine needs replacement years earlier than cedar, the cedar fence can be cheaper on an annualized basis even at a higher sticker price. Pressure-treated pine muddies this calculation: it costs more than untreated pine but can approach cedar's longevity in ground contact, so the value case depends on the specific treatment, climate, and how the fence is built.

A reproducible way to think about it: divide total installed cost by expected service life in years to get an approximate annual cost. Using illustrative round numbers only—not quotes—a cedar fence installed at $6,000 with a 20-year expected life is about $300 per year; a treated pine fence at $4,000 with a 15-year life is about $267 per year; an untreated pine fence at $3,000 with an 8-year life is about $375 per year. The ranking flips depending on the assumptions, which is exactly why "which is better" has no single numeric answer without local prices and realistic lifespans. Actual prices vary by region, season, and grade and must be checked locally.

Climate and Detailing Change the Answer

In a dry climate with good airflow, even untreated pine can last a long time, narrowing cedar's advantage. In a humid, rainy, or termite-heavy climate, natural rot resistance and treatment matter far more, and untreated pine becomes a poor bet. Posts are the weak link in any fence: a cedar picket on a pine post set in soil still fails when the post rots. Many builders use pressure-treated posts regardless of picket species for exactly this reason, and some use cedar or naturally durable posts where soil contact is managed with gravel and drainage. End grain, cut ends near the ground, and the bottom rail are the places to watch in either material.

Finish also shifts the comparison. A penetrating stain or sealer on cedar preserves color and extends life; paint on pine protects it but requires scraping and repainting every few years. Neglected paint on pine can trap moisture and accelerate decay at failed spots, so paint is not maintenance-free.

Bottom Line

Choose cedar if you want natural rot resistance without relying on chemical treatment, better dimensional stability, a wood that can be left to weather gracefully, and you can pay the premium—ideally western red cedar heartwood in an appropriate grade. Choose pine if budget is the priority, you plan to paint, and you either accept a shorter untreated lifespan or specify pressure-treated pine, especially for posts and ground-contact members. The decisive unknowns are the cedar species and grade, whether the pine is treated and with what, your climate, and how the fence is detailed at the ground.