After a 40% rise over the last 18 months, Google (Nasdaq: GOOG) has certainly rewarded investors. 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 Google's moat is made of, and just how sustainable it is.

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

Moat source: YES
Google's brand is so strong that it has become synonymous with Internet search. Even though Microsoft (Nasdaq: MSFT) is willing and able to spend billions of dollars to support its Bing search engine, Google is the undisputed market leader, with a 71% share.

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: Slight
It's not terribly difficult to switch search providers -- that's why Google is dedicated to developing applications that are far stickier, like Gmail.

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: YES
Every search query allows Google to enhance its search algorithm, which leads to more relevant results, which leads to more searches. It's a beautiful virtuous circle that benefits every participant in the Google network.

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: YES
As the 800-pound gorilla of Internet search, Google enjoys advantages in attracting advertising customers and recruiting new talent. Meanwhile, Google's technological moat is supported by the massive scale of its server farms and data centers.

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

















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

Survey says: Wide moat!
For a company in a constantly evolving industry, Google has a surprisingly sustainable series of competitive advantages over its peers.

Ready to buy?
Not so fast, my Foolish friends! Although we've demonstrated that Google has an attractive moat, 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.

That's the strategy our team at Motley Fool Inside Value employs. You can read all of the team's research reports, and see its 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 recommendations. Google is a Motley Fool Rule Breakers pick. Motley Fool Options has recommended a diagonal call position on Microsoft. The Fool owns shares of Google. Try any of our Foolish newsletter services free for 30 days. The Motley Fool has a disclosure policy.