There is a few circumstances that can affect how long the roof on your house may last for example:
Roof Slope Angles
Always go over the options and durability for the right roofing material for your home when speaking to a contractor.
Asphalt or fiberglass shingles can last from 20 to 40 years but typically warranties from the manufacturer only guarantee 15 to 25 years.
Wood shingles are treated and are rot resistant and could last up to 30 years.
Metal roofing has a longer durability and can last up to 50 years.
Roofing underlayment also effects how long roofing may last. The underlayment is water-resistant or water proof and gives an extra layer of protection. Most do not think what is under the roof of a home matters but a well ventilated attic can also effect how long a roof lasts. A well ventilated attic keeps it from getting to warm or moist which causes rot from the inside out.