Bond Yield to Maturity Calculator Formula

Understand the math behind the bond yield to maturity calculator. Each variable explained with a worked example.

Formulas Used

Approximate YTM

approx_ytm = current_price > 0 ? ((coupon_payment + (face_value - current_price) / years_to_maturity) / ((face_value + current_price) / 2)) * 100 : 0

Annual Coupon Payment

annual_coupon = coupon_payment

Current Yield

current_yield = current_price > 0 ? coupon_payment / current_price * 100 : 0

Total Coupon Income

total_income = coupon_payment * years_to_maturity

Variables

VariableDescriptionDefault
face_valueFace (Par) Value(USD)1000
current_priceCurrent Market Price(USD)950
coupon_rateAnnual Coupon Rate(%)5
years_to_maturityYears to Maturity(years)10
coupon_paymentDerived value= face_value * coupon_rate / 100calculated

How It Works

Bond Yield to Maturity

YTM is the total return expected on a bond held to maturity, accounting for coupon payments and any price discount or premium.

Approximate YTM Formula

YTM = [C + (F - P) / n] / [(F + P) / 2]

Where:

  • C = Annual coupon payment
  • F = Face value
  • P = Current market price
  • n = Years to maturity
  • Premium vs Discount

  • Discount bond (price < par): YTM > coupon rate
  • Par bond (price = par): YTM = coupon rate
  • Premium bond (price > par): YTM < coupon rate
  • Worked Example

    $1,000 face value bond, $950 current price, 5% coupon, 10 years to maturity.

    face_value = 1000current_price = 950coupon_rate = 5years_to_maturity = 10
    1. 01Annual coupon = $1,000 x 5% = $50
    2. 02Price gain = ($1,000 - $950) / 10 = $5/year
    3. 03Average price = ($1,000 + $950) / 2 = $975
    4. 04Approx YTM = ($50 + $5) / $975 = 5.64%