On Tuesday, Warren Buffett's Berkshire Hathaway (BRK.A -0.77%) (BRK.B -0.99%) was set to become the sixth-largest external investor in Goldman Sachs (GS -1.01%) by grabbing a stake in the banking giant worth around $2.15 billion.

Oh, and did I mention Buffett scored the position for free?

You read that correctly
That's right. For his mammoth stake in Goldman Sachs, Buffett paid absolutely nothing.

Of course, this shouldn't have come as any big surprise considering fellow Fool Alex Dumortier highlighted the terms of the deal back in March.

Specifically, this week's winnings stem from warrants Buffett received way back during the height of the financial crisis in 2008, when he came to Goldman's rescue by committing $5 billion to purchase preferred stock in the distressed company. Incidentally, that $5 billion purchase also came with a solid 10% annual dividend, which Buffett enjoyed for three years before Goldman was allowed to repurchase the position in 2011.

But even then, the original warrants remained, giving Buffett the right to buy 43.5 million shares of Goldman at a strike price of $115 up until yesterday, Oct. 1, 2013. That was, at least, until last March, when Buffett and Goldman revised the terms of the deal, giving Buffett the option of receiving shares equal in value to the difference between the average closing price during the 10 days prior to October 1 and the $115 strike price multiplied by 43.5 million.

As a result, based on the 10-day average closing price of $164.38, some quick arithmetic shows us Berkshire is entitled to a 2.91% stake in Goldman worth roughly $2.148 billion, or around 13.1 million shares.

To put that into perspective, if this had happened in time to make it into Berkshire Hathaway's second-quarter 13F SEC filing in August, it would have been enough to secure Goldman's spot as Berkshire Hathaway's ninth-largest investment, just ahead of its $1.8 billion stake in DaVita HealthCare Partners and behind the roughly $2.2 billion position in DIRECTV.

Here's what it all means
But just because Buffett didn't pay anything for his investment in Goldman -- other than bailing the company out five years ago on ridiculously favorable terms -- doesn't mean he isn't planning on holding it for the long term.

After all, Buffett hinted at his long-term intentions back in March when the terms were revised when he said:

We intend to hold a significant investment in Goldman Sachs, a firm that I did my first transaction with more than 50 years ago. I have been privileged to have known and admired Goldman's executive leadership team since my first meeting with Sidney Weinberg in 1940.

To be sure, the original warrant terms would have required an even bigger commitment in the form of a $5 billion payment to Goldman for those 43.5 million shares, which would have instantly been worth just under $7 billion based on Tuesday's closing price of $159 per share. And Buffett would have been a fool (with a lower-case "f") not to take that deal if it were his only choice.

At the same time, however, note the new terms essentially achieve the same effect for Buffett from a profit standpoint, only without the added financial outlay. As a result, you can bet he'll have little trouble finding a good place to put that extra capital to work, even despite his recent assertion that he's having a hard time finding bargains in today's market.

Come to think of it, that may have already happened. Remember, fellow Fool Matt Koppenheffer astutely noted back in August that Berkshire's most recent 13F also included some curious language that indicates Buffett may have started building a large position in some mysterious, yet-to-be-disclosed investment during the second quarter.

If that's the case, and noting Buffett typically likes to keep at least $20 billion in cash reserves on Berkshire's books out of caution, it would certainly go a long way toward explaining why Buffett and Goldman struck their revised deal.

In the end, though, regardless of why it happened, this underscores just how good Buffett is at what he does. So rejoice, Berkshire shareholders, because I'm convinced you've got the best investor in the world on your side.