In the past 40 years, shares of Berkshire Hathaway (BRK.A -0.76%) (BRK.B -0.69%) have soared 6,140%. This gain trounces that of the S&P 500, even if we include dividends. 

As a result of this outsized performance, especially over such an extended period of time, investors might be looking at the conglomerate, which is headed by legendary capital allocator Warren Buffett, as a worthy stock to buy for the long haul. 

But before doing that, it's a smart idea to learn more about the business. Here are three things you need to know about Berkshire Hathaway. 

Key business segments 

Berkshire went from a textile manufacturer to now being one of the most diverse and valuable corporations on Earth. These days, the company has its hands in insurance, most notably with GEICO. With Burlington Northern Santa Fe, it has exposure in the railroad industry. Additionally, there are holdings in energy and utilities, real estate brokerages, industrial and building products, consumer products, apparel, and various retail operations, like Pilot Travel Centers and Dairy Queen. 

You could make a valid argument that Berkshire is simply a microcosm of the U.S. economy. However, the difference is that Berkshire is focused on what Buffett believes are great businesses. Even though these key operating segments might seem boring, they generate lots of cash, an attractive trait that has kept shareholders happy over the years. 

Besides those wholly owned subsidiaries, Berkshire has a gargantuan public equities portfolio as well. As of this writing, its market value is a whopping $343 billion, which equates to 46% of the entire company's market capitalization. 

While there are numerous stocks, Apple is by far the biggest, representing 47% of the portfolio. This means that about 22% of Berkshire's market value is derived from the FAANG stock. Investors can't ignore this reality. 

Other large holdings include Bank of America, American Express, and Coca-Cola. 

Buffett's philosophy 

Berkshire's 40-year (and even longer) track record of returns is certainly impressive, but it hasn't been as spectacular in more recent times. In just the past decade, Berkshire's stock has climbed 196%, a gain that actually lags the S&P 500's total return. 

Some naysayers might point to Berkshire's huge size as a hindrance to future returns. Others might call out Buffett as having lost his magic touch. 

If we look at the last three years only, Berkshire's return has doubled the total return of the broader index. So, we can alter the time frame and get totally different results. 

Nonetheless, I think it's worthwhile to understand Buffett's overall investing philosophy. He's in the value camp, searching for competitively advantaged businesses that sell at attractive prices, practicing intense patience to wait for the right opportunity. 

One other important thing people quickly realize is that Buffett won't chase what's hot at the moment. For example, he and Charlie Munger think cryptocurrencies are worthless. This perspective means sticking to what has worked, not being dragged into the hype.

Capital allocation strategy 

As of June 30, Berkshire had $147 billion combined of cash, cash equivalents, and short-term investments on its balance sheet. That's a massive war chest that is definitely dragging down Berkshire's overall returns. 

As I just noted, Buffett is extremely patient. He's not going to lower his bar when it comes to the quality of a potential investment just to make a move and close a deal. When something comes along that piques his interest and checks all the boxes, I'm sure a transaction will be done. 

In the meantime, Berkshire will continue using its cash to repurchase stock. To be clear, this setup is unique because both Buffett and Munger have complete control over when to buy back shares, doing so only when the market price is below what they believe to be the estimated intrinsic value. 

Of course, Berkshire is well known for not paying a dividend, something that likely won't happen anytime soon. The belief is that there are better uses of cash, like reinvesting into existing holdings or buying new companies. 

After learning about these three important aspects of Berkshire's business, investors should be better informed to make smarter decisions with the stock.