PurposeThe purpose of this paper is to examine the determinants of capital structure using a dataset of firms in Malaysia.Design/methodology/approachThis paper carries out a panel data analysis of 8,270 observations from 827 listed non-financial firms on the Malaysia stock market over the period 2008–2017. To estimate the model and analyse the data collected from the DataStream and World Bank databases, the authors use static panel estimation techniques as well as two-step difference and system dynamic GMM estimator.FindingsThe results show that profitability, growth opportunity, tax-shield, liquidity and cash flow volatility have a negative and significant impact on debt measures. However, the effects of collateral, non-debt tax and earnings volatility on measures of debt are positive and significant. In addition, firm size, firm age, inflation rate and interest rate are important determinants of the present value of debt. The results also show a significant inverse U-shaped relationship between the firm's age and its capital structure. In general, the results support the proposition advocated by the pecking order and trade-off theories.Practical implicationsThe results of this study necessitate formulation of various policy measures that can counter the effects of debt on firms.Originality/valueThe present study is among the earliest to use both the book and market value measures of capital structure. It also uses three proxies for each: total debt, long-term debt and short-term debt. It incorporates earning volatility and cash flow volatility as new independent variables in the model. These variables have not previously been used together with both book and market value measures of capital structure. The study also examines the non-monotonic relationship between firm's age and capital structure using a quadratic regression method. It applies both static panel techniques and dynamic GMM estimation techniques to analyse the data.