The increase in bearing capacity under the influence of consolidation is the main feature of a soft foundation on the stage of subgrade filling. The effects of consolidation, intermediate principal stress, earth pressure at rest, and presence of a crusty layer were all considered. Based on the unified strength theory, new theoretical formulas for critical edge load and critical load were deduced. The solution of the Mohr-Coulomb strength theory is a special case of the unified strength theory. The proposed formulas were analyzed and validated on a practical railway subgrade filling project in an area with soft soils. The calculated results showed good agreement with experimental results. The new formulas provide not only a theoretical basis for the calculation of the bearing capacity of a soft soil foundation but also a reference for calculating the safe height of subgrade filling in a soft soil area. Using the new formulas to calculate the bearing capacity of the soft soil foundation and the filling height of embankment under different degrees of consolidation, it is possible to understand the variation pattern of the bearing capacity of the foundation during construction of the embankment filling, which provides significant guidance for the safe filling of the embankment on a soft soil foundation.