Carpet Lifespan isn't a cut and dry number. There are several factors that can effect how long your carpet lasts, whether it's where you live, who you live with, or what you do in your home. But even carpet under the most trying of conditions can last many years, with the right carpet maintenance.
In the average household of about 2-4 residents, carpet lifespan is usually about 3-5 years. It is by this point that most carpet fibers become old and frayed. Stains will also have sunk in, turning what started out as a pure white carpet into something graying and dull. This is why apartment owners and most homeowners change out their carpets every 3-5 years, due to discomfort and degrading visual quality of the current carpet.
If there are children or pets living in the household with the carpet, this number can go even lower. Children and animals both are known for the stains they cause, and animals especially can fray and tear up the carpet they take residence on with their claws. So if you're living in a home with either children or animals, then proper carpet care is even more essential.
Proper carpet care changes everything though. As mentioned, with proper carpet maintenance, many years can be added to the average carpet lifespan, and some households can even keep their carpet for a decade before replacing their carpet flooring. Vacuuming is a necessity, with low traffic areas like a bathroom or closet needing to be vacuumed every 2-3 days; for the greatest longevity for your carpets, high traffic areas like hallways or living rooms should be vacuumed daily.
For treatment of stains, the rule of thumb is the faster the better. Most carpets nowadays have been treated to resist stains better, and show them more clearly so as to make them easier to spot and clean up. However, even with new stain treatments you have to work fast, because the longer a stain sits, the more permanent damage is caused to your carpet. Dab the stain with a white cloth or towel, and then look up proper treatment for the specific stain--Remember, each are different!
Carpets life can last as little or as long as you want, and as long as you treat your carpet well and keep it clean, it can be there for a long time.