Getty Images

Apple had a field day with its first debt offering since 1996.

Investors hungrily gobbled up $17 billion in Apple bonds, the largest offering in corporate history. The proceeds will be used to help fund the company's ambitious plan to return value to shareholders through share repurchases and dividend payouts.

The bond sale comes on the heels of Apple's plans to double its capital return program, which involves spending an additional $55 billion in dividend payments to investors. Apple also said it would be spending an extra $50 billion in repurchasing company stock along with increasing its quarterly dividend.

The bond offering was split up into six parts with varying maturity dates. Apple benefited from historically low interest rates, which are set by the U.S. Treasury.

Apple brings a little cool -- and stability -- to the bond market. The company's debt is considered safe because of its cash hoard, which it said grew to $145 billion in the last quarter. Of that total, roughly $100 billion is held overseas, and Apple would have to pay a hefty tax to bring it back into the U.S.

As such, it is more cost-effective to offer debt when the interest rate is so low.

The last time Apple issued any sort of debt was in 1996, when the company's future was quite uncertain. The plan then was for $573 million in notes that could be converted into Apple stock at a fixed price.

Apple's stock has been on the mend for the past week, closing higher for the past seven days of trading, bringing it back to levels recorded near the end of March.

Shares in Apple inched up 0.6 percent to $442.78 in premarket trading on Wednesday.