The aim was to investigate the cohort trends of the experienced social connectedness in secondary school students between 2017 and 2021 and whether these trends vary by gender, school level and sociodemographic background. We used nationally representative Finnish data of 450,864 students in lower and upper secondary education. Social connectedness was measured by number of close friends, feelings of loneliness and sense of belonging at school. Adjusted regression analyses included year, gender, school level and sociodemographic factors (parental education, immigrant status of the student and urban-rural area of the school). The results showed that social connectedness declined from 2017 to 2021: 11% decline in having 3+ close friends, 15% increase in loneliness and 8% decline in belonging at school. The decline was especially large in girls and upper secondary school. Although some socio-demographically disadvantaged groups showed lower levels of social connectedness, there were differences by gender, school level and year. Many differences diminished because the more advantaged groups declined faster, i.e. moved towards the less advantaged groups. Declining social connectedness in young people is a worrying trend that requires a public health focus on the whole cohort while accommodating the variation by the individual and environmental context.