In this study, CaO/scoria (a kind of ignition rock) was used as catalyst of transesterification reaction. We have tried to reduce production costs of biodiesel in different ways. n-hexane as solvent was used to enhance the solubility of methanol in oil. It improved mass transfer in catalysts surface and reduced reaction time. A Box-Behnken design was used to optimize four variables: Temperature, time, methanol to oil molar ratio and n-hexane to oil volume ratio. Response surface methodology was used to find the effect of n-hexane and find the optimum condition. The analysis of variance (ANOVA) indicated that n-hexane has a positive effect on conversion. The optimum reaction conditions were found to be temperature = 59.7 C, time = 4 h and 22 min, methanol to oil molar ratio = 14.76:1 and n-hexane to oil volume ratio = 0.905:1, which in these conditions the predicted conversion was 99.6% and observed conversion was 97.7%.