In theory, the average lifespan of a pillow is 5 years. However, depending on the type of material and its quality, this period can be shortened to 2 years or, on the contrary, extended to 10 years. In practice, you are the one who is most able to feel if your pillow has lost its swelling power and if you feel less supported in the cervical area.
To find out if you need to change your pillow, you can do a little test: Fold it in half and put a shoe on it. If it does not regain its shape, it is too old and needs to be changed. If it unfolds on its own, it's still good and just needs washing.