There have been times when the winner of a competition between these two would have been a no-brainer: eBay (EBAY -1.59%) was the unquestioned king in online reselling, while Overstock.com (BYON 1.32%) was perennially floundering. But times have changed: After it spun off PayPal, eBay lost its major growth hook -- and Overstock now trades for just a fraction of its total sales.

Does that mean that the adventurous investor should root for the underdog in Overstock? Let's take emotion out of the equation and look at these companies through three different lenses to see which is the better bet.

Financial fortitude

We might love it when we see companies in our portfolios investing lots of cash in growth. But at the end of the day, there's nothing more freeing than money in the bank -- and nothing more debilitating than mandatory debt payments.

When a company has lots of cash on hand, it can turn economic downturns into golden opportunities for buying back its stock, outspending rivals, and even making strategic acquisitions. Debt, on the other hand, has the opposite effect -- spending has to be cut back, market share is usually lost, and companies sometimes go bankrupt.

Here's how these two measure up in terms of their financial fortitude.

Company

Cash

Debt

Net Income

FCF

Overstock

$128 M

$20 M

$13.1 M

($9.4 M)

eBay

$6.1 B

$6.8 B

$1.67 B

$2.99 B

FCF=Free cash flow. Both net income and FCF are based on trailing 12 months. Data sources: Yahoo! Finance and SEC filings.

While Overstock definitely has a better cash-to-debt ratio, eBay is unquestionably in a better financial position. Though debt roughly exceeds cash on hand at eBay, the company was a veritable cash machine over the past 12 months, generating almost $3 billion in FCF.

While Overstock's current cash-debt situation looks positive, it will only remain that way for so long before negative FCF starts to catch up with the company.

Winner = eBay

Valuation

There are lots of ways to measure a company's price tag. Below are four of my favorites.

Company

P/E

P/S

P/FCF

PEG Ratio

Overstock

28

0.23

N/A

0.44

eBay

13

3.31

9

2.93

Non-GAAP earnings used to compute P/E. Data sources: Yahoo! Finance, YCharts, E*Trade.

It is here that we get a confounding picture. eBay is a very strong business, valued at just nine times trailing FCF. Overstock is a struggling/recovering e-commerce site with no FCF to speak of and a P/E ratio over twice as high as eBay's.

And yet, according to each company's PEG ratio, Overstock is clearly the better buy. This is likely because Overstock is in the beginning of a long-overdue turnaround, while eBay has essentially saturated its key markets. People aren't expecting much from eBay -- other than continuing to rake in the cash and likely offer a combination of buybacks and an eventual dividend.

Overstock, on the other hand, could see its stock skyrocket if it experiences a serious turnaround. Last quarter alone, earnings increased from $0.10 to $0.54. With such negative expectations already baked into the stock, I give Overstock a slight win here.

Winner = Overstock.com

Sustainable competitive advantages

Finally, we come to what is likely the most important factor to evaluate. While no advantage is truly sustainable forever, the strength of one's moat is the key definer of how the business will do over the decades.

For Overstock, the distinct advantage the company has is in its ability to buy extra inventory from companies and sell them cheap—with, as an e-commerce operator—low overhead. The problem is that the company's distribution channels and customer service are awful. If a competitor wanted to, they could likely unseat Overstock in short order. The fact that nobody has entered the field says a lot about the lack of potential that competitors see in it.

eBay, on the other hand, benefits from one of the greatest advantages known in the business world: the network effect. With each additional seller joining eBay, buyers have added incentive to go to the site to make purchases, which makes it more enticing for sellers to join -- and so on. It's a virtuous cycle, and it makes eBay an easy winner in this category.

Winner = eBay

So there you have it: Though Overstock is priced with tons of pessimism baked in, it still can't unseat eBay, its stable business, and its copious amounts of free cash flow.