How the bond calculator works
A bond's price is the present value of everything it will pay you: each coupon discounted back at the market yield, plus the face value discounted from maturity. Pick a direction, give it four values, and this returns the price from a yield or the yield from a price, with duration and current yield beside it.
Duration is the part worth staying for. Not one calculator on the first page of results reports it.
The pricing formula
Price = sum of C / (1 + y/m)^k, for k = 1 to n, plus F / (1 + y/m)^n
C is the coupon per period, m the coupons per year, n the total periods, F the face value and y the annual yield. calculator.net publishes this and Omni writes the same thing as a sum of discounted cash flows.
A $1,000 bond paying a 5% coupon semiannually over ten years, discounted at a 6% yield, prices at $925.61.
Why the price moves opposite to the yield
The coupon is fixed in cash. It pays $25 every six months whatever happens to interest rates. So when newly issued bonds start paying more, the only thing that can adjust on an existing bond is its price, which falls until a buyer gets the going return.
| Market yield | Price of that 5% bond |
|---|---|
| 4% | $1,081.76 |
| 5% | $1,000.00 |
| 6% | $925.61 |
| 7% | $857.88 |
At a yield exactly equal to the coupon, the price is exactly par. That identity holds at any maturity and any coupon frequency, and it is the quickest way to sanity check any bond calculator you are handed.
Three yields, routinely confused
The coupon rate is a percentage of face value, current yield is a percentage of what you paid, and yield to maturity is the return if you hold to redemption. On our bond trading at $925.61, those are three different numbers:
| Measure | Value | What it counts |
|---|---|---|
| Coupon rate | 5% | The annual coupon against face value, fixed for life |
| Current yield | 5.4018% | The annual coupon against the current price |
| Yield to maturity | 6% | Coupons plus the pull back up to par at redemption |
Current yield sits between the other two here because the bond trades at a discount. Buy below par and you collect the coupons and a gain at maturity, so the full return beats the income yield alone.
Solving the yield from a price
There's no closed form. The yield sits inside every discount factor at a different power, so the equation cannot be rearranged for it and every tool that reports a yield to maturity is iterating.
This one uses bisection on the pricing equation and prints how many steps it took. Price falls monotonically as yield rises, so a single bracket always finds the answer, which is a friendlier problem than IRR, where a cash flow series can genuinely satisfy several rates.
DQYDJ deserves credit as the one ranked calculator that names its method, the secant method. Omni concedes the calculation involves complex iteration without saying which kind, CalculateStuff describes a plug and chug approach without stating what its own tool runs, and calculator.net treats yield as an input rather than solving for it.
The shortcut, and how far it misses
DQYDJ also publishes an approximation, which it reports without quantifying the error:
Approximate YTM = (C + (F - P) / t) / ((F + P) / 2)
On our bond that returns 5.9658% against a true 6%. About a thirtieth of a point light. Close enough for a mental estimate and not close enough to quote, which is why this page prints the shortcut, the exact figure, and the gap between them.
Duration, which the ranked set skips entirely
Macaulay duration is the average time to a bond's cash flows, weighted by the present value of each one, expressed in years. Modified duration divides that by one plus the periodic yield and estimates the percentage price move for a one point change in yield.
On the ten year 5% bond at a 6% yield, Macaulay duration is 7.895 years and modified duration is 7.665.
Duration lands below the ten year maturity because coupons return money along the way, so the average wait for the bond's cash is shorter than the wait for the final repayment. A zero coupon bond has exactly one cash flow, at maturity, so its duration equals its maturity precisely. Raise the coupon and duration shortens, which is the reason a high-coupon bond moves less than a low-coupon bond of the same maturity when rates shift.
Neither calculator.net nor CalculateStuff covers Macaulay or modified duration, and Omni does not raise it. For the question a bondholder actually asks when rates move, that absence across the whole first page is odd.
Duration is a straight line through a curve
Take the same bond from a 6% yield to 7%. Modified duration predicts a price of $854.66. The bond actually reprices to $857.88.
The estimate is $3.22 too pessimistic, and it errs that way in both directions: duration always understates the gain when yields fall and overstates the loss when they rise. That curvature is what convexity measures. This page shows both numbers rather than the estimate alone, because a first-order approximation presented as the answer is how people get surprised by their own bond book.
What this calculator does not do
Convexity itself is out of scope, along with yield to call and yield to put. No page fetched for this build publishes any of them in enough detail to implement faithfully, and guessing at a formula for a YMYL page is not a trade worth making.
Accrued interest and the clean against dirty price distinction are also not modelled here. calculator.net runs a separate calculator for bonds traded between coupon dates, using the same 30/360, Actual/360, Actual/365 and Actual/Actual conventions we already cover on the simple interest calculator.
Credit risk appears nowhere in any of this. Every figure on the page assumes each coupon and the final repayment actually arrive, which is precisely the assumption a defaulting issuer breaks.
Results are arithmetic on your inputs, not financial advice. For decisions about your money, speak to a licensed financial adviser. To value an irregular stream of cash flows instead, the present value calculator discounts at a rate you pick.
Frequently asked questions
How is a bond priced? A bond price is the present value of everything it pays: each coupon discounted back at the yield, plus the face value discounted from maturity. A $1,000 bond paying a 5 percent coupon semiannually over ten years, discounted at a 6 percent yield, prices at $925.61.
Why does a bond price fall when yields rise? The coupon is fixed in cash terms, so the only way an older bond can compete with newly issued ones paying more is for its price to drop until the return to a buyer matches the market. That same $1,000 bond with a 5 percent coupon is worth $925.61 at a 6 percent yield, exactly $1,000 at a 5 percent yield, and $1,081.76 at 4 percent.
What is the difference between coupon rate, current yield and yield to maturity? They are three different numbers and get confused constantly. The coupon rate is a percentage of face value, fixed for life. Current yield is the annual coupon divided by what the bond costs now. Yield to maturity is the return if you buy at that price and hold to redemption, counting both the coupons and the gain or loss against face value. On a $1,000 bond with a 5 percent coupon trading at $925.61 over ten years, those are 5 percent, 5.4018 percent and 6 percent.
How is yield to maturity actually calculated? By iteration, because the equation cannot be rearranged for the yield. This tool uses bisection on the pricing equation and reports how many steps it took. DQYDJ is the one ranked calculator that names its method, the secant method; Omni concedes the calculation involves complex iteration without saying which one, and calculator.net treats yield as an input rather than solving for it.
Is there a shortcut formula for yield to maturity? Yes, and it is close without being right. The approximation is the annual coupon plus the annualised gain to par, divided by the average of face value and price. On the $925.61 example it returns 5.9658 percent against a true 6 percent, so it runs about a thirtieth of a point light. This page prints both figures and the gap between them, since a shortcut is only safe to use once you know its size of error.
What is bond duration? Macaulay duration is the average time to a bond's cash flows, weighted by the present value of each, expressed in years. Modified duration divides that by one plus the yield per period and estimates the percentage price change for a one point move in yield. On the ten year 5 percent bond at a 6 percent yield, Macaulay duration is 7.895 years and modified duration is 7.665.
Why is duration shorter than the time to maturity? Because coupons return money along the way, so the average wait for the bond's cash is less than the wait for the final repayment. A zero coupon bond has one cash flow at the end, so its duration equals its maturity exactly. Raising the coupon shortens duration, which is why a high-coupon bond moves less when rates change than a low-coupon bond of the same maturity.
Is duration an exact prediction of the price change? No, it is a straight-line estimate of a curved relationship and it always errs on the pessimistic side. Take that same bond from a 6 percent to a 7 percent yield: modified duration predicts $854.66 and the actual repriced bond is $857.88, so the real price is $3.22 better than the estimate. That curvature is what convexity measures, and it is why duration alone understates a bond in a falling market and overstates the damage in a rising one.
Sources
- DQYDJ bond yield to maturity calculator, the one ranked tool naming its numerical method and publishing the approximation
- calculator.net bond calculator, which publishes the pricing formula and the day-count conventions for trades between coupon dates
- Omni Calculator yield to maturity, publishing the present value equation
- CalculateStuff bond yield calculator, covering current yield alongside YTM