Topological indices are numerical parameters used to study the physical and chemical properties of compounds. In quantitative structure–activity relationship QSARs, topological indices correlate the biological activity of compounds with their physical properties like boiling point, stability, melting point, distortion, and strain energy etc. In this paper, we determined the M-polynomials of the crystallographic structure of the molecules Cu2O and TiF2 [p,q,r]. Then we derived closed formulas for some well-known topological indices using calculus. In the end, we used Maple 15 to plot surfaces associated with the topological indices of Cu2O and TiF2 [p,q,r].