In agricultural industries, efficient nutrient and water management are crucial to saving costs maximising crop yields, and increasing profit. A fertigation system is used to irrigate sufficient nutrients and water for the growing needs of the crops. However, the water and nutrient volume needed for each crop remains unknown due to various crop phases and the dynamics of nutritional demand. Therefore, this research work presents the optimisation modeling for an Automated Fertilizer Blending System (AFBS) to minimise the operational cost of nutrients, water, and electricity. The proposed optimisation model considers for the AFBS: (i) operational status of irrigation pump and stock tanks; (ii) stocks level for nutrient and water at each stock tank; (iii) inventory level for nutrient solutions in an AFBS tank; and (iv) nutrient and water level of the plants. The mathematical model is developed as mixed-integer linear programming (MILP). The optimisation problem is modeled using GAMS v-38.2.1 and solved by CPLEX 12 with a zero-optimality gap. In conclusion, cost comparison analysis between electricity, fertilizer, and supplied water represents the optimal cost percentage in engaging with nutrient losses minimised by 30%, water runoff, and electricity costs for optimal condition-based fertigation systems.