With one of the most heavily trafficked websites in the world and a seemingly cheap share price, Yahoo! (Nasdaq: YHOO) has attracted the attention of several investing gurus, including Carl Icahn and George Soros. But does the company have a wide enough moat to keep competitors at bay for the long haul?

The stuff moats are made of
Warren Buffett coined the term "economic moat" to describe the strength of a company's competitive advantages. Many factors confer short-term competitive advantages, but in his excellent The Little Book That Builds Wealth, Morningstar's Pat Dorsey convincingly argues that only four factors create an enduring economic moat. Let's use Dorsey's criteria to see what Yahoo!'s moat is made of, and just how sustainable it is.

1. Intellectual property rights
Moat-building intellectual property includes intangible assets such as patents, licenses, and brands. Any company can have a brand, but truly moat-widening brands must increase a consumer's willingness to pay for a product.

Moat source: No
If anything, Yahoo!'s brand is a detriment at this point. The company is a distant second to Google (Nasdaq: GOOG) in terms of both search technology and user base, and is now dependent upon Microsoft (Nasdaq: MSFT) to fulfill its search requests.

2. Customer switching costs
Products that are tightly integrated with a customer's business or lifestyle make it difficult for that customer to switch to a competitor's product.

Moat source: Yes
Despite its struggles in search, Yahoo! still has millions of users that depend upon its mail, finance, and fantasy sports websites (including your humble author). These supersticky features ensure that the company retains a respectable market share.

3. The network effect
The value of some services increases in direct proportion to the number of people using them. For example, Facebook offers a much richer experience with 500 million users than it did with a handful of undergraduate dorm-mates.

Moat source: No
While it's true that queries from each new Yahoo! user could incrementally improve the company's search engine, I don't think that's sufficient to support a sustainable economic moat. The average user's Yahoo! experience is not meaningfully improved by each incoming user.

4. Cost advantages
Finally, lower costs can create lasting competitive advantages. The benefits of operational efficiencies and smart processes inevitably erode over time. A truly sustainable cost advantage, like economies of scale or a superior geographic location, simply can't be copied.

Moat source: No
At a market cap of $18 billion, Yahoo! still enjoys operational efficiencies. However, the company is losing talent to the aforementioned Google and Microsoft, as well as upstarts such as Facebook.

Numbers don't lie
To determine whether a company enjoys a sustainable competitive advantage, examine its return on invested capital over time. Returns consistently exceeding a company's cost of capital suggest that it possesses a nice moat. Here's how Yahoo!'s ROIC stacks up next to the competition:

















Source: Capital IQ, a division of Standard & Poor's.

Survey says: Narrow moat!
As you can see, Yahoo!'s ROIC is minuscule -- and it's shrinking, thanks to competent competitors. However, Yahoo! is still the fourth-most trafficked website in the world, and its popular mail, finance, and fantasy sports sites create some serious switching costs. Meanwhile, the search partnership with Microsoft should boost margins, and may help the company win search share back from Google. With $2.7 billion in cash on the balance sheet and significant ownership stakes in Yahoo! Japan and Alibaba, it's not hard to see why Icahn and Soros are shareholders.

Ready to buy?
Not so fast, my Foolish friends! Even if you believe that Yahoo! can widen its narrow moat and fend off the competition, that doesn't automatically make it a smart buy. While competitive advantage is critical, it's also essential for investors to have a strong understanding of a company's management, finances, and valuation -- and to always buy at a significant margin of safety.

You can read all of the Motley Fool Inside Value team's research reports, and see their best buys for new money now, with a 30-day free trial.

Rich Greifner does not own shares of any company mentioned in this article. Google and Microsoft are Motley Fool Inside Value selections. Google is a Motley Fool Rule Breakers recommendation. Motley Fool Options has recommended a diagonal call position on Microsoft. The Fool owns shares of Google and Microsoft. Try any of our Foolish newsletter services free for 30 days. True to its name, The Motley Fool is made up of a motley assortment of writers and analysts, each with a unique perspective; sometimes we agree, sometimes we disagree, but we all believe in the power of learning from each other through our Foolish community. The Motley Fool has a disclosure policy.