The aim of this article is to examine which selected internal factors influence the profitability (ROA) of companies in the energy sector in Poland and how they do so, over the period 2018–2021, taking into account two groups: all types of activities (984 companies) and electricity production (508 companies). This study uses Pearson correlation analysis, Wilcoxon pairwise rank test, descriptive statistics and multiple linear regression to build eight ROA econometric models, four for each group. The research shows that in the energy sector, in particular, variables relating to the capital structure (total equity/total assets, long-term liabilities/total assets, short-term liabilities/total assets and long-term liabilities/short-term liabilities ratios) have a statistically significant impact (positive or negative) on the profitability (ROA). The aforementioned ratios appear in various combinations in all eight ROA models. The use of equity to finance the activities of companies in this sector seems to be particularly beneficial, as the total equity/total assets ratio occurs in as many as seven out of eight models and, moreover, it always has a positive impact on the ROA. The remaining analyzed variables relating to the structure of assets (fixed assets/total assets ratio), financial liquidity (current ratio) and the age of the company appear in the models as statistically significant quite rarely, having a different impact on the ROA (positively or negatively). However, variables such as the fixed assets/current assets and total liabilities/total equity ratios do not have a statistically significant impact on the ROA at all in any of the studied groups of enterprises. The research results suggest that managers, in order to shape profitability (measured by ROA), should pay special attention to the capital structure, i.e., the proportions of the use of equity, long-term liabilities and short-term liabilities to finance the operations of energy companies as these independent variables appear most often in ROA models. Other analyzed factors, such as the assets structure (the share of fixed assets in total assets) or financial liquidity, also have an impact on the return on assets; therefore, their use in energy companies should also be considered. Moreover, the research shows a large diversity of factors shaping ROA in econometric models, the way they affect the dependent variable (positive or negative) and the degree of model fit (R2), both in individual years and in the two groups of companies studied. This proves that it is not possible to clearly and finally determine which factors and how (positive or negative) they affect the profitability. This influence can change over time depending on the circumstances, which indicates the need for the continuous involvement of decision makers in the management process and making decisions based on reliable and appropriate-to-the-situation analyses. [ABSTRACT FROM AUTHOR]