This research investigates the determinants of tax avoidance with company size as a moderation. Regarding the increase in environmental social governance (ESG) investment since 2013 in Indonesia, this research uses eight LQ45 companies for 2013-2023. This research uses Moderated Regression Analysis. The results show that profitability, financial distress, and asset turnover significantly influence tax avoidance. In contrast, company size and ESG do not influence tax avoidance. Although company size can moderate profitability on tax avoidance, it cannot moderate financial distress, asset turnover, and ESG on tax avoidance. This research contributes to expanding understanding regarding tax avoidance through agency theory and legitimacy in providing academic literature. This research implies that a company's financial performance can reduce tax avoidance efforts in line with fulfilling stakeholder (principal) expectations regarding increasing profits.