The traditional design method for narrow foundation pits ignores size effects. Engineering practice shows that this is too conservative and causes large-scale waste. In this study, with the help of ABAQUS finite element software, retaining-structure models in semi-infinite and infinite elastic space are used to simulate the mechanical performances of pile-supported structures under different combinations of excavation depth, retaining pile-embedded depth, and excavation width. Furthermore, based on antioverturning stability theory and circular slip theory, the intrinsic relationship among these variables and their effects on the stability of excavation is analysed. Finally, based on the restraint effect of retaining structures on the soil below the pit bottom under actual working conditions, critical width is determined and used to classify foundation pits. Moreover, the applicability of existing codes is discussed. These results can improve the design and construction of narrow excavations, benefitting the construction industry and society in general.