Yield to Maturity (YTM) is the total return anticipated on a bond if the bond is held until it matures. Unlike the coupon rate, which is fixed relative to the par value, YTM accounts for the bond's current market price, the time remaining until maturity, and the difference between the purchase price and the face value.
The YTM Formula (Approximation)
While the exact YTM is usually found using trial and error or financial software, the following approximation formula is widely used for quick calculations:
YTM ≈ [C + (F – P) / n] / [(F + P) / 2]
C = Annual Coupon Payment (Face Value × Coupon Rate)
F = Face Value (usually $1,000)
P = Current Market Price
n = Years to Maturity
Step-by-Step Calculation Example
Let's say you buy a bond with the following characteristics:
Face Value (F): $1,000
Coupon Rate: 6% ($60 per year)
Market Price (P): $920
Years to Maturity (n): 5 years
Calculate Annual Coupon: $1,000 × 0.06 = $60.
Calculate Capital Gain/Loss per Year: ($1,000 – $920) / 5 = $16.
Find Average Price: ($1,000 + $920) / 2 = $960.
Combine: ($60 + $16) / $960 = 0.0791 or 7.91%.
Why YTM Matters
Calculating YTM is essential for comparing bonds with different maturities and coupon rates. If a bond is trading at a discount (Price < Face Value), the YTM will be higher than the coupon rate. If it is trading at a premium (Price > Face Value), the YTM will be lower than the coupon rate.
function calculateYTM() {
var faceValue = parseFloat(document.getElementById('faceValue').value);
var couponRate = parseFloat(document.getElementById('couponRate').value) / 100;
var marketPrice = parseFloat(document.getElementById('marketPrice').value);
var years = parseFloat(document.getElementById('yearsToMaturity').value);
if (isNaN(faceValue) || isNaN(couponRate) || isNaN(marketPrice) || isNaN(years) || years <= 0) {
alert("Please enter valid positive numbers for all fields.");
return;
}
// Calculation logic
var annualCoupon = faceValue * couponRate;
// YTM Approximation Formula: [C + (F – P) / n] / [(F + P) / 2]
var numerator = annualCoupon + ((faceValue – marketPrice) / years);
var denominator = (faceValue + marketPrice) / 2;
var ytm = (numerator / denominator) * 100;
var currentYield = (annualCoupon / marketPrice) * 100;
// Display results
document.getElementById('resYTM').innerHTML = ytm.toFixed(2) + "%";
document.getElementById('resCoupon').innerHTML = "$" + annualCoupon.toFixed(2);
document.getElementById('resCurrentYield').innerHTML = currentYield.toFixed(2) + "%";
var interpretation = "";
if (marketPrice faceValue) {
interpretation = "This bond is trading at a premium. Because you are paying more than the face value, your Yield to Maturity (" + ytm.toFixed(2) + "%) is lower than the coupon rate (" + (couponRate * 100).toFixed(2) + "%).";
} else {
interpretation = "This bond is trading at par. Your YTM is equal to the coupon rate.";
}
document.getElementById('ytmInterpretation').innerHTML = interpretation;
document.getElementById('ytm-results').style.display = "block";
}