A leak does not necessarily mean the roof is bad. Most leaks occur in the flashing around any protrusion through the roof, like chimneys and vents. Consequently, a leak could simply be a result of old and cracked tar, or that the flashing was improperly installed.
When buying an investment property, or budgeting for repairs, a prudent investor needs to be able to estimate the life expectancy of an existing roof. A cursory look is not adequate because a shingle roof can be almost worn out, but still look good from the ground.
In most parts of the country, the average composition roof should last between 15 and 20 years. After that, depending on pitch and whether it faces north or south, it will begin to leak.
The first sign of a composition roof going bad is when the shingles become brittle. New shingles are pliable, but stiffen as they age. You can test by picking up a corner of a shingle. If it breaks, the shingles, are old. Give the roof three to five more years of service at the most.
With about two years left, you will see horizontal cracking on some shingles. The more cracking you see, the shorter the time left on the roof.
A final stage is the curling of the corners of the roof. That is something you can see from the ground. When you see it, expect to replace the roof within the year or fix water damage inside the structure.
When a roof has just about exhausted its usefulness, it will lose its granular coating. You'll find it washed into the gutters and there may be evidence below the downspouts.
Eventually, the roof will start to lose shingles. At that point there is zero life left in the roof. But just about anybody could spot a roof like that.
The price of a new roof varies depending on the type of material used and how many layers are on the roof already. Local building codes vary, but a rule of thumb is that, if there are already two layers on the roof, you'll want to do a tear off and start from the bottom. That could also entail some re-sheeting which adds considerably to the cost.
The cost of composition roof replacement might be $50 to $80 (depending upon location) a square (10 X 10) for a new layer of shingles and about double that for a tear off. Our average cost of a new roof on a single family rental in the late 90s has been about $2,800. The costs of replacing roofs of other materials (e.g., various types of tile or wood shake) will usually be significantly higher.
The need for a new roof in a few years should not necessarily eliminate a property for consideration for purchase. It makes sense to look at all the financial aspects. If it looks as if it will turn a good profit and/or provide a good income in spite of needing a new roof, then the cost of a new roof might not matter.