This study focuses on crop yield prediction in India from 1997 to 2020, utilizing various machine learning techniques, with random forest achieving high accuracy in predictions. The research analyzes environmental factors, crop types, and agricultural practices, aiming to improve yield forecasting and enhance decision-making among farmers. The dataset encompasses diverse agricultural data across 30 Indian states, providing insights into cultivation areas, production quantities, and the impact of rainfall, fertilizers, and pesticides.