Particulate materials, such as sandy soil, are everywhere in nature and form the basis for many engineering applications. The aim of this research is to investigate the particle shape, size, and gradation of sandy soil and how they relate to shear strength, which is an essential characteristic that impacts soil stability and mechanical behaviour. This will be achieved by employing a combination of experimental methodology, which includes the use of a microscope direct shear apparatus, and machine learning techniques, namely multiple linear regression and random forest regression. The experimental findings reveal that angular-shaped sand particles enhance the shear strength characteristics compared to spherical, rounded ones. Similarly, coarser sand particles improve these characteristics compared to finer sand particles, as do well-graded particles when compared to poorly graded ones. The machine learning findings show the validity of both models in predicting shear strength when compared to the experimental results, showing high accuracy. The models are designed to predict shear strength of sand considering six input features: mean particle size, uniformity coefficient, curvature coefficient, dry density, normal stress, and particle regularity. The most important features from both models were identified. In addition, an empirical equation for calculating shear strength was developed through multiple linear regression analysis using the six features.