Fluctuations in interest rates and inflation have the potential to affect the financial performance of retail sector companies in Indonesia, so dynamic macroeconomic conditions require firms to manage their capital structure optimally in order to maintain financial performance. This study aimed to analyze the effect of interest rates and inflation on the financial performance of retail sector companies listed on the Indonesia Stock Exchange (IDX), with capital structure as a mediating variable. A quantitative approach was employed using secondary data consisting of the financial statements of retail companies, the BI 7-Day Reverse Repo Rate, and the inflation rate based on the Consumer Price Index (CPI) for the period 2018–2024. The research sample comprised six retail companies selected using a purposive sampling technique. Data were analyzed using panel data regression and a mediation test with the Sobel test. The results showed that interest rates had a positive and significant effect on both the financial performance and capital structure of retail companies, whereas inflation did not have a significant effect on either financial performance or capital structure. Capital structure was found to have a positive effect on financial performance but was not yet able to optimally mediate the effects of interest rates and inflation. The study concludes that capital structure management and the efficient use of assets play an important role in enhancing the financial performance of retail companies amid macroeconomic dynamics. The implications of this study are expected to provide considerations for corporate management, investors, and policymakers in formulating financial strategies that are adaptive to changes in interest rates and inflation.