The main purpose of this paper is providing a model to calculate the credit risk of Melli bank clients and implement it at Mellat Bank. Therefore, the present study uses a multi-layered neural network method. The statistical population of this research is all real and legal clients of Melli and Mellat banks. Sampling method used in this research is a simple random sampling method. Friedman test was used to calculate the required number of samples in a random sampling method from Cochran formula (1977) and Friedman test was used to rank the factors affecting the credit risk. Friedman test was also performed using data from a completed questionnaire of active experts at the Melli Bank. Based on the results obtained from Friedman test, five important factors in the credit risk of real clients of the Melli Bank of Iran, type of occupation, guarantee value, loan amount, having return checks, the balance average, and the value of the guarantee, the amount of the loan, the average of the balance, having returned checks and deferred loans are the most important factors affecting the credit risk of legal clients, which have been used as inputs in the neural network model. The results of credit risk prediction using the neural network showed that the designed model has a high ability to predict the credit risk of real and legal clients of the Melli bank, while it did not have this ability for the Mellat bank.