The aim of this study was to determine the diagnostic value of an ROC curve of the antepartum foramen ovale (AFO) size and the ratio of FO size to aorta (AO) size (FO/AO) for the prediction of puerperal atrial septal defect in different gestational weeks (DGWs). A total of 958 cases were divided into five groups according to number of gestational weeks. Comparisons of FO size, AO size and FO/AO were determined by variance analysis. The correlations between FO size, AO size and gestational age were determined using regression analysis and comparisons between atrial septal defect (ASD) diagnosed in DGWs and normal cardiac FO size and FO/AO were analyzed by t-test. ROC curve analysis was used for FO size and FO/AO to predict the demarcation point of puerperal ASD (pASD). The differences between FO size and AO size in the five groups at DGWs were statistically significant (P=0.000). The sizes of FO and AO increased with gestational age. The differences among pASD, normal cardiac FO size and FO/AO were statistically significant (P=0.000). FO size in the five DGW groups (18–22, 23–26, 27–30, 31–34 and 35–40 weeks) was able to predict the demarcation points of pASD, which were 5.02, 5.15, 6.55, 8.55 and 7.90 mm, respectively. The prediction of pASD with AFO size and FO/AO was accurate and may provide reliable reference values in the clinic.