Abstract:Soil-nailed retaining is an economical,reliable,fast and handy retaining technique.However,at present the determination of soil nail length and the most critical slip surface depend on manual calculation with experimental formulas,which lead to huge workload and incorrect results.According to the technique regulations,a method is offered to search automatically the most critical slip surface and calculate the optimal soil nail length.Furthermore,the corresponding program is compiled with Visual C++.The calculation example indicates that program is easy and convenient for using and the results are stable and reliable.