Here’s my totally unscientific but practical checklist. Replace your bottle if: it smells funky after washing, it has cracks or dents, the lid doesn’t seal, or the material feels weird. Also, if you dropped it from a height and heard a suspicious thud, replace it. Your taste buds will thank you.
For plastic: every 1-2 years. For stainless steel: every 5-8 years. For glass: when you smash it, which could be tomorrow. For aluminum: every 3-4 years, or when your water tastes like a garage sale.