Comparative analysis of the least squares method and double moving average technique for forecasting product inventory

  • Surfa Yondri Department of Electronic Engineering, Politeknik Negeri Padang, INDONESIA
  • Dwiny Meidelfi Department of Information Technology, Politeknik Negeri Padang, INDONESIA
  • Tri Lestari Department of Information Technology, Politeknik Negeri Padang, INDONESIA
  • Fanni Sukma Department of Information Technology, Politeknik Negeri Padang, INDONESIA
  • I.S Mutia Department of Information Technology, Politeknik Negeri Padang, INDONESIA
Keywords: Industry, innovation and infrastructure, Cosmetics industry, Management production, Demand prediction


The cosmetics industry necessitates efficient inventory management to balance customer demand with stock control. This case study explores how Liza Cosmetics Shop optimized inventory for Lip Cream Implora 01, a popular product, using data-driven forecasting techniques. Traditional trend-based methods often resulted in inaccurate forecasts. This study proposed implementing the SDLC Waterfall Model to apply two forecasting techniques: Least Squares and Double Moving Average. Historical sales data (April 2021 - June 2022) was analyzed to identify demand patterns, seasonality, and trends. The Least Squares method was chosen for its suitability in capturing stable, linear relationships between sales and time, while the Double Moving Average method catered to data exhibiting both long-term trends and short-term fluctuations. Rigorous testing using white-box and black-box methods ensured the accurate functionality and system behavior of the implemented models. The Mean Absolute Percentage Error (MAPE) determined the method best suited for predicting July 2022 demand. This case study contributes insights into data-driven inventory management in cosmetics, highlighting benefits such as optimized stock levels, reduced costs, and enhanced customer satisfaction through improved demand fulfillment. This studys’ limitations including unforeseen marketing campaigns and economic fluctuations impacting forecasts were acknowledged. Despite these challenges, the study emphasizes the potential of data-driven techniques to optimize inventory management and meet customer demands effectively.


M. S. Hasibuan and S. Nuraeni, “Influential Cosmetic Packaging Attributes Toward Customer Purchase Intention,” Journal of Consumer Studies and Applied Marketing, vol. 1, no. 2, 2023,

C. S. Lim, J. L. Loo, S. C. Wong, and K. T. Hong, “Purchase Intention of Korean Beauty Products among Undergradaute Students,” Journal of Management Research, vol. 12, no. 3, 2020,

H. Al-Banna and S. M. Jannah, “The push, pull, and mooring effects toward switching intention to halal cosmetic products,” Journal of Islamic Marketing, vol. 14, no. 9, 2023,

R. Mulyarahardja, A. G. Adhitya, J. W. M. Budiharga, Ciptadi, and Y. P. Samuel, “Determinants of purchase intention of halal cosmetic products among muslim females: evidence from Indonesia,” Journal of halal product and research, vol. 6, no. 1, 2023,

S. Dalir, H. G. T. Olya, A. Al-Ansi, A. A. Rahim, and H. Y. Lee, “Increasing profitability of the halal cosmetics industry using configuration modelling based on indonesian and malaysian markets*,” Journal of Korea Trade, vol. 24, no. 8, 2020,

N. Rubiyanti and Z. Mohaidin, “The Linking of Brand Personality, Trust, Attitude and Purchase Intention of Halal Cosmetic in Indonesia; A Conceptual Paper,” International Journal of Engineering & Technology, vol. 7, no. 4.38, 2018,

R. Dio, A. A. Dermawan, and D. A. Putera, “Application of Market Basket Analysis on Beauty Clinic to Increasing Customer’s Buying Decision,” Sinkron, vol. 8, no. 3, 2023,

“Integrated Communication Strategy for Awareness of Emotional Marketing Campaign for Beauty Brand,” Asian Journal of Research in Business and Management, 2023,

Adedoyin Tolulope Oyewole, Chinwe Chinazo Okoye, Onyeka Chrisanctus Ofodile, and Emuesiri Ejairu, “Reviewing predictive analytics in supply chain management: Applications and benefits,” World Journal of Advanced Research and Reviews, vol. 21, no. 3, 2024,

T. C. Toledo, G. F. Silva, and W. R. Garo Junior, “Analysis of demand in the importation process for the trade of individual protection equipment,” Independent Journal of Management & Production, vol. 8, no. 5, 2017,

Y. M. Tang, K. Y. Chau, Y. Y. Lau, and Z. Zheng, “Data-Intensive Inventory Forecasting with Artificial Intelligence Models for Cross-Border E-Commerce Service Automation,” Applied Sciences (Switzerland), vol. 13, no. 5, 2023,

E. Puspitasari, N. Eltivia, and N. I. Riwajanti, “Inventory Forecasting Analysis using The Weighted Moving Average Method in Go Public Trading Companies,” Journal of Applied Business, Taxation and Economics Research, vol. 2, no. 3, 2023,

M. Rumetna, E. E. Renny, and T. N. Lina, “Designing an Information System for Inventory Forecasting,” International Journal of Advances in Data and Information Systems, vol. 1, no. 2, 2020,

F. Hamidy and I. Yasin, “Implementation of Moving Average for Forecasting Inventory Data Using CodeIgniter,” Journal of Data Science and Information Systems (DIMIS), vol. 1, no. 1, 2023,

E. N. S. Dewi and A. A. Chamid, “Implementation of Single Moving Average Methods For Sales Forecasting Of Bag In Convection Tas Loram Kulon,” Jurnal Transformatika, vol. 16, no. 2, 2019,

A. Pataropura, I. D. Sabatino, and R. Riki, “Inventory Management with Forecasting Method: Single Moving Average and Trend Projection,” bit-Tech, vol. 2, no. 3, 2020,

Christofer, “Information on Pharmacy Inventory Management With Forecasting Method (Double Moving Average & Double Exponential Smoothing),” bit-Tech, vol. 4, no. 1, 2021.

A. Rahayu, A. Lattu, and M. Mupaat, “Analysis of product stock inventory forecasting using weighted moving average method,” Jurnal Teknik Informatika (Jutif), vol. 3, no. 6, 2022,

S. Ramayani, Rizaldi, and M. Iqbal, “Forecasting of Fertilizer Inventory in Ud. Menara Tani With Weighted Moving Average (Wma) and Double Exponential Smoothing (Des) Method,” Jurnal Teknik Informatika, vol. 3, no. 3, 2022.

O. J. Kolade, “Economic Development, Technological Change, and Growth Demand Forecasting and Measuring Forecast Accuracy in a Pharmacy,” Acta Universitatis Danubius OEconomica, vol. 15, no. 3, 2019.

T. Maharani, A. Syafnur, P. Studi Sistem Informasi, and S. Royal Kisaran, “Forecasting drug stocks at the air joman sub-district health center using the least square method,” Jurnal Teknik Informatika (JUTIF), vol. 3, no. 3, 2022.

H. Setiawan, N. Raras Setyoningrum, D. Saputra, and M. Merry, “Inventory prediction system using the least square method at the serba serbi online shop tanjungpinang,” Jurnal Media Elektrik, vol. 21, no. 1, 2024,

K. F. Pinem, B. Mulyawan, and N. J. Perdana, “Implementation of minimum stock determination using prediction and economic order quantity (EOQ) method,” Jurnal Ilmu Komputer dan Sistem Informasi, vol. 9, no. 1, 2021,

A. A. Putra, “Sales and Inventory Prediction with the EOQ Method based on Single Exponential Smoothing Forecasting,” Journal of Computer Scine and Information Technology, 2023,

H. Shih and S. Rajendran, “Comparison of Time Series Methods and Machine Learning Algorithms for Forecasting Taiwan Blood Services Foundation’s Blood Supply,” J Healthc Eng, vol. 2019, 2019,

E. Spiliotis, S. Makridakis, A. A. Semenoglou, and V. Assimakopoulos, “Comparison of statistical and machine learning methods for daily SKU demand forecasting,” Operational Research, vol. 22, no. 3, 2022,

J. Marques and A. Marques Da Cunha, “Tailoring traditional software life cycles to ensure compliance of RTCA DO-178C and DO-331 with model-driven design,” in AIAA/IEEE Digital Avionics Systems Conference - Proceedings, 2018.

N. Nungsiyati and I. Indrianingsih, “Design to Build a Mobile Android-Based Mathematics Learning Application for PAUD Kartini,” JTKSI (Jurnal Teknologi Komputer dan Sistem Informasi), vol. 6, no. 1, 2023,

S. Liu and J. Wei, “The Satelite on the Research of the Software Life Cycle: V + Iterative Waterfall,” in Proceedings of 2018 2nd IEEE Advanced Information Management, Communicates, Electronic and Automation Control Conference, IMCEC 2018, 2018.

M. Abazid, A. Abdulrahman, and S. Samine, “Least Squares Methods To Forecast Sales for a Company,” Int J Sci Eng Res, vol. 9, no. 6, 2018.

Mulyani, “Prediction of New Student Numbers using Least Square Method,” International Journal of Advanced Research in Artificial Intelligence, vol. 4, no. 11, 2015.

D. M. Khairina, Y. Daniel, P. P. Widagdo, S. Maharani, and Shabrina, “Decision support for predicting revenue target determination with comparison of double moving average and double exponential smoothing,” IAES International Journal of Artificial Intelligence, vol. 11, no. 2, 2022,

A. Andriyadi, D. Yuliawati, S. Saleh, and B. Bachry, “Implementing White Box Testing for Evaluating the Inner Logic Code of the Research, Staffs, and Library Information System of Institute of Informatics and Business Darmajaya,” in International Conference On Information Technology And Business (ICITB) 6, Bandar Lampung, Indonesia, 2020. pp. 178-182

H. F. Yang, T. S. Dillon, E. Chang, and Y. P. P. Chen, “Optimized Configuration of Exponential Smoothing and Extreme Learning Machine for Traffic Flow Forecasting,” IEEE Trans Industr Inform, vol. 15, no. 1, 2019,

T. M. Baykal, H. E. Colak, and C. Kılınc, “Forecasting future climate boundary maps (2021–2060) using exponential smoothing method and GIS,” Science of the Total Environment, vol. 848, 2022,

I. S. Machfiroh, W. A. Alam Sur, and R. T. Pangestu, “Trend semi average and least square in forecasting yamaha motorcycle sales,” BAREKENG: Jurnal Ilmu Matematika dan Terapan, vol. 16, no. 1, 2022,

R. Mustapa, M. Latief, and M. Rohandi, “Double moving average method for predicting the number of patients with dengue fever in Gorontalo City,” Sciences and Technology (GCSST), vol. 2, 2019.

M. Sabir, Y. Ali, and N. Muhammad, “Forecasting incidence of dengue and selecting best method for prevention,” J Pak Med Assoc, vol. 68, no. 9, 2018.

M. L. M. Rombe, “The Impact of Effective Forecasting on Business Growth, a Case of Businesses in Juba Market,” International Journal of Economics, Business and Management Research, vol. 2, no. 01, 2018.

E. W. Chindia, G. Wainaina, F. N. Kibera, and G. P. Pokhariyal, “Forecasting Techniques, Operating Environment and Accuracy of Performance Forecasting for Large Manufacturing Firms in Kenya,” International Journal of Managerial Studies and Research (IJMSR), vol. 2, no. 7, 2014.

How to Cite
Yondri, S., Meidelfi, D., Lestari, T., Sukma, F., & Mutia, I. (2024). Comparative analysis of the least squares method and double moving average technique for forecasting product inventory. Teknomekanik, 7(1), 74-84.
Research Articles