In this study, an attempt was made to optimize the conditions for the transesterification of sunflower oil with methanol, catalyzed by Ca-K/Al2O3 nanocatalysts, using response surface methodology. The examined variables were reaction temperature (55, 65 and 75 °C), reaction time (1, 2, 3, 4 and 5 h), catalyst weight base oil (3, 6, 9 and 12 wt%), Ca content (20, 30, 50, 60 and 80 wt%), K content (5, 10, 15 and 20), methanol:sunflower oil molar ratio (3:1, 6:1, 9:1 and 12:1), calcination temperature (600, 700 and 800 °C) and calcination time (1, 2, 3 and 4 h). Catalyst characterization was done by X -ray diffraction (XRD), scanning electron microscopy (SEM), Fourier transform-infrared spectroscopy (FT-IR) and temperature programmed desorption (TPD). The maximum fatty acid methyl esters (FAME) conversion efficiency (biodiesel production efficiency) was 98.3%, at a calcination temperature of 800 °C for 3 h, a methanol-to-oil ratio of 9:1, a reaction temperature of 75 °C, a reaction time of 3 h and a catalyst-to-oil mass ratio of 9%.