Food instability has been linked to infertility, health issues, accelerated aging, incorrect insulin regulation, and more. Innovative approaches increased food availability and quality. Agriculture environment monitoring systems need IoT and machine learning. IoT sensors provide all necessary data for agriculture production forecast, fertilizer management, smart irrigation, crop monitoring, crop disease diagnosis, and pest control. Precision agriculture may boost crop yields by prescribing the right water-fertilizer-paste ratio. This article presents IOT based fertilizer recommendation system for Smart agriculture. This framework uses IoT devices and sensors to acquire agriculture-related data, and then machine learning is applied to suggest fertilizer in the correct quantity and at the appropriate time. The data acquisition phase collects input data, including soil temperature, moisture, humidity, regions' weather data, and crop details. Features are selected using the Sequential Forward Floating Selection algorithm. Multilinear Regression performs data classification. The performance of SFSS-MLR is compared to Random Forest, C4.5, Naïve Bayes algorithm. SFSS MLR is better in accuracy, precision, recall and F1. The accuracy of SFSS MLR is 99.3 percent.