onlinecalculator.me

Free bond yield calculator

Yield to maturity is the total return earned by holding a bond to maturity. This calculator finds YTM precisely, then reports current yield, annual coupon, premium or discount to.

About this calculator

How to use

  1. Enter the bond’s face value (typically $1,000).
  2. Enter the annual coupon rate as printed on the bond.
  3. Select the coupon payment frequency — annual, semi-annual, or quarterly.
  4. Enter the current market price you would pay today.
  5. Enter the number of years until maturity.
  6. Click Calculate bond yield to see YTM, current yield, duration, and price status.

The formula

Current yield:

CY = (faceValue × couponRate%) / currentPrice

Yield to maturity — solved numerically by finding r such that:

currentPrice = Σ [coupon / (1 + r)^t] + faceValue / (1 + r)^n

Where coupon is the per-period coupon payment, r is the periodic yield, and n is total periods.

Macaulay duration:

D = Σ [t × PV(CFt)] / currentPrice

Where t is expressed in years and PV(CFt) is the present value of each cash flow at the YTM.

Worked example

Face value: $1,000. Coupon rate: 5% (semi-annual). Current price: $950. Years to maturity: 10.

  • Annual coupon: $50 (paid $25 every 6 months)
  • Current yield: $50 / $950 = 5.26%
  • YTM ≈ 5.65% (higher than coupon because buying at discount)
  • Macaulay duration ≈ 7.99 years

Notes

  • YTM assumes all coupon payments are reinvested at the YTM rate — in practice, reinvestment rates vary.
  • This calculator models bullet bonds (single maturity date). Callable bonds, floating rate bonds, and inflation-linked bonds require additional inputs.
  • The binary search used for YTM converges to 4 decimal places of precision.
What is yield to maturity?
Yield to maturity (YTM) is the annualized return you earn if you buy the bond today at the current price, receive all coupon payments, and hold it until the face value is repaid at maturity. It accounts for both the coupon income and the gain or loss from buying at a premium or discount to face value.
How does price relate to yield?
Bond price and yield move in opposite directions: when a bond's price rises above face value (premium), the YTM falls below the coupon rate. When the price falls below face value (discount), the YTM rises above the coupon rate. A bond priced at face value has YTM equal to its coupon rate.
What is Macaulay duration?
Macaulay duration is the weighted average time (in years) to receive all the bond's cash flows: coupons and face value. It measures interest rate sensitivity — a duration of 7 years means the bond's price will drop roughly 7% for each 1% rise in interest rates.
What is current yield vs YTM?
Current yield = annual coupon ÷ current price. It ignores time value and the gain or loss at maturity. YTM is more comprehensive: it accounts for when all cash flows arrive, making it the standard measure for comparing bonds.