A well-built fence can confine your dog/pet llama/children, keep other critters out, define your property, provide privacy and security, add visual appeal to a landscaping plan, and, yes, keep your neighbors at bay.

But good fences can cost a bundle, whether you want one made of wood, stone, or something else. And while you can try to erect one yourself, most homeowners choose to hire fence builders. We turned up some companies in the area that were rated highly by customers, but we also found others that were rated shockingly low. Plus, the prices our undercover shoppers collected varied tremendously from builder to builder for the same work.

Become a Smarter Consumer Get free, expert advice delivered to your inbox every Wednesday when you sign up for the Weekly Checklist newsletter.

Plotting Your Boundaries

Begin by determining what you want: fence type, materials, finish, height, spacing and width of slats, and post size. Also decide whether you want extras such as latticework or an electronic gate. Most fence builders provide catalogs you can look through.

Some questions to ask:

What’s the purpose of the fence? To keep pets in? To safeguard children? For privacy or security? Is it for a windbreak, for sound insulation, to block light? Different types of fencing have different qualities: A chain-link fence is functional and cheap, but unattractive. A privacy fence may provide some sound buffering but blocks sunlight.

How much money are you willing to spend? You can pay roughly $25 to $35 per running foot for chain-link, $35 to $50 per foot for vinyl, $40 to $65 per foot for most types of wood privacy fencing, and more than $40 per foot for most decorative metal fencing options.

How long do you want your fence to last? Are you willing to put effort into its upkeep? Brick and stone walls are nearly indestructible, vinyl materials need no maintenance, while wooden picket fences need periodic repairs. A decorative metal fence may have to be repainted often to prevent rust. Living hedges require attention, just as gardens do. You’ll pay more for cedar or redwood than for pressure-treated or untreated lumber, but they may last longer and require less care.

Does your design need to blend in with its surroundings, including other structures?

Are there trees or shrubs in the path of the future fence that you don’t want to cut down? Fence contractors can suggest options to accommodate such obstacles.

How high does the fence need to be?

Where will the gates be placed? Keep in mind the location of your garage, utility meters, and spots for trash containers.

Do you want a deck, tool shed, gazebo, or other features built to match the fencing design? Will you be adding on to your home, digging a swimming pool, or doing future work that will require removing a section of fence, either for the structure itself or to allow heavy-equipment access?

If you are sharing the costs of the fencing job with a neighbor, what is a fair way to share, and will you need help with drawing up the contract?

Make sure the company you choose knows about restrictions that affect your property, including building codes, zoning ordinances, and neighborhood covenants. Every community has its own rules. For example, some require posts to be sunk below a certain level, or that fencing be located within a set distance of property lines and set back a certain distance from streets or sidewalks. Also, some communities allow only certain types of fencing and limit the height of fences and walls. Almost all communities mandate some type of minimum fencing around swimming pools.

Though you typically don’t need your neighbors’ approval to build a fence, it’s a good idea to talk with them before you put one up. You may even find they’re willing to help pay for it in exchange for a say on design and materials.

In Search of a Good Barrier Builder

Our Ratings Tables report on area fence building companies for which we collected 10 or more customer ratings. The ratings come from our surveys of area consumers (primarily Consumers’ Checkbook subscribers, but we also invited a sample of other area homeowners to participate). We asked survey recipients to rate companies they had used “inferior,” “adequate,” or “superior” for several questions, including: “doing work properly on the first try,” “promptness,” “advice on service options and costs,” and “overall quality.” Our Ratings Tables report the percent of surveyed customers who rated each company “superior” (as opposed to “inferior” or “adequate”) on each question. The tables also report the percent of each company’s surveyed customers who rated it “adequate” or “superior” (as opposed to “inferior”) for “overall quality.” Click here for more information on our customer survey and other data.

As you can see, some companies received high accolades, but some others received poor ratings. Based on the comments we received from raters, most of the negative ratings related to poor workmanship, lousy customer service and communication, and taking too long to complete the work.

In addition to ratings from customers, our Ratings Tables show counts of complaints we gathered from the Better Business Bureau (BBB) for a recent three-year period, the number of complaints on file with the Consumer Protection Division of the Illinois Office of the Attorney General for a recent two-year period, and complaint rates relative to the volume of work companies do. Click here for more information on reported complaint counts and rates.

When contracting with a fence building company, get everything in writing: exact specifications for what is to be built; a drawing specifying where it will be built; a description of the materials to be used; and a fixed price. To maintain your leverage for ensuring work is completed as agreed upon and satisfactorily, ask for a payment schedule that allows you to withhold as much payment as possible until the work is complete—a 10 percent deposit is reasonable.

Also, take proper steps to identify and avoid underground utility lines. Before any digging begins, get the proper authorities to locate and mark the location of underground lines. If a fencing company tells you this step is unnecessary, call 811 to confirm.

How to Get a Good Price

Our Ratings Tables report Checkbook’s price comparison score for each company. The scores are based on quotes our undercover shoppers obtained from the companies for five different types of fencing work. Adjusted so that the average for all surveyed companies equals $100, the scores indicate how each company’s average price compared to the average prices for all companies quoting on the same jobs. Thus a score of $110 means a company’s prices averaged 10 percent above the all-company average.

Although we obtained firm quotes for specific, straightforward jobs, you probably want companies to come to your home to provide estimates. Our undercover shoppers collected quotes for yards that were flat, had no existing fences, and had no vegetation or potential obstructions in the path of a fence. Our prices were also per-running-foot, not including a gate or other specialized work. Chances are your job will have more special features.

The key to getting a good price is to get several bids. We discovered very large company-to-company price differences for the jobs we shopped, with some companies charging more than twice as much as others for the same work. The time you spend getting two or three bids is likely to pay off generously. Your second bid may be higher than the first, but it could just as likely be lower.

You can also save a lot, of course, by splitting the cost of a fencing job with neighbors.