Textile dyeing wastewater was treated by electrocoagulation using aluminium and iron plate electrodes. Response surface methodology and central composite design were applied in the experiments and in statistical data analysis. A current density of 30-100Am(-2), an initial pH of 4-8, and an operating time of 10-40min were chosen as independent variables, and the chemical oxygen demand, total organic carbon, and turbidity removal efficiencies and the operating cost were selected as responses in the electrocoagulation process. The developed quadratic models for the responses and the experimental data were in good agreement with model predictions statistically (R(2)0.92, Adj R(2)0.82, and Prob>F<0.004). The optimised operating variables (initial pH, current density, and operating time) and the maximum total organic carbon, chemical oxygen demand, and turbidity removal efficiencies for textile dyeing wastewater were 5.5, 63.2Am(-2), 30.4min, 77%, 82%, and 94% for the iron electrode and 5.6, 52.5 Am-2, 33.9min, 68%, 69% and 99% for the aluminium electrode respectively. Minimum operating costs for the iron and aluminium electrodes under optimum conditions were Euro2.1m(-3) (Euro1.0kg(-1) COD) and Euro2.4m(-3) (Euro1.6kg(-1) COD). The iron electrode was found to be superior to the aluminium electrode in terms of removal efficiencies and operating cost for the treatment of textile dyeing wastewater.