Milling by mechanical means is vital unit operation in pharmaceutical processing which can be used for controlling particle size reduction. This approach can be also used for mechanochemical synthesis of pharmaceutical cocrystals. However, controlling the particle size of cocrystal during the milling process is challenging due to complexity of the process and different mechanisms involved. In this study, artificial neural network (ANN) approach was performed to predict the size of particles during mechanochemical synthesis of pharmaceutical cocrystals in ball milling operation. Theophylline was used as active pharmaceutical ingredient (API) and 4-aminobenzoic acid as co-former in the experiments. Different types of excipients including hydroxypropylmethylcellulose (HPMC), lactose, microcrystalline cellulose (MCC) polyvinylpyrrolidone (PVP) and polyethylene glycol (PEG) were used to see the effect of excipients on the cocrystals particle size. ANN was developed considering excipient type, excipient percentage, jar size, milling time as inputs, while median particle size (d50) was considered as the response, and representative of particle size. Two hidden layers were considered in developing ANN, and a combination of linear and nonlinear functions was used as transfer function. ANN was trained and validated with measured data, and R2 greater than 0.99 was obtained for the training and validation, with RMSE values of 1.06 and 3.89 for training and validation, respectively. The results were used to provide a design space for understanding the cocrystal particle size variation during ball milling process. It was indicated that the largest particles were formed using PEG as excipient, and increase in particle size over the milling time. The latter was attributed to the electrostatic attraction forces between the particles, thus aggregation and agglomeration of particles as the milling time exceeds a threshold. Furthermore, larger particles were obtained with the larger jar size. It turned out that faster cocrystallization rate occurred after only 5 min of milling in 25 mL jar compared to 25 min in 10 mL milling jar. The developed methodology has been shown to be robust and can be used as predictive tool for designing pharmaceutical cocrystallization using ball milling, and controlling the particle size during size reduction process.