The recent global outbreak of covid-19 is affecting many countries around the world. Due to the growing number of newly infected individuals and the health-care system bottlenecks, it will be useful to predict the upcoming number of patients. This study aims to efficiently forecast the is used to estimate new cases, number of deaths, and number of recovered patients in Iran for 180 days, using the official dataset of the Iranian Ministry of Health and Medical Education and the impact of control measures on the spread of COVID-19. Four different types of forecasting techniques, time series, and machine learning algorithms, are developed and the best performing method for the given case study is determined. Under the time series, we consider the four algorithms including Prophet, Long short-term memory, Autoregressive, Autoregressive Integrated Moving Average models. On comparing the different techniques, we found that deep learning methods yield better results than time series forecasting algorithms. More specifically, the least value of the error measures is observed in seasonal ANN and LSTM models. Our findings showed that if precautionary measures are taken seriously, the number of new cases and deaths will decrease, and the number of deaths in September 2021 will reach zero.