The Wiener Index of a graph G is equal to the sum of distances betweenrnall pairs of vertices of G. It is known that the Wiener Index of a molecularrngraph correlates with certain physical and chemical properties of arnmolecule. In the mathematical literature, many good algorithms can bernfound to compute the distances in the graph, and these can easily be adaptedrnfor the calculation of the Wiener Index. An algorithm that calculates thernWiener Index of a tree in Linear Time is given. And also another algorithmrnthat calculates Wiener Index for an arbitrary graph is given. Moreover, thernapplication of Wiener Index is discussed.