We present a stochastic frontier model with random inefficiency parameters which is able to capture the influence of risk-taking on bank efficiency and that distingues those effects among banks with different characteristics. Cost and profit efficiency are found to be over- and underestimated when risk measures are not accurately modeled. We find that more capitalized banks are more cost and profit efficient, while banks assuming more credit risk are less cost efficient but more profit efficient. The magnitude of these effects vary with bank’s size and affiliation. Liquidity is found to affect cost efficiency only for domestic banks. Large and foreign banks benefit more from higher credit and market risk exposures, while small and domestic banks find more advantageous to be more capitalized. We identify some channels that explain these differences and provide insights for macroprudential regulation.