According to the Diagnostic Manual of Mental Disorders:
recovery from a depressive episode begins at 3 months from the start of treatment in 2 out of 5 people, and at 1 year for most.
So, according to these statistics, treatment for depression it lasts as long as a cast for a fracture at best, or treatment for tuberculosis at worst. But the course of depression is highly variable. There are no mathematical formulae or algorithms with which we can calculate how long depression lasts for each particular case. Like all mental illnesses, depression manifests itself differently in different people. So these data are for guidance only. They are not a guarantee. Some people will experience periods of remission (two or more months without symptoms) very rarely or not at all, while others will enjoy years with no or very few symptoms.
The term “depression” can also refer to major depressive episodes. But it can also refer to dysthymia, or persistent depressive disorder. In this case we are talking about a chronic condition. As its name indicates, depressive symptoms have been present for at least 2 years and will persist throughout life. However, their intensity tends to be lower than in major depression. With specialist help, they can be kept under control.