The relationship between people and banks has changed dramatically over the past 20 years. Previous generations had strong personal relationships with bankers at physical branch locations in their areas, and over time, Bank of America (BAC -0.13%) has gobbled up countless smaller institutions to become the national behemoth it is today. Younger customers have gravitated toward internet banking, and BofI Holding (AX 2.09%) and its Bank of Internet USA have captured a good deal of the resulting business from those who value better rates above in-person customer service.

With a rising interest-rate environment that's providing a tailwind for banks in both the brick-and-mortar and online worlds, both BofI and B of A are poised to take full advantage. However, both stocks have already posted huge gains, and investors don't want to make a mistake and pick the wrong one after a big run-up. Below, we'll evaluate BofI Holdings and Bank of America using some key metrics that should give more color on how the two compare.

Silver colored bank vault door with vault beyond.

Image source: Getty Images.

Stock performance and valuation

Both BofI Holding and Bank of America have done well for shareholders over the past 12 months, but BofI has done a lot better. Its shares have jumped 73% since May 2017 compared to a 29% gain for B of A's stock.

Investors are used to seeing anything associated with the internet carry an expensive valuation, but that's not the case with BofI. Its trailing earnings multiple is 19, which is actually a bit less than the 20 times trailing earnings at which B of A trades. When you incorporate near-term future earnings estimates, the two bank stocks flip places, but they're still close: Bank of America has a forward earnings multiple of 11 compared to BofI's figure of 12.

One area where there's a huge difference is in price-to-book value. BofI has a stock price approaching three times book value compared to just 1.3 times book for B of A. That gives the megabank a valuation advantage by that measure, but it's also important to note that, without expensive brick-and-mortar assets, book value for BofI has a lot less unnecessary ballast than B of A's numbers. On valuation overall, the two stocks look similar.

Dividends

Many investors look to financial stocks for dividends, but if you like high yields, these aren't the banks you're looking for. BofI pays no dividend at all, and Bank of America has a current dividend yield of just over 1.5%.

Bank of America has had a long road to recovering fully from the financial crisis, and that kept it from making a dividend increase until 2014. Since then, though, the company has boosted its payout from $0.01 per share quarterly to $0.12, and it's entirely possible that further gains could come if earnings continue to benefit from more favorable conditions.

A dividend might not be too far away for BofI Holding. The company has addressed the issue recently in conference calls, with CEO Greg Garrabrants saying that active discussions are ongoing about using available capital to institute a dividend. Yet BofI already uses stock buybacks, and it's likely to continue making repurchases, as well as looking for strategic acquisitions where appropriate. For now, though, B of A is the pick for those who value income.

Growth prospects and risks

Growth has been strong for banks, and both BofI and B of A haven't let the opportunity go. BofI Holding posted impressive results in its fiscal third quarter last month, including a 17% jump in book value and substantial gains for its loan portfolio. Some investors are concerned that BofI's deposit base has shifted away somewhat from higher-margin checking and savings accounts toward higher-cost capital like certificates of deposit, especially because without brick-and-mortar services, BofI doesn't make as much fee-based non-interest income as B of A and other big banks.

Yet internal-return measures generally were favorable, and BofI is making strategic moves to expand in areas like fiduciary services and treasury management. Like many banks, BofI relies on the real estate market for a big portion of its loan portfolio, but so far, there are few signs of slowing in that arena.

Bank of America's first-quarter results were also strong, reflecting the vast array of services and divisions under its corporate umbrella. In basic banking, loans and deposit balances showed solid growth, and internally, B of A's efforts to improve efficiency have resulted in better return metrics.

Bank of America also has extensive exposure to other financial markets through its Merrill Edge brokerage arm and its wealth-management division, and both of those units have seen rising asset levels, as well. Trading revenue remained slightly subdued, although rising market volatility could add to those results in the months to come. With internet and mobile innovation to keep up with internet-only rivals like BofI, Bank of America sees a favorable growth picture ahead.

Better things to come

BofI has tapped into a big trend that likely will continue into the future, while Bank of America has been able to rebound from the financial crisis and find ways to adapt itself to changing conditions within the industry. BofI looks like it has the capacity to be nimbler than Bank of America, but B of A's greater size could give it access to opportunities that the smaller BofI might not find. Whichever bank you pick largely depends on whether you think internet banking is a fad or something that will stay important for decades to come.