Agriculture is the backbone of India's economy, yet farmers face persistent challenges due to crop price volatility and uncertain profit outcomes. This paper presents the Smart Crop Price Prediction and Profit Forecasting System, a data-driven web application built using Python, Flask, and MySQL. The system integrates historical market data from government portals, real-time weather data via REST APIs, and machine learning algorithms including Linear Regression, Random Forest, and LSTM networks to forecast crop prices and estimate profit margins. The three-tier architecture comprises an HTML/CSS/JavaScript frontend, a Flask backend exposing RESTful endpoints, and a MySQL relational database. Experimental evaluation shows the Random Forest model achieves a Mean Absolute Percentage Error (MAPE) of 8.4% on test data, outperforming SARIMA and Linear Regression baselines. The system provides interactive dashboards, profit simulators, and downloadable reports, empowering non-technical users including smallholder farmers to make informed, data-backed agricultural decisions.
Bhosale et al. (Thu,) studied this question.