When it comes to credit cards, Mastercard (MA -0.01%) and Visa (V 0.10%) stand head and shoulders above the competition. With the explosive growth in electronic payments across the globe, both Mastercard and Visa have worked hard to stay at the forefront of their industry and to ensure that they don't lose relevance as consumers increasingly rely on mobile devices and alternative payment systems to spend money.

Investors have been quite happy with Visa and Mastercard, and even some of their upstart competitors have realized that plastic cards can be valuable assets in their efforts to gain market share. But after big gains, some investors wonder whether these stocks still have room to run. Below, we'll look at Mastercard and Visa to see which one might be a smarter pick for those looking to buy shares now.

Pile of four credit cards.

Image source: Getty Images.

Valuation and stock performance

Mastercard and Visa have dramatically outpaced the market's gains. Mastercard shares have the edge, jumping nearly 60% since October 2017. But Visa hasn't been too much of a slacker, posting a 45% gain over the same period.

As you might expect, the two stocks look pretty pricey on a valuation basis after their recent run-ups. Using recent earnings, Visa's trailing multiple looks more attractive at 37, compared with Mastercard's figure of more than 50 times trailing earnings. Yet when you incorporate near-term earnings projections, the gap narrows substantially. Visa still has the edge, trading at 28 times forward earnings, but Mastercard isn't far behind with its forward multiple of 30. Mastercard's strong momentum balances out its slightly more expensive share price, making the two stocks a dead heat on this set of metrics.

Dividends and capital allocation

One area in which neither Mastercard nor Visa has excelled is with dividends. Visa has sustained a yield of 0.6%, but Mastercard's dividend yield has fallen below 0.5%. Both are pathetic dividend payers compared with the market average of closer to 2%.

Neither have been in a huge hurry to increase yields. Mastercard raised its payout by 14% late last year, while Visa made increases in both the fourth quarter of 2017 and the first quarter of 2018, of 18% and 8% each. Yet the fact that those increases have lagged so far behind the stock has only exacerbated the dividend yield issues.

To be fair, both Mastercard and Visa have been good about buying back stock to return capital to shareholders. Yet for those who value income, neither Mastercard nor Visa really distinguishes itself as an attractive stock from a dividend perspective.

Growth prospects and risks

Both Mastercard and Visa have succeeded in defending their businesses from upstart competition and are working hard to gain edges over each other. For instance, Mastercard's latest quarter featured a 14% jump in payment volume, with the number of transactions it processed rising by 17%. In particular, international payment volume was higher by 16%, as cross-border transactions have become a lot more popular. Mastercard has done a good job historically of taking full advantage of its foreign opportunities, and the card-network giant gets substantial fee income from cross-border activity. Between smart moves to distinguish its payment services and features that include greater security, analysis of data, and management of loyalty programs, Mastercard hopes to meet more of its customers' needs going forward.

Visa has also seen great success. In its most recent quarter, payment volume climbed 11%, helping to produce a 12% gain in processed transactions. Visa has 3.28 billion cards outstanding, which is still well ahead of Mastercard's roughly 2.44 billion. Revenue from data processing and services was up at an even stronger pace than the rest of its business, and Visa was able to match Mastercard's 16% rise in international transaction revenue. Those who favor the stock note that Visa has done an excellent job of retaining loyalty among its core customer base, even as rivals do everything in their power to lure Visa customers away.

Think global

If you forced me to pick one of these card giants, Mastercard would be my choice. It has demonstrated a stronger commitment to international markets, where I think most of the two companies' growth prospects are. However, Visa is also a strong pick, and either of these companies would make a good stock to include in a well-balanced portfolio.