Berkshire Hathaway (BRK.A -0.76%) (BRK.B -0.69%) has a tremendous history of success that spans more than a half-century, as seen from its 20% annual compound returns since the 1960s. Competitors often look to emulate the conglomerate, which produces steady cash flows and uses that cash to acquire companies and build a massive stock investment portfolio.

One company that earns comparisons to Berkshire Hathaway is Markel (MKL -1.00%). The specialty insurance company has a business model and investment approach similar to Berkshire's and also boasts a solid track record itself. Here's which one is a better buy today.

The two businesses operate in similar industries

Berkshire Hathaway is renowned for its massive $354 billion investment portfolio. However, there is much more beneath the surface. Berkshire owns numerous companies privately, including insurance, railroads, energy, and manufacturing companies. These subsidiaries are a significant source of cash flow for the conglomerate, which is why its investment portfolio has grown to such a massive scale today.

One significant component of Berkshire's success is the various insurance companies under its umbrella. Insurance companies appeal to investors like Chief Executive Officer Warren Buffett because of their robust cash flows and ability to grow during extended periods of economic expansion and during times when inflation is high. These products are always in demand, and the collect-now, pay-later business model means they always have a big pile of cash they can invest for their benefit.

The conglomerate owns several insurance companies, including GEICO, General Re, Berkshire Hathaway Reinsurance, and National Indemnity. One of its recent acquisitions was Alleghany Corp., another "Baby Berkshire" acquired for $11.6 billion in 2022. With $57 billion in written premiums, Berkshire is the second-largest property and casualty (P&C) insurance company in the U.S.

Berkshire's strength is through variety

Berkshire's advantage is its sheer diversity of businesses in different market segments. For example, it owns insurance companies across various specialties, including automotive, property, E&S, and reinsurance, that can help make the business resilient amid changes in the industry.

Along with its insurance operations, it owns companies in the railroad industry, manufacturing, service, and retail, and is also increasing its energy holdings through its purchases of shares in Occidental Petroleum. This diversity across various businesses is a big part of Berkshire's success in different market environments and is why it continues to build its cash stockpile.

Markel has this advantage over Berkshire Hathaway

Markel also is an insurance company, but it specializes in hard-to-place risks other insurers won't touch. The company operates in a niche segment of the P&C market called excess and surplus (E&S) insurance. These insurance policies fall outside what traditional insurers cover and face less stringent regulations. Because of this, it can focus on specific types of policies in which it has a strong expertise.

In some ways, Markel has an edge over Berkshire Hathaway because its focus on E&S insurance can produce higher profit margins when the conditions are right. For example, the last several years have featured so-called hard market conditions.

In a hard market, competition dwindles, and insurers have more flexibility to raise customer prices. E&S insurers, like Markel, benefit more than traditional ones because they have more flexibility to raise prices (regulations are less stringent) and can focus on those policies that produce the highest margins.

Comparing the two companies' valuation metrics

One important thing to consider when comparing the two stocks is their valuations. If one company were to trade at a significant discount versus another, it could mean there is more opportunity for future multiple expansion and share prices gains.

In the case of Berkshire Hathaway and Markel, the two companies trade around similar valuations. Markel is valued at about 2 times tangible book value (TBV), a slight premium compared to Berkshire's 1.9 times TBV. Berkshire's price-to-earnings ratio (P/E) of 10.24 slightly edges out Markel's 10.06, and it's slightly more expensive on a one-year forward earnings basis too. However, the valuations between the two stocks aren't significant enough to give an edge to one over another.

BRK.B Price to Tangible Book Value Chart

 Data source: YCharts

Final verdict (it's a close one)

Berkshire Hathaway's and Markel's stocks have produced stellar returns over the long haul that are surprisingly similar. Since 2000, Berkshire's total return of 880% edged out Markel's 805% return. Both trounced the S&P 500 index, which returned 374% over the same period.

SPY Total Return Level Chart

Data source: YCharts

At the end of the day, Berkshire Hathaway and Markel are two solid companies that investors can confidently hold in their portfolios. They both delivered market-beating returns over the long haul and have substantial insurance businesses and other investments that provide steady cash flows over time.

If I had to pick one today, I'd give a slight edge to Berkshire Hathaway. The conglomerate has repurchased $71 billion worth of stock during the past five years, which improves critical metrics like earnings per share and provides support to the stock price. Even after that, its cash pile of $157 billion keeps growing, putting the company in an excellent position to put it to work in high-quality investments when the time is right.