The purpose of this research is to investigate the non-linear effect of size and capital structure of companies on profitability in the framework of threshold panel regression in companies listed on Tehran Stock Exchange. For this purpose, 105 companies from different industries were selected as a statistical sample between 2010 and 2021. Hypotheses testing were analyzed under two scenarios: linear multivariate regression and non-linear multivariate regression (threshold panel regression method). Profitability as a dependent variable, capital structure and company size as independent variables and equity, sales growth and company life as control variables were examined. The results of statistical analysis showed that there is no significant relationship between company size and profitability in a non-linear mode. In the case of a threshold panel, the size of the company is known as the threshold variable and the capital structure is known as the dependent variable of the regime. The threshold value was estimated at 15.89, since the model has a threshold limit, so two different regimes were obtained for the capital structure variable. In both regimes, the relationship between capital structure and non-linear profitability is negative and significant. In this way, in the first regime, the capital structure up to the threshold value of the company's size reduces the profitability, and in the second regime, when the capital structure value exceeds the threshold value, the capital structure has less effect on the profitability and increases the profitability. It reduces less than before. According to the obtained results, the companies that are in the second regime have a more favorable capital structure and profitability than the companies in the first regime.