Objective: To attract investors, firms should keep their values attractive. If the value of the company decreases, the trust of investors in the company will also decrease. Managers can use earnings management to influence the value of a company. Therefore, in this study, the effect of accrual-based and real earnings management on firm value has been studied. Thus, in addition to assessing the effects of earnings management on the value of the firms, the research findings will also help to develop financial literature in this field due to the use of modern criteria in evaluating the value of firms. Methods: To achieve the aim of the study, the financial information of 180 firms listed on the Tehran Stock Exchange from 2008 to 2018 was studied. The research hypotheses were also tested using multivariate regression models with combined data. Results: The research findings showed that accrual earnings management through discretionary accruals and real earnings management through abnormal production costs and abnormal operating cash flows have a positive and significant effect on the value of the firm obtained from free cash flow.But there was no significant relationship between real earnings management through abnormal discretionary expenses and value of the firm obtained from free cash flow. However, the impact of accrued earnings management through discretionary accruals and real earnings management through abnormal production costs and abnormal operating cash flows on the firm's value obtained from economic value added has been negative and significant. Also, real earnings management through abnormal discretionary expenses has had a positive and significant effect on the firm's value obtained from economic value added. Conclusion: The results show that earnings management affects the value of companies. This effect is positive in some cases and negative in others. This showsthat manipulating discretionary accruals and actual activities have different effects on the value of companies, which can seriously jeopardize the interests of stakeholders in the company. Therefore, in order to prevent the harm of users of financial statements, especially investors, or in the broader perspective of the country's economy through earnings management procedures, it is necessary for organizations and legal institutions responsible in this field to take the necessary measures to prevent earnings management activities.