A generalized transfer stiffness coefficient method using graph theory is developed in order to improve the applicability of the transfer stiffness coefficient method. In the new method, an analytical model is expressed by a weighted signal-flow graph, and the graph is contracted according to the series and parallel contraction rules. The computational complexity and the memory requirement for the contraction process are both minimized by choosing the optimal contraction route. In addition, it is possible to develop a data-driving program that is applicable to various structures without updating the source program. An algorithm based on the present method is formulated for the in-plane longitudinal and flexural coupled free and forced vibration analyses of a two-dimensional framework structure. Furthermore, an overview for applying the method to a three-dimensional framework structure is briefly presented. The validity of the present algorithm is confirmed by the results of numerical computations.