With Apple's (NASDAQ:AAPL) second-quarter behind it, it's a good time to return to valuation. Also, with the stock nearing its all-time high, it's worth returning to some important questions:

What is the company actually worth?

Are investors who buy shares today getting a good deal?

Can investors who own the stock today expect to get a decent return on their investment over the long haul?

What exactly is the intrinsic value of Apple stock?

Let's find out.

Searching for a moat

Before attempting to value any company, it's important to first decide if its business looks sustainable in the first place. Without durability, buy-and-hold investing is rendered useless. So, does Apple have a sustainable competitive advantage?

Warren Buffett refers to sustainable competitive advantages as economic moats.

"In business, I look for economic castles protected by unbreachable moats," Buffett has said.

The harder it is for competitors to grab a piece of a company's profits, the wider and deeper a company's moat. Common sources of moats include switching costs, network effects, intangible assets, cost advantages, and scale.

In an environment of rapid change, economic moats are even more important when looking at technology stocks. But tech stocks with predictable staying power are few and far between. Fortunately, Apple is one of them, with a number of powerful sources for its moat. Here are some of the most prominent sources for Apple's moat:

Intangible assets: Apple's brand is incredibly powerful, evidenced by the premium prices consumers have paid for its products for decades.

Switching costs: With an incredibly robust ecosystem of competent products that work together seamlessly, the purchase of one Apple product often leads to another. This makes Apple's ecosystem of products "sticky," which makes it difficult to move away to another platform.

Scale: It's difficult for manufacturers to match the quality of Apple products. With basically more money than it needs for research and development and for locking in third-party supplier contracts, Apple can use its scale as an operational competitive advantage.

With a powerful brand, a "sticky" ecosystem of products and services, and operational scale, Apple looks poised to sustain high levels of profitability for years. This makes the stock a prime candidate for valuation.

Apple stock valuation

With top- and bottom-line growth rates having slowed in recent years, a discounted cash flow valuation model is a good fit for Apple stock. After all, the value of every asset is ultimately equal to the present value of discounted cash flows -- and Apple's free cash flow has enough history for us to make reasonable assumptions about the future.

It's fairly easy to create a bullish case for the stock using a discounted cash flow model. If Apple's free cash flow increased by only 3% per year in perpetuity, or at the historical annual rate of inflation, and future cash flow was discounted at a rate of 10%, the fair value of Apple stock is $120.

If you doubt that Apple can grow its future cash flow at 3% annually over the long haul, keep in mind that a discounted cash flow valuation puts for more weight on the free cash flow in the years in the near-term than it does in the years further out. So, if Apple is able to grow its free cash flow in the next five years at more meaningful rates than 3%, yet rates fall below 3% over the longer term -- a similar case could be made.

Further, not all cash flow is created equal. Fortunately, Apple investors know that its free cash flow is prone to create value. Management and the board of directors have historically proven their fiduciary responsibility to shareholders. In recent years, for instance, Apple initiated a dividend and, more importantly, ramped up its repurchases when shares were trading at post-split levels around $60 to $80 -- far below today's levels close to $100.

The company has also been very conservative in the prices it pays to acquire companies, with its acquisition of Beats Electronics for $3 billion as its largest ever. This figure pales in comparison to some of the billion dollar deals made by Apple's smaller peers. And, looking further back, there's no doubt Apple's investments in new products have panned out nicely. So, compared to many other companies, Apple is likely to outperform its peers when it comes to the use of free cash flow.

In a discounted cash flow analysis, conservatism is key. Counting on just 3% annualized growth of free cash flow per year over the long haul, this scenario purposefully underplays the continued potential of Apple's iPhone line and other new products we could see in the coming years. Yet these conservative inputs still yield a fair value estimate of $120 per share for the stock -- or a margin of safety of about 21%.

With such a meaningful margin of safety to a conservative estimate of Apple's fair value, this market leader looks like it will be a rewarding investment for those willing to hold over the long haul. Perhaps Apple's 15.4 price-to-earnings multiple and its 11.9 price-to-free cash flow ratio really are as cheap as they look.

[Editor's note -- Added additional commentary to Apple's Beats acquisition]