If your considering replacing your carpet because it looks to dirty to save, consider having it professionally cleaned. You might be surprised by how much a professional carpet cleaning can improve the look and feel of your carpet. Yes, not all the stains and worn areas will be removed but I have cleaned a lot of carpets for home owners in Tampa FL who are considering getting rid of their carpet. Once they have their carpets cleaned they decide to keep them for another year or two. Many are surprised how nice their carpet looks once it has been cleaned professionally.
Over the years carpet mills have developed better carpets that last a lot longer. Most carpets have a lifespan of 5 - 10 years. However, I have cleaned 20 and 30 year old carpets that could last another 10 before they're worn out. Most carpet mills now offer lifetime warranties. This means that carpets today could last indefinitely if they are taken care of. The carpet in my Tampa FL home is a berber carpet that is 22 years old but it has received regular maintenance cleanings during that time, so it still has several years left in it.
Before getting rid of your old carpet consider getting it cleaned to see if it has more life to it. In most cases your carpet will ugly out before it will wear out. A quality carpet cleaning might get rid of the ugly and allow you to keep your carpet for years to come.