In order to determine shearing strength parameters of triaxial tests(cohesion and friction angle), nonlinear programming solution was suggested based on “minimum square sum of distance”. After proving that the vertical distances between Mohr circles and the regressed strength line are distributed normally, data with gross error would be excluded; moreover, the only strength line, as well as cohesion and friction angle, could be determined. Combining with Matlab, the solution process became rapid, precise and intuitive. Some examples verified the applicability of suggested method finally.