Objectives The current research investigations present the numerical solutions of the anthrax disease system in animals by designing a machine learning stochastic procedure. The mathematical anthrax disease system in animals is classified into susceptible, infected, recovered and vaccinated.Method A Runge-Kutta solver is applied to collect the dataset, which decreases the mean square error by dividing into training as 78%, testing 12% and verification 10%. The proposed stochastic computing technique is performed through the logistic sigmoid activation function, and a single hidden layer construction, twenty-seven numbers of neurons, and optimization through the Bayesian regularization for the mathematical anthrax disease system in animals.Finding The designed procedure's correctness is authenticated through the results overlapping and reducible absolute error, which are calculated around 10-05 to 10-08 for each case of the model. The best training performances are performed as 10-10 to 10-12 of the model. Moreover, the statistical performances in terms of regression coefficient, error histogram, and state transition values enhance the reliability of the proposed stochastic machine learning approach.Novelty The designed scheme is not applied before to get the numerical results of the anthrax disease system in animals.