This research employs the Random Forest Machine Learning model to predict electricity consumption and detect anomalies in electrical networks. Addressing the energy sector’s challenges, such as supply reliability and renewable energy integration, this model processes historical electricity consumption data, weather conditions, and network events to efficiently forecast demand and identify anomalies. Data cleansing and normalisation preceded the training phase, where the model was fine-tuned using historical data to balance forecast accuracy and overfitting avoidance. The dataset was divided into training (80%) and testing (20%) sets for performance evaluation. Through cross-validation, optimal model hyperparameters were determined. The findings highlight the model’s efficacy in accurately predicting daily electricity consumption in a small, homogenous town. The model achieved a Mean Absolute Error (MAE) of 198.73 MWh and a coefficient of determination (R²) of 0.9387. Temperature, humidity, and wind speed were identified as key influencing factors on consumption levels. Conclusively, the Random Forest model presents a valuable tool for energy management, offering precise consumption forecasting and anomaly detection capabilities. Future work will address computational demands and enhance model integration with other Machine Learning methods for improved performance. This contribution is significant for efficient energy system planning and operation.