Carpet unfortunately does have a limited life. The better you take care of it the longer it will live but it will still eventually need to be replaced. If you think your carpet is to that point you should read this article for some alternatives to replacing carpet. They could save you quite a bit of money.
The first alternative and the most obvious is cleaning. People often throw away carpet that can be restored by a good carpet cleaner. If in doubt, why not have a carpet cleaner come out and clean one room for you. Most will do this for a small minimum charge. If you do not like the results they do not have to clean any more but if it cleans up well you can then clean the entire house. Give it a try, the results might surprise you.
Another possibility is carpet dying. If the carpet is badly stained but otherwise in good condition you might be able to simply dye it a darker color for a fraction of the price of new carpet. Call a carpet cleaner who specializes in this process for more information and to see if your carpet is a candidate for dying.
The last option I will give you is to place a rug on the carpet. This will work if only part of the carpet is damaged or severely stained. A rug strategically placed can do wonder for your carpet. Give it a try, it might work.
Hopefully one of these ideas will work for you. With carpet being as expensive as it is you should try many things before deciding to replace it. God luck with whatever you decide to do.