The risk-free rate is usually based on United States Treasury bills, notes and bonds, because it is assumed that the U.S. government will never default on its debt obligations. Credit-adjusting the risk-free rate means adding to the Treasury rates some amount of additional interest-rate basis points to reflect the fact that companies might default on their debt obligations. Determining how much to add involves observing market data, such as the pricing of corporate debt and the pricing of credit default swaps, to see how much added risk is assumed.
Build a spreadsheet of the risk-free rate at different points in time. Use interest rates that are clearly observable in the markets, from overnight rates all the way out to the 30 year Treasury bond. Not every month and year's data will be available, so a process of interpolation can be used to fill in the blanks. This is not perfect, but is usually close enough for most purposes.
Analyze market data. Research the interest rates that are priced in the market for different kinds of corporate debt, based upon their Standard & Poor’s or Moody’s credit ratings. The better the rating, the less that the interest rate will be priced above the risk-free rate for that particular debt tenor.
Build a table that shows the credit default swaps for different periods of time for various companies. Credit default swaps are insurance swaps that pay when a borrower defaults on its debt. They are usually measured in terms of basis points and generally increase gradually over time as the risk of default increases. The better the credit standing, the lower the credit default spreads will be above Treasury interest rates.
Combine the data assembled in Steps 2 and 3 to make a matrix. The top line should be measured in time going forward, in months or years. The left-hand side will be credit quality as measured in terms of debt ratings. Average out the basis points above comparable Treasury rates from the debt ratings and credit default swaps to complete the matrix.
Build another table that adds the basis points above the Treasury rates to the Treasury rates. This should make a clear spreadsheet illustration of the credit-adjusted risk-free rates at different points in time for different levels of risk.