In the process of excavation to backfill of deep foundation pit, the foundation pit is predicted.The deformation of foundation pit is controlled. The safe excavation of foundation pit is guided. The smooth construction is ensured. Based on the grey prediction model, the concept of optimal dimension is proposed. Based on a deep foundation pit project in tangshan, the optimal dimension of foundation pit prediction in different stages is explored and its precision is studied.