Warren Buffett had a good day.

Apple shares rose 5.9 percent Wednesday, a day after it posted better-than-expected fiscal third-quarter earnings per share of $2.34, beating the $2.18 Thomson Reuters consensus. The company also gave sales guidance above Wall Street expectations for its September quarter.

The Oracle of Omaha's Berkshire Hathaway owned 239.6 million shares of Apple as of the end of March, according to FactSet. With Wednesday's more than 11 point rally in the shares, Buffett's company is up approximately $2.7 billion on its position, assuming it hasn't sold shares since then.

In May, Buffett told CNBC why he favors Apple so much as an investment.

"I clearly like Apple. We buy them to hold," Buffett said on CNBC's "Squawk Box." "We bought about 5 percent of the company. I'd love to own 100 percent of it. ... We like very much the economics of their activities. We like very much the management and the way they think."

Apple shares are up 19 percent year to date through Wednesday versus the S&P 500's 5 percent gain.