Customers often ask me about the life expectancy of a given plumbing fixture. The truth is that there is no set expiration date for plumbing parts or fixtures. The best I can do is to give an average based on what I have personally come across.
For some things the parts may go bad, but the fixture is still functional so it makes more sense to repair than to replace. For example shower valves can be repaired and will often end up just like new.
Then there are instances when it isn't clear whether a repair or replacement is best. A problematic toilet is one such case. You can use a guide to determine the cause of the problem and then consider when to replace a toilet instead of repairing it.
Another thing to consider is the overall value of the plumbing fixture. It isn't really worth it to put money into rebuilding a low end fixture that could end up requiring constant maintenance when it can be replaced for a better one for just a little more money.
So, the answer is that there is no definite answer. It is just a case by case judgment call. There are so many factors involved that you can't really predict how long things will last.