With nearly $145 billion in cash on the books, Apple (AAPL -0.81%) shouldn't have problems paying bills any time soon. That's particularly important considering the Mac maker's recent announcement to tap the debt markets in order to fund its ambitious capital return program while leaving foreign cash untouched.

Any company seeking to raise debt capital will inevitably turn to the three major credit rating agencies for their respective seals of approval. S&P and Moody's have assigned ratings, while Fitch has yet to publicly release a finalized rating. Here are the two ratings that Apple has officially earned thus far.

Rating Agency

Apple Credit Rating

Outlook

S&P

AA+

Stable

Moody's

Aa1

Stable

Sources: S&P and Moody's.

These are both below the credit ratings that longtime rival Microsoft (MSFT -0.66%) has fetched.

Rating Agency

Microsoft Credit Rating

Outlook

S&P

AAA

Stable

Moody's

Aaa

Stable

Sources: S&P and Moody's.

Microsoft earns the highest rankings from both, while Apple gets the second-best ratings. This is despite the fact that Apple has far more cash and Microsoft's core PC business is under fire. Both companies have the majority of their cash positions locked away abroad.

Source: SEC filings. Cash and investments as of the end of March.

It's also worth pointing out that Microsoft's net cash position is lower because it already has $14.2 billion in long-term debt, of which $2.2 billion is current. As it turns out, both Microsoft and Apple have recently filed prospectuses for upcoming debt offerings, which include each company's calculations of certain credit-related metrics.

For example, the ratio of earnings to fixed charges helps credit investors assess how well profitability can cover fixed costs like interest expenses. Apple's is soaring while Microsoft's is dropping:

Source: SEC filings. Fiscal years ending June (Microsoft) and September (Apple) shown.

The ratings agencies are more concerned with long-term revenue stability, so although Apple's flying high right now in terms of its total cash position and earnings growth, other consumer hardware companies have fallen from similarly strong positions.

Since Microsoft generates a large portion of its revenue from recurring enterprise contracts associated with high switching costs, the agencies tend to give the software giant more credibility.

When considering the current figures, Microsoft's higher credit rating may not make much sense, but remember these are the same agencies that were getting paid to slap AAA ratings on collateralized mortgage obligations that imploded not so long ago.