The topological descriptor Wiener index named after the chemist Harold Wiener is defined as half the sum of the distances between every pair of vertices of a graph. A lot of research has been devoted to finding Wiener index by brute force method. In this paper we compute the wiener index of chemical structures such as sodium chloride and benzenoid without using distance matrix.