In this study, the optimal value of a tax on capital inflows is estimated so that private agents internalize the social costs of their borrowing decisions in an economy with financial constraints. A key feature of our model is that we provide a theoretical foundation to tax level differentiation by asset volatility. Using Colombian data for the 1996–2011 period (which includes the crisis of 1998–1999), we find the tax would be around 1.2 %. Copyright Springer Science+Business Media New York 2015