This is the replication and supplementary file for "Shifting spousal age gaps in Ghana and Kenya: Does Education Matter?" by Afua Durowaa-Boateng and Endale Kebede All codes and analyses were conducted using R Studio (R version 4.4.2). The supplementary material contains one R file that reads, cleans and runs the code. The files used in the analysis are the couple recode(CR) files for Ghana and Kenya. The `.dta` files can be obtained from https://dhsprogram.com/. These original files are publicly available but require account registration. The R code produces all figures and tables in the article.