The formula for the market value of debt is E((1-(1/(1 + R)^Y))/R) + T/(1 + R)^Y, where E is the annual interest expense, R is the cost of debt, T is the total debt and Y is the average maturity, in years, of the debt. However, calculating the market value of debt can be tricky, because not many firms carry their debt in bond form.
A lot of companies carry debt that is not traded, like loans from a bank. The value of that debt is specified in terms of book value rather than market value. This formula calculates the whole debt as a coupon bond, assuming that the coupon is equal to the interest expense and the maturity is equal to the average maturity of the debt, valued at the current debt cost and weighted at face value.
Therefore, if the company's debt cost is 6 percent, the interest expense is $100 million, the total amount of debt is $2 billion and the average time to maturity is three years, the estimation looks like this: 100((1-1/1.06^3))/0.06) + (2,000/1.06^3). The values here are in millions, so the estimated value comes to roughly $1,946 million dollars. More precise results come from adding all of a company's debt issues separately.