In this study, treatment of domestic wastewater (DWW) by electrocoagulation (EC) was investigated. The samples were supplied from the Sivas domestic wastewater pretreatment plant. The experimental studies were conducted to determine the optimum operating conditions such as electrode type, initial pH, current density, and EC time. Aluminum and iron electrodes were used, and aluminum electrodes were preferred to iron since it had a higher removal rate of COD, turbidity, and phosphate than the iron electrodes. At the end of these studies, the optimum operating conditions were found for original pH (7.8), 100 A/m(2), and 10 min EC time and obtained removal efficiencies of COD, turbidity, and phosphorus (72%, 98%, and 98%), respectively. Besides the operating costs investigated in the present study were the energy cost of EC and the material cost because of the consumption of aluminum electrodes. Operating costs varied from 0.03 to 1.67 $/m(3) and 0.44 to 3.85 $/m(3) wastewater treatment at 10-150 A/m(2) and 5-40 min, respectively.