Many solutions of the stress intensity factor have been proposed in recent years. However, most of them take only third or fourth-order polynomial stress distributions into account. For complicated stress distributions which are difficult to be represented as third or fourth-order polynomial equations over the stress distribution area such as residual stress distributions or thermal stress distributions in dissimilar materials, it is important to further improve the accuracy of the stress intensity factor. In this study, a weight function method with segment-wise polynomial interpolation is proposed to calculate solutions of the stress intensity factor for complicated stress distributions. By using this method, solutions of the stress intensity factor can be obtained without employing finite element analysis or difficult calculations. It is therefore easy to use in engineering applications. In this method, the stress distribution area is firstly divided into several segments and the stress distribution in each segment is curve fitted to segment-wise polynomial equation. The stress intensity factor is then calculated based on the weight function method and the fitted stress distribution in each segment. Some example solutions for both infinite length cracks and semi-elliptical cracks are compared with the results from finite element analysis. In conclusion, it is confirmed that this method is applicable with high accuracy to the calculation of the stress intensity factor taking actual complicated stress distributions into consideration.