Dividend stocks outperform non-dividend-paying stocks over the long run. It happens in good markets and bad, and the benefit of dividends can be quite striking -- dividend payments have made up about 40% of the market's average annual return from 1936 to the present day.

But few of us can invest in every single dividend-paying stock on the market, and even if we could, we're likely to find better gains by being selective. Today, two of the world's largest software companies will square off in a head-to-head battle to determine which offers a better dividend for your portfolio.

Tale of the tape
Founded by Bill Gates and Paul Allen in 1975, Microsoft (NASDAQ:MSFT) is the world's largest software company, but it's hardly just a software company. In addition to its PC-dominant Windows operating systems and Office productivity software, Microsoft also has massive cloud operations, sells millions of game consoles, and is also a small (but ambitious) force in mobile. Microsoft became the face of the dot-com boom in the 1990s, and it's still ranked among the world's top 10 most valuable companies despite being less than half as valuable today as it was at its 1999 peak.

Headquartered in Redwood Shores, Calif., Oracle (NYSE:ORCL) is right behind Microsoft in terms of software leadership, as it's the second- largest software maker by revenue. Oracle serves more than 380,000 customers -- including all of the Fortune 100 companies -- in more than 145 countries around the world. In 2010, Oracle acquired Sun Microsystems, which transformed Oracle from software maker into a manufacturer of both software and hardware with a massive online presence, thanks to Sun's Java programming language.

Statistic

Microsoft

Oracle

Market cap

$292.3 billion

$149.9 billion

P/E ratio

13.5

14.2

Trailing 12-month profit margin

28.1%

29.7%

TTM free cash flow margin*

31.6%

38%

Five-year total return 

35%

32.9%

Source: Morningstar and YCharts.
*Free cash flow margin is free cash flow divided by revenue for the trailing 12 months.

Round one: endurance (dividend-paying streak)
According to Dividata, Microsoft has been paying dividends since 2003, for a 10-year payout streak, although its payouts were biannual before switching to quarterly distributions in 2005. This is an easy win for Microsoft over Oracle, as the latter only began paying dividends in 2009.

Winner: Microsoft, 1-0.

Round two: stability (dividend-raising streak)
Microsoft avoided raising its payout in 2009 because of the global financial crisis, which means that its current streak of boosts is barely three years old. However, Oracle has only been raising its payouts annually since 2011, so this looks like a narrow win for Microsoft.

Winner: Microsoft, 2-0.

Round three: power (dividend yield)
Some dividends are enticing, but others are merely tokens that barely affect an investor's decision. Have our two companies sustained strong yields over time? Let's take a look.

MSFT Dividend Yield (TTM) Chart

MSFT Dividend Yield (TTM) data by YCharts

Winner: Microsoft, 3-0.

Round four: strength (recent dividend growth)
A stock's yield can stay high without much effort if its share price doesn't budge, so let's look at the growth in payouts over the past five years.

MSFT Dividend Chart

MSFT Dividend data by YCharts

Winner: Oracle, 1-3.

Round five: flexibility (free cash flow payout ratio)
A company that pays out too much of its free cash flow in dividends could be at risk of a cutback, particularly if business weakens. We want to see sustainable payouts, so lower is better:

MSFT Cash Dividend Payout Ratio TTM Chart

MSFT Cash Dividend Payout Ratio TTM data by YCharts

Winner: Oracle, 2-3.

Bonus round: opportunities and threats
Microsoft won the best-of-five on the basis of its history, but investors should never base their decisions on past performance alone. Tomorrow might bring a far different business environment, so it's important to also examine each company's potential, whether it happens to be nearly boundless or constrained too tightly for growth.

Microsoft opportunities

Oracle opportunities

Microsoft threats

Oracle threats

One dividend to rule them all
In this writer's humble opinion, it seems that Oracle has a better shot at long-term outperformance, as it is less reliant on any particular computing platform than Microsoft. On the other hand, Microsoft remains far larger and won't give up the mobile space without a fight -- but by the time it claims a beachhead, Oracle will probably be there already, helping businesses around the world from their tablets. You might disagree, and if so, you're encouraged to share your viewpoint in the comments below. No dividend is completely perfect, but some are bound to produce better results than others. Keep your eyes open -- you never know where you might find the next great dividend stock!

Fool contributor Alex Planes has no position in any stocks mentioned. The Motley Fool recommends Google, NetSuite, and salesforce.com and owns shares of Google, Microsoft, and Oracle.. Try any of our Foolish newsletter services free for 30 days. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.