In the present work, we propose the X3D method that extends the B3LYP method by correcting its errors on heats of formation of hydrocarbons (HCs) with three-dimensional (3D) molecular descriptors. Inspired by the widely used Wiener index, these 3D descriptors are developed to improve over the original B3LYP method for a better description of atom-atom, atom-bond and bond-bond interactions. On top of a training set of only 45 species, the X3D method is validated against various sets of different chemistry, displaying an overall near chemical accuracy. In particular, X3D improves over B3LYP, reducing its mean absolute errors from 28.4 to 0.3 kcal/mol for (Set 1) 21 n-alkanes up to n-C32 H66 , from 19.3 to 0.6 kcal/mol for (Set 2) n-C7 H16 and its branched isomers, from 29.5 to 1.6 kcal/mol for (Set 3) 36 polycyclic saturated HCs, from 8.6 to 1.1 kcal/mol for (Set 4) 41 C6 H8 isomers of rings, alkenes, alkynes, and cumulenes, from 20.3 to 0.6 kcal/mol for (Set 5) 41 benzene-based compounds, and 8.1 to 1.3 kcal/mol for (Set 6) 66 radicals, etc. Comparisons with the G4 results are also presented. © 2016 Wiley Periodicals, Inc.