I have no rule for it. In some cases, I just suddenly discover that a certain item feels wrong, perhaps because of a bad fit, an unpleasant fabric or an unflattering shade of colour, or because I realize that this item doesn't harmoinize with my style. Then I let it go either immediately or after a few days.
In other cases, when a beloved item starts showing (too much) wear or looking old, I may decide to keep it and wear it till the end of the season, after which I will let it go. However, within the same period, I will probably look for a replacement, or at least make a note to myself about the item that I will need for the next actual season.