Due to the health effects of ammonia as an environmental pollutant, such as its odor, corrosion, algae phenomenon, etc., a method should be adopted to remove it from wastewater. In this study, removal of ammonia from hypothetical wastewater was investigated using adsorption on SWCNTs. The Design-Expert software was used to design the experiments and optimize the parameters that are effective in the adsorption performance of carbon nanotubes (CNTs), such as contact time, adsorbent dosage, pH, temperature, and ammonia concentration. The results revealed that the maximum adsorption with a performance of 90% was attained at a pH of 9.5. In addition, the adsorption performance was enhanced by increasing adsorption time and adsorbent dosage. Furthermore, increasing the temperature and the adsorbate quantity led to a decrease in the adsorption performance.