How long your roof will last is completely dependent upon what materials it was made from, how often it has been inspected and repaired, how well it was installed in the first place and how old it is. Depending on what the material is, you can expect your roof to last anywhere from fifteen to one hundred years, with asphalt shingles lasting the shortest amount of time and slate tending to last the longest.
If you live in an area with harsh weather that has caused the need for many repairs, your roof may need to be replaced more often than the average, again depending on the materials. If you have been diligent enough to have your roof maintained and inspected on a regular basis, you can expect to have your roof over your head for longer than the average, since problems are usually caught earlier than later. If you relied on a qualified roofing professional to install your roof in the first place, it will most likely last many more years than if it was installed by a general handyman.
Finally, newer roofs are lasting longer than older roofs simply because of the improved materials that are now used. Having your roof inspected is a great way to find out how many years are left in your roof!