The yield on a variable-price loan or bond is calculated using the yield to maturity equation. This equation uses the current market price, the time to maturity of the bond, the payments and the face value of the bond in determining the bond's actual return rate. This equation is commonly used by investment firms to determine whether bonds are a good value in the general market and how to appropriately price the bonds in their inventory.

Subtract the face value (F) of the bond from the current market price (P). For example, if F is $100 and P is $90, then P - F = -$10.

Divide this value by the number of years to maturity (n), as in (F-P)/n. If n = 5, then (F-P)/n = -$2.

Add the interest payment (C) to this value, as in C +(F-P)/n. If C is $5, then C +(F-P)/n = $3.

Divide the combined amount from Step 3 by the price plus face value divided by 2, as in (C +(F-P)/n) / ((F+P)/2). That is, 3 divided by 95 ($100 plus $90 divided by 2) equals .0315789.

The final value from Step 4, multiplied by 100 to get a percentage, is the yield to maturity. Yield to maturity = (C +(F-P)/n) / ((F+P)/2). In the example, the yield to maturity equals 3.158 percent.