Eventually, all roofs wear out and need to be replaced. You don’t want to do it too soon, because you’ll waste money. But you also don’t want to wait too long, because then you’ll end up with leaks and expensive water damage. To get the timing right, you need to know how to assess the overall condition of your roof and identify early signs of roof failure.

The national average for a new asphalt shingle roof is about $21,500, according to Remodeling’s 2010-11 Cost vs. Value Report, of which you’ll recoup $12,800 at resale (59.5%). For high-end materials, such as standing-seam metal, the cost jumps to as much as $38,000.

If most of your roof is still in good shape, a spot repair makes sense. But if there are signs the roof is wearing out, or if it is more than 20 years old, replacing it may be the smarter choice.

Be alert to early signs of a roof leak

If you check the condition of your roof at least once a year, you should be able to plan in advance for necessary repairs. Early signs of trouble include dark areas on ceilings, peeling paint on the underside of roof overhangs, damp spots alongside fireplaces, and water stains on pipes venting the water heater or furnace.

From the outside, you can assess your roof’s health by viewing it through binoculars. Warning signs include cracked caulk or rust spots on flashing; shingles that are buckling, curling, or blistering; and worn areas around chimneys, pipes, and skylights. If you find piles of grit from asphalt roof tiles in the gutters, that’s a bad sign, since the granules shield the roof from the sun’s damaging ultraviolet rays. Black algae stains are just cosmetic, but masses of moss and lichen could signal roofing that’s decayed underneath.

If you’re inspecting on your own and find worrisome signs, especially if the roof is old or there has been a storm with heavy wind or hail, get a professional assessment. Some roofing companies do this free; specialized roof inspectors, like those who work through the National Roof Certification and Inspection Association, charge about $175.

When repairs make sense

You can usually repair a leak in a roof that is otherwise sound. The cost might range from $10 if you just need to squirt some roofing mastic into a gap alongside chimney flashing to $1,000 to fix a leak in a roof valley. If something sudden and unforeseen, such as a wind storm, causes a leak to appear, yourhomeowner’s insurance will probably cover the repairs. But you’re still responsible for limiting the damage, so put out buckets and try to get a local roofer to spread a tarp while you arrange for repairs. Insurance may not cover problems that stem from a worn-out roof or lack of maintenance.

The cost of re-roofing

Stripping off old roofing and starting over typically costs about $3 a square foot for basic composition shingles. You may be able to leave an existing single layer and add a second layer on top of it for about $2 a square foot. If you plan to stay in the house for only a few years, this might seem like a smart way to save. But unless you’re so pressed for cash that your only other option is to risk leaks, it’s false economy. The second layer won’t last as long—only about 15 years rather than the standard 20—and you won’t get new flashing or underlayment or the opportunity to upgrade to features that make a roof stronger. Plus, when you go to sell, your re-covered roof will look a little lumpy, and potential buyers may interpret the two layers as a sign that other home improvements were also done on the cheap.

Make sure to factor in hidden costs

When you evaluate bids, don’t just look at the total. A bare-bones estimate might include a single layer of 15-pound building paper under the roofing, while a better but more expensive bid includes 30-pound paper plus self-stick rubbery material along eaves to protect against damage from ice dams. Bids might also differ in whether they include the cost of disposing of the old roofing, on hourly rates for structural repairs, and on costs related to gutters.

Once you settle on a contractor, check to make sure the company is licensed and insured. Also discuss how the crew will minimize damage to landscaping, and who will pay for any that occurs. Schedule the roof work during dry weather, if possible, so your lawn doesn’t take as much of a beating. You’ll sleep better, too, if you’re not worrying about rain coming in when the roof is half-done.