For much of the past decade, Bank of America (NYSE:BAC) found itself in the shadows of Wells Fargo (NYSE:WFC), which emerged from the financial crisis in a powerful competitive position after avoiding the worst excesses of the subprime mortgage bubble.

But Wells Fargo's advantage is beginning to wane.

Looking up at the Bank of America Plaza in Los Angeles, California.

Looking up at the Bank of America Plaza in Los Angeles, California. Image source: Getty Images.

The clearest place you can see this is in a comparison of the two banks' efficiency ratios. As the name implies, this metric is designed to communicate how efficiently a bank generates revenue -- in other words, how much it costs the bank to do so.

To calculate the efficiency ratio, you divide a bank's operating expenses by its net revenue. The quotient in Bank of America's case was 59.5% in the three months ended Sept. 30. This means that the Charlotte, North Carolina-based bank spent 0.595 cents out of every dollar of revenue to operate in the third quarter.

For years, Wells Fargo had one of the lowest efficiency ratios in the industry, especially among megabanks such as JPMorgan Chase, Bank of America, and Citigroup. It routinely came in comfortably below 60%, which is a common industry benchmark that delineates between the best-run banks and the rest.

Efficiency ratios:

Bank

Q3 2017

Q2 2017

Q1 2017

Q4 2016

Q3 2016

Q2 2016

Wells Fargo

65.5%

61.1%

62.7%

61.2%

59.4%

58.7%

Bank of America

59.5%

59.5%

66.2%

65.1%

61.7%

 

Data source: Wells Fargo, Bank of America.

Bank of America has had the opposite problem over much of the past decade. Liability incurred in its credit card division and from its 2008 acquisition of Countrywide Financial, which played the leading role among now-defunct subprime mortgage originators in the housing bubble preceding the crisis, added up to somewhere around $200 billion. Only four banks even have that much shareholders' equity.

The net result is that Bank of America spent the eight years after the financial crisis absorbing very elevated costs. Its efficiency ratio for years was above 70%.

But the tides have turned.

Over two consecutive quarters, Bank of America's efficiency ratio has been lower than Wells Fargo's. Had you told a bank analyst two years ago that this was going to happen, they would have thought you had gone clinically insane.

But that in fact was the case again in the third quarter.

As I already said, Bank of America's efficiency ratio was 59.5%. Wells Fargo's was 65.5%.

The catalyst for the ascent in Wells Fargo's efficiency ratio is its fake-account scandal, which came to light in September 2016. It's led to higher expenses in the form of legal and other types of professional fees. It also seems to be weighing on the bank's revenue, which was the only one of the big four not to grow last quarter.

In short, while it's obvious in hindsight why Bank of America's efficiency ratio has come in below Wells Fargo's for two consecutive quarters now, this would have been hard to imagine two years ago.

John Maxfield owns shares of Bank of America and Wells Fargo. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.