Warren Buffett’s most commonly referenced piece of advice is to buy a good business with a large moat at a fair price and hold it forever. This is easier said than done as in today’s complex world, moats become stronger and weaker at the same time.

A moat, or an economic moat, is a term coined by Buffett that refers to a company’s competitive advantage over similar companies competing in the same industry without which there is little to prevent a company’s competitors from stealing market share.

Big companies create moats to push away the competition, but often those moats aren’t profitable and companies eventually weaken under the pressure of slower growth and no profits. By analyzing a few examples in various sectors, we’ll find evidence of what makes a company a successful moat builder as that company is the one you’ll want to have in your portfolio.

Examples of Companies With Seemingly Huge Moats

Nike Inc. (NYSE: NKE) is a perfect example of a brand with a moat. It has a market share of more than 50% in the U.S. when including the Converse and Jordan brands. Also, as it is the largest sports footwear company in the world, it can afford to spend 10% of its revenue per year to strengthen its moat.

Nike spent $3.27 billion for demand creation in fiscal 2016, $3.21 billion in 2015, and $3.01 billion in 2014. Due to its large gross margins of 46%, Nike can afford to spend such an amount on marketing and further strengthen its leadership position without compromising its net profit margin of around 11.6%.

Smaller companies—like Under Armour Inc. (NYSE: UA)—have similar expense distributions, but total selling and administrative expenses of $1.5 billion can never be a match to Nike’s selling and administrative expenses of $10.5 billion. Another Nike competitor, Adidas, has to spend 43% of its revenue on selling and administrative expenses only to try to keep up resulting in a net profit margin of only 3.7%.

As investors, we have to ask ourselves “what is that we don’t know?” What could take Nike off the throne?

With its strong marketing, Nike has managed to survive the various scandals of the athletes it sponsors—like those of Maria Sharapova, Oscar Pistorius, Lance Armstrong, and Marion Jones—unscathed, seemingly reinforcing its position in the process. Competitors don’t have the opportunity to take advantage of these scandals as spending more on advertising isn’t an option. In Adidas’ case, if it spent a mere $0.6 billion more on advertising, it would make the company unprofitable.

But risks can come from consumers saying “let’s try something else,” or by a large number of new competitors, attracted by the 48% gross margins, entering the market. This isn’t likely to happen soon, but investors have to keep their eyes wide open. If you start to see more Under Armour or Adidas logos walking around than Nike logos, then it’s time to sell Nike.

Two companies that have seen their formerly large moats slowly erode in the last few years are McDonald’s (NYSE: MCD) and The Coca-Cola Company (NYSE: KO).

Both companies’ slow declines stems from the trend of healthy eating which came on somewhat suddenly and impacted both companies around the same time. MCD saw its first revenue decline not related to a recession in 2014, while KO’s revenue decline started in 2012. The threat of the demand for healthy food, and increased restaurant competition, lowered sales and made both KO and MCD underperform the S&P 500 by large margins despite being considered as companies with big moats.

In closing

Moats have always been and will always be elusive as we can easily misidentify them. But investing the necessary time and research to find companies that have or are building a strong moat can lead to extraordinary returns.In a world of computers and complex analyses of financial statements, maybe the best question to ask yourself is if you will continue to use a product or service even after a competitor comes to market at a lower cost. If the answer is yes and the valuation is fair, you shouldn’t think twice about making that company a part of your portfolio.