BACKGROUND: Recent studies have identified a correlation between inflammation and depression. This study aims to explore the correlation between the red blood cell distribution width (RDW) to albumin ratio (RAR), a practical measure for assessing inflammation, and depression in the general population. METHODS: In this population-based cross-sectional study, data from 28932 adults aged≥18 years old in the NHANES during the period of 1999-2018 were analyzed. To examine the correlation between RAR and depression, multivariate logistic regression analyses, subgroup analyses, restricted cubic spline analyses, and interaction tests were conducted. Furthermore, a mediation analysis was performed to elucidate the role of atherogenic index of plasma (AIP) in mediating the effect of RAR on depression. RESULTS: Multivariate logistic regression analyses and restricted cubic splines analysis indicated that RAR can exhibit a linearly correlation with depression (OR = 1.335
95% CI: 1.222, 1.458). Subjects in RAR Q2, Q3, Q4 groups had an increased risk on depression as 22.8%, 22.9% and 51.9% than those in the Q1 group. This positive correlation was more pronounced in those with history of cancers. The ROC analysis indicated that the area under the curve (AUC) for RAR (AUC=0.593) was significantly greater than that for RDW and albumin individually. Mediation analysis indicated that AIP mediated 7.8% of the correlation of RAR with depression. CONCLUSIONS: The findings of this study indicated a significant linear positive correlation between RAR and the prevalence of depression, with AIP serving as a mediator.