How to Calculate Yield to Maturity: formula, worked example and common mistakes
Find the yearly yield a bond gives if it is held until it is repaid, and how sensitive its price is to that yield. Free, no sign-up, nothing leaves your browser.
Updated
What yield to maturity is
A bond promises a list of payments: a coupon every period, then the face value at the end. If you know what the bond costs today, you can ask what single yearly rate would make all those payments worth exactly that price. That rate is the yield to maturity, often shortened to YTM.
It is more complete than the coupon rate, which is only a percentage of the face value, and more complete than the current yield, which ignores the gain or loss at repayment. The calculator is at /tools/yield-to-maturity/. It also gives the bond’s duration and a table of what each payment is worth today.
The formula
The price of a bond is the sum of its payments, each discounted at the yield for one period:
price = coupon ÷ (1 + y) + coupon ÷ (1 + y)^2 + ... + (coupon + face) ÷ (1 + y)^N
y is the yield for one coupon period, N is the number of coupon payments (years × coupons a year) and each coupon is the face value × the coupon rate ÷ coupons a year. Yield to maturity solves this for y. Because y appears in every term, there is no way to rearrange for it, so the calculator searches: it tries a yield, prices the bond, and narrows the range until the price matches the one you typed.
The yield is then quoted the way bond markets quote it:
yield to maturity = y × coupons a year
A worked example at the calculator’s defaults
A bond with a face value of 1,000 and a 6% coupon, paid twice a year for 10 years, bought at 950.
coupon = 1,000 × 6% ÷ 2 = 30
payments = 10 × 2 = 20
y (period) = 3.3470%
yield to maturity = 3.3470% × 2 = 6.694%
after compounding = (1.033470)^2 − 1 = 6.806%
current yield = 60 ÷ 950 = 6.316%
The coupons are worth 432.34 today at this yield and the face value is worth 517.66, which adds to the price of 950. The table on the page shows each payment: the first coupon is worth 29.03 today, and the last payment, the final coupon plus the face value, is worth 533.19.
The yield to maturity is above the current yield, and both are above the 6% coupon rate, because the bond is bought below its face value. The climb from 950 to 1,000 at repayment adds to the return.
Duration
Duration answers a second question: how long, on average, until the money comes back? Each payment’s time is weighted by the share of the price it makes up today:
Macaulay duration = sum of (time of each payment × its present value) ÷ price
modified duration = Macaulay duration ÷ (1 + y)
For the default bond the Macaulay duration is 7.591 years, shorter than the 10 years to maturity because the coupons arrive along the way. The modified duration is 7.345.
What a yield move does to the price
Modified duration estimates the price change for a small move in yield:
price change ≈ − modified duration × change in yield × price
For a rise of 1 percentage point in the yield on the default bond, that is −7.345 × 0.01 × 950 = about −69.78. Repricing the bond at 7.694% gives a fall of 66.68, and repricing at 5.694% gives a rise of 73.10. The estimate sits between the two because price and yield are curved, not a straight line, so duration is a first guide and not the exact answer.
What the page does not know
The yield assumes every coupon is paid on time and reinvested at the same yield. It does not count accrued interest between coupon dates, taxes, fees or an early call. The figures describe the numbers you typed, not any particular bond or market. For the price from a chosen yield, use the bond calculator; for what a single amount is worth today, use the time value of money calculator.
Frequently asked questions
Why can yield to maturity not be written as a simple formula?
The yield sits inside every term of the sum that prices the bond, once for each payment, raised to a different power. That equation cannot be rearranged to isolate the yield, so it is found by trial: try a yield, price the bond, and adjust until the price matches.
Does the yield to maturity change if the price changes?
Yes. The coupons and the face value are fixed, so a lower price means a higher yield and a higher price means a lower one. The default bond yields 6.694% at 950; at a price of 1,000 the yield equals the 6% coupon rate.
Is duration the same as the years to maturity?
No. Duration is shorter than the time to maturity for any bond that pays coupons, because some money arrives early. The default bond has 10 years to maturity but a Macaulay duration of 7.591 years. A zero coupon bond is the case where the two are equal.
Why does the exact price change differ from the duration estimate?
Duration is a straight-line estimate of a curved relationship. The price rises more for a fall in yield than it falls for an equal rise. In the default example the estimate is 69.78, the exact fall is 66.68 and the exact rise is 73.10.
What does the calculator leave out?
It does not count accrued interest between coupon dates, taxes, fees or a bond being called early. It also assumes every coupon is paid on time and reinvested at the same yield. Every figure is one you typed; nothing about an issuer is stored.
This tool shows math, not advice.
Cite this page
Copy this line into a reference list, a report or a spreadsheet note.
Investment Math Calculator. “How to Calculate Yield to Maturity”. Updated 2026-11-14. https://investmentmathcalculator.com/guides/yield-to-maturity-calculator/
Disclaimer: For education only. These calculators show arithmetic and hypothetical scenarios. They are not investment, tax or legal advice and do not recommend any security or product. Consult a licensed adviser in your country before acting.