Floods pose significant challenges as one of nature's most devastating disasters, making the development of accurate forecast model’s complex. This issue has led to severe consequences such as crop loss, population displacement, damage to infrastructure, and disruption of essential services. Advanced research on flood prediction models has played a crucial role in providing policy recommendations, mitigating risks, reducing human casualties, and minimizing property damage caused by floods. In this context, we propose an Internet of Things (IoT)-based flood prediction and forecasting model that prioritizes energy efficiency. Given the limited battery and memory capacity of IoT sensor nodes, we employ an energy-saving strategy within the fog layer, leveraging data diversity to minimize energy consumption. Additionally, cloud technology offers an effective storage solution. To accurately calibrate flood phases, we investigate climatic factors such as humidity, temperature, rainfall, as well as water body parameters including water flow and elevation. Neural networks are commonly used in constructing forecast systems, as they can replicate the complex calculations involved in flood physical processes, resulting in improved performance and cost-effectiveness. In our approach, the Artificial Neural Network (ANN) technique is employed for flood forecasting, and the effectiveness of different algorithms, such as Logistic Regression and Decision Tree, is assessed by comparing them to ANN. Accuracy values are computed using a classification report assessment, and graph parameters are carefully evaluated. Ultimately, our proposed system utilizes the ANN technique to train a predictive model by examining the dataset. This model generates real-time flood risk forecasts through a user-friendly graphical interface.