A fence in good condition helps a house sell, mostly by removing an objection rather than by adding a premium. A leaning, rotten or clearly DIY fence does measurable harm, because a buyer prices the replacement into their offer.
Buyers rarely pay extra for a good fence. They do deduct for a bad one, and they deduct more than it would have cost you to fix, because they are pricing in hassle and unknowns as well as materials. The practical value of a sound fence is that nobody negotiates against it.
Repairing a sound fence is usually the better return than replacing it. Reset the leaning posts, replace the failed pickets, clean and stain it. That reads as maintained. A brand new fence is unlikely to return its full cost in the sale price, though it will make the house easier to sell.
Then it is not really a resale question. Build the fence you actually want, set deep enough that you are not doing this again in six years, and treat the resale benefit as incidental.
If it is leaning, rotten or failing, yes, because buyers deduct more than the repair costs. If it is merely tired, cleaning and staining usually gets most of the benefit for a fraction of the outlay.
Neither adds a reliable premium. What matters is condition and whether it suits the house and the street. An iron fence on a street of cedar privacy fences is not worth more for being iron.
An appraiser is looking at the whole property against comparable sales. A fence in good order supports the picture; it is not a line item that adds a set sum.
We walk the property, give you a straight price, and show you how it is built underneath.