Inventory management is a critical challenge for Micro, Small, and Medium Enterprises (MSMEs). A common issue faced is the imbalance of stock (overstock or stockout), which directly impacts financial stability. This study aims to apply the Simple Linear Regression algorithm as a forecasting tool, integrated directly into a PHP-based Point of Sale (POS) system. Unlike common machine learning implementations that require Python or separate servers, this research focuses on a native PHP implementation suitable for shared hosting environments used by MSMEs. Data was collected from historical sales records and processed through calculation stages: variable determination, slope and intercept calculation, and forecasting. The results show that this lightweight implementation successfully provides accurate stock recommendations for the next period without burdening the server infrastructure. This confirms that basic predictive analytics can be effectively implemented in a web-based environment for low-resource businesses.
You may also start an advanced similarity search for this article.