The fuel demand is increasing globally. The conventional fuel is toxic and causes global warming and pollution. Therefore, biodiesel is being used as the alternative to petroleum fuel because it is non-toxic and can be renewable. Nowadays, non-edible feedstock is gaining more attention for the production of biodiesel because it can grow anywhere on land, have low cost, and doesn’t cause an imbalance in the food economy. This study deals with the biodiesel production and optimization of biodiesel from Ricinus communis oil using sodium hydroxide (NaOH) and potassium hydroxide (KOH) as solid base catalyst. The free fatty acid content (22.14 % mg KOH/g) of castor oil calculated before transesterification indicated that the pretreatment of raw oil with acid was required for biodiesel synthesis. Therefore, the esterification process was used to reduce the free fatty acid content of castor oil from 22.14% to 0.84%. After that, the transesterification process was used for production of biodiesel using a catalyst (NaOH and KOH). The four different parameter reactions (i.e. Ratio (alcohol to oil), Time, Temperature, and catalyst amount) were used to optimize the yield of biodiesel production. Firstly, NaOH was used as the catalyst and different reactions were done by making changes in all parameters to get maximum yield. The same procedure was done to get maximum yield using KOH as the catalyst. The maximum yield obtained using NaOH and KOH was 94.6 % and 96.2% respectively. In the future, the properties of biodiesel on different parameters can be analyzed and also can be used as a diesel engine to check the working of the engine.