The increased attention given to batteries has given rise to apprehensions regarding their availability; they have thus been categorized as essential commodities. Cobalt (Co), copper (Cu), lithium (Li), nickel (Ni), and molybdenum (Mo) are frequently selected as the primary metallic elements in lithium-ion batteries. The principal aim of this study was to develop a computational algorithm that integrates geostatistical methods and machine learning techniques to assess the resources of critical battery elements within a copper porphyry deposit. By employing a hierarchical/stepwise cosimulation methodology, the algorithm detailed in this research paper successfully represents both soft and hard boundaries in the simulation results. The methodology is evaluated using several global and local statistical studies. The findings indicate that the proposed algorithm outperforms the conventional approach in estimating these five elements, specifically when utilizing a stepwise estimation strategy known as cascade modeling. The proposed algorithm is also validated against true values by using a jackknife method, and it is shown that the method is precise and unbiased in the prediction of critical battery elements.