Do you need to replace your roof to sell your house?

New roofs are often advertised in house flyers and online, but what should you do if you have an old roof? Is it worth the investment to replace it before you sell?

First, consider the cost. That varies widely depending on size and condition of the roof, where the house is, what materials you're using, and who would do the work. Angie's List pegs the price at $4,900 to $14,100 for a typical replacement. Fancy jobs, like a slate roof on a large home with a lot of pitch, can easily hit $100,000 or more.

Then, consider your market. If you're in a hot spot, buyers are going to be more likely to look the other way to get their hands on your property. Buyers in cooler markets might have more of an upper hand in that deal, as long as the property passes muster -- that is, the roof doesn't leak.

And the answer may well vary depending on whether you're selling the home as an investment or a primary residence.

To get some expert opinions, Millionacres asked three veteran real estate agents and investors -- from New York, St. Louis, and Los Angeles -- what they recommend to their clients. Here, from east to west, is what they had to say.

Gerard Splendore is a broker with Warburg Realty Partnership in New York City with about 20 years of experience in Brooklyn and the Bronx as an agent, landlord, co-op shareholder, and townhouse owner. He says:

"While a roof is one of the most important aspects of a house -- along with mechanical systems, flooding and floodplain issues, vermin, asbestos, and radon gas -- replacing your roof prior to selling only removes one obstacle to a signed contract. It's not a requirement to replace a roof prior to listing or selling any more than it is a requirement to replace windows or appliances.

"When we purchased our limestone bow-front house in Bay Ridge, Brooklyn, the seller tactfully told us the roof needed replacing. Please note, he did not mention the antiquated wiring, the flooding basement, nor the backyard drainage issues, but at least we felt he was honest about the roof.

"We had the local roofer supply us an estimate, which the seller was only too happy to deduct from the price of the sale. After we moved in, we had the roof replaced by the roofer who it turns out had put on the original roof and we felt we had been treated fairly in that aspect of the purchase.

“In our first winter in the house, the heating system went kaput, despite our inspector assuring us it would last at least five more years. Moral of the story: always expect that there will be a hidden cost of some kind when purchasing."

Chris Gold of Chris Buys Homes in St. Louis is a real estate investor and homebuyer. He says:

"No, you don't need to replace your roof to sell your house -- but it will be a negative for potential buyers and could decrease the overall value of your home by more than the price it would cost to replace the roof.

"On the other hand, promoting a 'brand-new roof' in the listing of your house can be a major positive for potential buyers. Realtors love leaning on something important like that when talking about a property they're selling and, when they need to explain the higher listing price, having something like this can be huge.

"My advice to someone selling their home that needs a new roof: Replace it (unless you absolutely cannot) and you will see the benefits all throughout the selling process."

Yawar Charlie is a regular on CNBC's "Listing Impossible" and director of the Estates Division at Aaron Kirman Group, Compass in Los Angeles. He says:

"My opinion for most sellers is that instead of a roof replacement, they should hire an inspector and check to see if there are areas of the roof that they can simply repair to ensure there are no active leaks or missing shingles, and then fix minor areas of deterioration.

“When the buyer comes through with their home inspector and the roof inspector, they will see that the roof has been maintained but potentially may need to be replaced soon. That gives you a little better leverage when negotiating any request for repair that comes your way.

"I would never recommend that a seller fully replace the roof simply to put it up for sale, because I don't think there is a significant return in doing that. More often than not to replace a roof costs about $20,000, give or take, depending on the area you live in.

"Better to offer that as a credit during the request for repair and be able to negotiate that amount rather than spend that money up front and not see a return on it."

Every situation is different, for both the seller and the buyer, and the advice they get may vary from agent to agent. Opinions from inspectors could well vary, too. So as a seller, the best advice about whether to replace the roof probably is to weigh how much it will cost against how much you'll make in the sale with or without it. The choice, ultimately, is up to you.