A topological index is a branch of chemical graph theory that is vital to analyzing the physio-chemical characteristics of chemical compound structures divided into a degree-based molecular structure such as Zagreb indices, a distance-based molecular structure such as Wiener index, and a mixed such as Gutman index. In this paper, some definitions, results, and examples of Wiener polynomial and index for subdivision graph of friendship, bifriendship graphs, line subdivision graph of friendship, and bifriendship graphs were introduced. Moreover, we used the MATLAB program to calculate the Wiener polynomial and index of these graphs and refer to some applications.