The Wiener Index is calculated by taking a molecular graph where vertices represent atoms and edges represent bonds. The shortest path between each pair of vertices is determined, and these distances are summed up to obtain the Wiener Index. For a molecule with n vertices, the sum is taken over all possible pairs of vertices (i, j): W = Σ d(i, j), where d(i, j) is the shortest path distance between vertices i and j.