Drug Sales Forecasting at XYZ Pharmacy using Single Moving Average and Single Exponential Smoothing Methods Based on a Web-Based System
DOI:
https://doi.org/10.59934/jaiea.v5i1.1584Keywords:
Sales Forecasting, Single Moving Average, Single Exponential Smoothing, MAPE, Web-Based SystemAbstract
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.
Downloads
References
F. Rohmawati, M. G. Rohman, and S. Mujilahwati, “Sistem Prediksi Jumlah Pengunjung Wisata Wego Kec.Sugio Kab.Lamongan Menggunakan Metode Fuzzy Time Series,” Joutica, vol. 3, no. 2, 2017, doi: 10.30736/jti.v2i2.66.
M. Syarif, “Waterfall Sebagai Model Pengembangan Sistem Persediaan Apotek Berorientasi Objek,” J. Teknol. Inf., vol. 6, no. 1, pp. 44–52, 2022.
M. Iqbal, D. Djamaludin, and M. K. Anam, “Rancang Bangun Aplikasi Kasir Dan Stok Barang Di Apotek Munawwarah Farma Berbasis Website,” J. Ilm. Fak. Tek., vol. 3, no. 2, pp. 115–121, 2023, doi: 10.33592/jimtek.v3i2.4013.
A. Wahyudi and S. Mujilahwati, “Implementasi Metode Time Series untuk Prediksi dan Monitoring Pendapatan Masla Delivery Berbasis Website,” Joutica, vol. 8, no. 2, pp. 1–6, 2023, doi: 10.30736/informatika.v8i2.1125.
D. Rodiah, “Peramalan Produksi Pempek Dengan Metode Moving Average Dan Exponential Smoothing,” J. Inform. Dan Rekayasa Komput., vol. 2, no. 1, pp. 131–140, 2022.
N. Hudaningsih, S. F. Utami, and W. A. A. Jabbar, “Perbandingan Peramalan Penjualan Produk Aknil Pt. Sunthi Sepurimengguanakan Metode Single Moving Average Dan Single Exponential Smooting,” J. Inform. Teknol. dan Sains, vol. 2, no. 1, pp. 15–22, 2020.
D. P. Putra, S. A. Siregar, S. R. Fadillah, and Z. K. Ningtyas, “Peramalan penjualan mobil dengan menerapkan metode single moving average dan single exponential smoothing,” J. Pariwisata Bisnis Digit. dan Manaj., vol. 3, no. 2, pp. 81–86, 2024.
A. Fahreza, “Penerapan Data Mining dengan Metode Single Moving Average dalam Pengolahan Data Penerimaan Siswa Baru,” in Seminar Nasional Ilmu Komputer (SNASIKOM), 2022, pp. 25–34.
H. Zudi, Henny, “Sistem Prediksi Penjualan Obat Menggunakan Metode Single Moving Average (Studi Kasus: Apotek Wilujeng Kecamatan Panceng Kab.Gresik),” Indexia, vol. 4, no. 1, p. 47, 2022, doi: 10.30587/indexia.v4i1.3638.
E. Pati and M. Snae, “Web-Based Ticket Purchase Information System in Bena Village,” J. Artif. Intell. Eng. Appl., vol. 4, no. 3, pp. 1863–1869, 2025.
S. H. Pratama and N. Rarasati, “Perbandingan Single Moving Average dan single smoothing eksponensial dalam peramalan penjualan barang coupling sucker di PT. Pertamina EP Asset-1 Field Jambi,” Technologica, vol. 3, no. 1, pp. 20–31, 2024.
S. Rahmadani, R. Rizaldi, and E. Rahayu, “PERBANDINGAN METODE SINGLE EXPONENTIAL SMOOTHING DAN SINGLE MOVING AVERANGE DALAM PERAMALAN PERSEDIAAN BAHAN BAKU PADA ROEMAH DONAT LEZAT,” J-Com (Journal Comput., vol. 4, no. 3, pp. 265–273, 2024.
R. P. Nugraheni, E. Rimawati, and R. T. Vulandari, “Penerapan Metode Exponential Smoothing Winters Pada Prediksi Harga Beras,” J. Ilm. Sinus Vol, vol. 20, no. 2, 2022.
M. Irfan, D. Mirwansyah, and K. A. Zahro, “Perancangan Sistem Informasi Monitoring Akademik Dengan Menggunakan Data Flow Diagram,” J. Locus Penelit. dan Pengabdi., vol. 2, no. 12, pp. 1201–1207, 2023.
S. Tamarawati, B. D. Hatmoko, and L. P. W. Adnyani, “Aplikasi sistem informasi pengolahan data administrasi pada Klinik Mitra Sehat Jakarta Selatan berbasis Java,” J. Fasilkom, vol. 10, no. 3, pp. 261–266, 2020.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Journal of Artificial Intelligence and Engineering Applications (JAIEA)

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.







