Abstract Background Data from population-based studies investigating the time trends in environmental and socio-economical factors associated with IBD is lacking. We aimed to assess time trends in environmental and socio-economical factors over 40 years of different therapeutic eras in patients with IBD from a prospective population-based inception cohort from Veszprem County, Western Hungary. Methods Patients from the incident IBD cohort were included between January 1,1977 and December 31,2020. Environmental and socio-economical factors, including an area of living, educational and type of employment, smoking status, appendectomy, and contraceptive drug use, were evaluated in three eras based on the different therapeutic strategies in IBD:cohort-A, 1977-1995 (pre-biologic/pre-immunomodulators era); cohort-B,1996-2008 (immunomodulator era); and cohort-C,2009-2020 (biological era). Results A total of 2,240 incident patients diagnosed with IBD were included [UC 61.2%, male 51.2%, the median age at diagnosis: 35 years (IQR 29-49)]. There was a significant increase in IBD incidence over time in both CD and UC1-2. A higher proportion of patients with active smoking in CD compared to UC, and the rates of smoking significantly decreased over time in CD; 60.2%, 49.9%, and 38.6% in cohorts A, B and C (p<0.001). In UC patients, the rates were lower and stable; 15.4%, 15.4%, and 14.5% in cohort A,B and C, respectively (p=0.981). The use of the contraceptive drug was more common in CD than UC, and the rates were stable; 23.7%,26.6%, and 23.7% in cohorts A, B and C (p=0.950). In UC patients, the appendectomy rates before diagnosis decreased over time; 6.4%, 5.5%, and 2.3% in cohorts A, B and C (p=0.013). No significant changes in the distribution of IBD population between geographic areas [municipal area: UC; 59.8%/64.8%/62.5% (p=0.309) vs. CD; 62.5%/62.0%/59.0% (p=0.636), in cohort A/B/C]. However, fewer percentages of IBD patients who achieved primary school as maximal education level (32.2%,21.9% and 11.7% in cohorts A,B, and C, p <0.001) as well as less physical work employment (53.4%,51.3%, and 42.3% in cohorts A,B and C, p=0.001) were observed in both UC and CD. (Reference 1.Gonczi L et al. Colitis. 2022 Sep 10:jjac132 Ref 2. Kurti Z et al. Crohns Colitis. 2022 Sep 19:jjac142) Conclusion This is one of the first long-term, prospective population-based cohorts investigating the time trends of socio-economical and environmental factors associated with IBD over 4 decades, including less primary school as maximal education level and less physical work employment. Results from this study highlight that the association between time trends of known environmental/socio-economic factors and IBD incidence is complex.