This study aims to develop a web-based drug sales prediction system at XYZ Pharmacy by implementing two forecasting methods: Single Moving Average (SMA) and Single Exponential Smoothing (SES). The system is designed to help address fluctuations in drug demand that may lead to overstocking or stockouts, which can ultimately impact pharmacy operations and service quality. The system was built using PHP as the programming language and MySQL as the database, with a primary focus on the sales forecasting feature. The dataset used includes the sales of 5 types of drugs from July 2024 to May 2025, which were analyzed to predict sales for the following month. Evaluation results show that the SES method with a smoothing constant α = 0.2 achieved a Mean Absolute Percentage Error (MAPE) of 9.38%, while the SMA method with a 5-month period resulted in a MAPE of 9.43%. Among all the data, Mefenamic Acid yielded the most accurate prediction for June 2025. Both methods were successfully implemented in the system, with SES showing slightly better performance, especially in handling gradual trend changes. Additionally, the system allows users to compare forecasting results across methods and supports better decision-making in inventory management, helping to maintain optimal drug availability at the pharmacy.
Setiawan et al. (Wed,) studied this question.