We analyze the implications for the pricing of bank loans of the reform of capital regulation known as Basel II. We consider a perfectly competitive market for business loans where, as in the model underlying the internal ratings based (IRB) approach of Basel II, a single risk factor explains the correlation in defaults across firms. Our loan pricing equation implies that low risk firms will achieve reductions in their loan rates by borrowing from banks adopting the IRB approach, while high risk firms will avoid increases in their loan rates by borrowing from banks that adopt the less risk-sensitive standardized approach of Basel II. We also show that only an extremely high social cost of bank failure might justify the proposed IRB capital charges for high risk loans, partly because the margin income from performing loans is not counted as a buffer against credit losses, and we propose a margin income correction for IRB capital requirements.