An individual bank can put the whole banking system at risk if its losses in response to shocks push losses for the system as a whole above a critical threshold. This paper outlines a methodology for determining the contribution of banks to this form of systemic risk. Our approach utilizes a generalization of the Shapley value in which the order of bank failures in response to a shock depends on the composition of the banks' asset portfolios and capital buffers. We show how changes in these factors affect banks' contributions to systemic risk taking into account interbank contagion. Finally, we examine the extent to which banks' contributions depend on the level of the critical threshold for a systemic event.