Berkshire Hathaway's (BRK.A -0.76%) (BRK.B -0.69%) latest 13F filing revealed that the company sold $7 billion in equities in Q3 -- including its entire stake in Procter & Gamble (PG -0.78%).

P&G has a wide moat, a stable business, and generates a ton of cash. Plus, it's a Dividend King with 67 consecutive years of dividend payments. It sounds like the perfect Buffett stock. But apparently it wasn't.

Let's go through some of the reasons why Berkshire may have sold P&G, but why the company could still be worth buying now.

A child smiles gleefully while riding on the back of an adult as they unload laundry from a drying machine.

Image source: Getty Images.

A bit of housekeeping

Berkshire finished Q2 with 315,400 shares of P&G -- valued at $47.9 million. It sounds like a lot, but the position was less than 0.1% of Berkshire's portfolio.

According to its Q3 13F filing, Berkshire has completely exited the position.

The sale may have just been an effort to consolidate the portfolio a bit. After all, Berkshire also exited other smaller positions, including Johnson & Johnson, Mondelez, United Parcel Service, Celanese, and General Motors. Aside from Celanese and GM, which both made up 0.2% of the public equity portfolio, all the other positions made up less than 0.1%.

A premium valuation

There's a good chance Buffett and his team sold these small holdings simply to consolidate the portfolio. But a better question to ask is why didn't Berkshire buy more P&G in the past or make it a larger position?

The answer may simply come down to valuation. P&G sports a price-to-earnings (P/E) ratio of 24.33, right around the P/E of the S&P 500, which is 24.6. It also has a high price-to-free cash flow (FCF) ratio of 25.5.

PG PE Ratio Chart

PG PE Ratio data by YCharts

And it's not like P&G's P/E ratio of price-to-FCF has been low in the past. Its 10-year median levels are above the market average, which is rare for a low-growth, stodgy dividend stock.

By comparison, Apple (AAPL -0.35%) stock, which has pole-vaulted to 50% of Berkshire's public equity portfolio, was a reasonable valuation for a while. Apple sports a 31.3 P/E ratio today, which may be one of the reasons Berkshire has been holding, not buying Apple. But its 10-year median P/E ratio is 18.

Aside from preferring Apple over other stocks, Berkshire also continues buying back its own stock. Berkshire is known for its public equity holdings. But it has sizable investments in many other companies too, from insurance, finance, energy, utilities, infrastructure, and more.

All told, Berkshire's reasons for not buying more P&G in years past, and its decision to sell the position today, may come down to Buffett and his team preferring other opportunities, including Apple and its own stock.

Why P&G is worth owning

An expensive valuation is far and away the best case against P&G. But it's important to also recognize what P&G does well and why it may be worth a premium price.

At its core, P&G's success stems from its ability to develop brands, as well as to recognize what brands aren't worth developing.

P&G is a cash cow that has proven to have immense pricing power even during this inflationary environment. It has successfully raised prices quarter after quarter. Instead of choosing a less expensive comparable generic brand, the numbers show that consumers are accepting P&G's price hikes. This shows that even in the consumer staples industry, there is an element of brand and pricing power that can give a company like P&G a lever to pull to offset high inflation.

Instead of using its FCF to overly invest in its business, P&G remains disciplined and chooses instead to return the majority of profits to investors through dividends and stock buybacks. In fiscal 2023, P&G spent a staggering $9 billion on dividends and $7.4 billion on buybacks. Over the last 10 years, it has reduced its outstanding share count by 13.1%.

By reducing the share count, buybacks permanently boost earnings per share since there are fewer shares to go around. It's a way for a company to grow its earnings per share in addition to organic growth, which makes a lot of sense for P&G since it is a low-growth company with limited outlets for responsible capital investment.

P&G is a perfect stock for risk-averse investors

P&G's positioning, track record for brand development, recession resilience, and pricing power make it a great company. In addition to those factors, what makes P&G a very good stock is its commitment to shareholders through the dividends and buybacks.

In Berkshire's case, buying back its own stock is perfectly reasonable because it is confident in the strength and valuation of its businesses. But for individual investors, about the only thing not to like about P&G is its valuation. The company checks the rest of the boxes.

P&G remains an excellent choice for folks looking to supplement income in retirement or who are looking for a safe stock so that they can participate in the stock market and collect dividend income, but also reduce the impact that a recession or major sell-off would likely have on their portfolio.