Yield to maturity (YTM) is the total return you earn on a bond if you buy it today at its current market price and hold it until it matures, assuming all coupon payments are reinvested at the same yield. It is the single most useful number for comparing bonds because it accounts for the coupon rate, the time to maturity, and the difference between the purchase price and the par value you receive at maturity.
Think of YTM like an all-in annual return rate on a bond: it collapses every moving part into one comparable figure.
A bond's coupon rate is fixed when it is issued. YTM changes constantly as the bond's market price moves. If you buy a $1,000 face value bond with a 5% coupon rate at a discount, say $950, your YTM exceeds 5% because you collect the same $50 annual coupon but also capture a $50 gain when the bond matures at $1,000. If you pay a premium of $1,050 for the same bond, your YTM falls below 5% because that same $50 coupon must be offset against the $50 you lose at maturity.
YTM cannot be solved algebraically in most cases. It requires an iterative calculation or a financial calculator. The formula finds the discount rate that makes the present value of all future cash flows (coupon payments plus par value at maturity) equal to the current price.
For a quick approximation, divide the annual coupon plus the annual pro-rated discount or premium by the average of the current price and par value. This rough formula gives you an estimate close enough for initial comparisons but not precise enough for pricing.
Bond prices and yields move in opposite directions. When market interest rates rise, existing bond prices fall to push their YTM up to market levels. When rates fall, bond prices rise and YTM falls. A bond with a 5% coupon becomes less attractive when new bonds offer 7%, so its price must fall until the total return equals 7% for a new buyer.
This inverse relationship explains why rising interest rate environments hurt existing bondholders. If you paid $1,000 for a 10-year bond and rates rise, the bond's market value falls below $1,000 even though nothing about the bond's contractual obligations has changed.
YTM assumes you reinvest all coupon payments at the same yield. In practice, reinvestment rates change constantly. The actual realized yield on a bond almost always differs from YTM. For very long-duration bonds, the reinvestment assumption compounds over many years and the realized yield can deviate significantly from the YTM calculated at purchase.
YTM also assumes you hold the bond to maturity. If you sell before maturity, your total return depends on what price you sell at, which depends on interest rates at the time of sale.
Sources:
https://www.treasurydirect.gov/
https://www.sec.gov/investor/pubs/bonds.htm
https://www.finra.org/investors/bonds