Depending on what kind of magnet it is, the life of a permanent magnet is endless, while the life of a coil magnet is only when it is energized.
Factor1: temperature. Depending on the type of magnet (for example, ferrite magnet, neodymium iron boron magnet, bonding neodymium iron boron, alnico, cobalt, iron chromium cobalt, injection-molded ferrite, etc.) and types of materials, all of which have corresponding temperature limits. Generally speaking, during the application, there will be no demagnetization if the temperature is lower than the limit of the magnet. (For example, the maximum temperature of the brushless outer-rotating motor is 80-100 ℃. In the case of ensuring that the demagnetization will not exceed 5%, the magnet material of 120 ℃ is generally used. Of course, this is for the material of the neodymium iron boron magnet.) So the non-demagnetization and lifetime of the magnet depend on the temperature and the selection of the magnet's temperature-resistant material.
Factor2: the existence of an alternating magnetic field. Anyone who learns something about magnets knows that magnets can be divided into N, S poles or multiple poles. If there is another magnetic field around the magnet, it will offset a part of the magnet's magnetic force. This is why people say that some magnets demagnetize within the range of operating temperature.
Factor3: mechanical vibration. This is related to the assembly process. The magnet rubs against the product during the assembly process. Because the material of the magnet is fragile, the body wears and the size becomes smaller, so the magnet will gradually weaken.