This study aims to analyze the effect of Non-Performing Loans (NPLs) and the Loan-to-Deposit Ratio (LDR) on bank financial performance, as measured by Return on Assets (ROA), with Net Interest Margin (NIM) as an intervening variable in banking companies listed on the Indonesia Stock Exchange during the 2021-2023 period. The research method used is quantitative research with a causal-comparative approach. The data used in this study is secondary data sourced from the financial reports of banking companies accessible through the official IDX website. The population in this study is banking sector companies listed on the Indonesia Stock Exchange, with a sample of 35 companies selected using a purposive sampling method based on certain criteria. The independent variables in this study are Non-Performing Loans (X1) and Loan to Deposit Ratio (X2), while the dependent variable is Return on Assets (Y) and the intervening variable is Net Interest Margin (Z). Data analysis techniques in this study use panel data regression, classical assumption tests, t-tests, coefficients of determination, and Sobel tests. The results of this study indicate that NPL has no effect on NIM, while LDR has an effect on NIM, NPL has an effect on ROA, LDR has no effect on ROA, NIM has an effect on ROA, NIM does not mediate the relationship between NPL and ROA, and NIM mediates the relationship between LDR and ROA.