Formula: Bond Price & Yield Financial Formula
- faceValue: Face Value (currency)
- couponRatePct: Coupon Rate Pct (% / yr)
- ytmPct: Ytm Pct (% / yr)
- yearsToMaturity: Years To Maturity (years)
Price fixed-coupon bonds and inspect inverse price-vs-yield convexity.
The coupon is fixed when the bond is issued. If market yields fall below it, the bond pays more than new investors need, so buyers bid the price up. With a 5% coupon and a 4.2% yield, the price rises to $1,064.25, the level at which the fixed payments deliver exactly 4.2% a year to someone who buys today and holds.
No. It assumes one coupon per year and annual discounting. For a semi-annual bond you can approximate by halving the coupon rate and the yield and doubling the years, then halving the Macaulay duration result to convert back to years. Because maturity must be a whole number, this works for bonds with whole half-years left, up to the 100 period limit. Convexity would need dividing by four.
On a coupon date the two are the same, and that is the only situation this calculator models. It counts whole years from today with no accrued interest, so it never adds or subtracts interest owed between payment dates. For settlement mid-period you would need a tool that handles accrued interest and the bond's day count rules.
Reasonably close but biased. For the default bond it predicts a price change of about $83.49 either way, while the exact repricing gives about $79.54 down and $87.74 up. The error grows with larger yield moves and with longer, lower coupon bonds, because their price curve bends more sharply.
It measures how much the price-yield curve bends. Duration describes the slope; convexity adds the curvature. The default 76.98 means a 1% yield move adds about one half of 76.98 times 0.0001, roughly 0.38%, to the duration estimate. Longer bonds bend more: the 30 year preset shows 382.7.
The model pays one coupon a year, so it needs a whole number of coupons. Maturity must be a whole number of years from 1 to 100, and anything else returns a message instead of a price. For a bond with a partial year left, round to the nearest year and treat the result as an approximation.
Longer maturity pushes more of the value further into the future, so duration rises and the price reacts more to yield changes. Keeping the 5% coupon and 4.2% yield, a 30 year maturity gives a Macaulay duration of 16.98 years, about twice the 8.17 of the 10 year default, while a 2 year bond shows only 1.95 years.
Duration is a weighted average of payment times, and the weights are each payment's share of the price. Scaling every payment by the same amount leaves those shares unchanged, so a bond with twice the face value has the same 8.17 years, the same convexity and the same minus 7.46% estimate as the $1,000 default.
Yes. Enter 0 as the coupon rate. The only cash flow is the face value at maturity, so Macaulay duration equals the maturity exactly, 10 years with the defaults, and modified duration is that figure divided by one plus the yield, 9.6 years. Current yield shows 0% because there are no coupons.
Not on its own. Current yield ignores what happens to the price at maturity. A bond bought at a premium has a current yield above its yield to maturity because part of each coupon effectively repays the premium. Comparing bonds on yield to maturity, maturity and credit quality gives a fuller picture than current yield alone.
Only through the yield you enter. The calculator discounts every payment at that single rate and assumes each one is paid in full and on time. If the issuer is riskier, the market yield will be higher and the price lower, but the tool cannot judge that risk; it simply uses the number you supply.
The default inputs describe a bond with a $1,000 face value, a 5% annual coupon, 10 years left to maturity and a market yield to maturity of 4.2%. The calculator values it at $1,064.25, about 6.4% above face value.
Why a premium? The bond pays $50 a year in coupons, but the market only demands a 4.2% return on bonds like it. A buyer who paid exactly face value would earn 5%, which is more than the market requires, so competition pushes the price up until the return falls to 4.2%. That is the sense in which price and yield move in opposite directions: the price is whatever makes the promised cash flows earn exactly the yield you typed in.
The engine does this with the formula shown on the page. Each of the ten $50 coupons is divided by 1.042 raised to the year it arrives, and the $1,000 repayment in year 10 is discounted the same way. In present value terms the coupons make up about 37.7% of the price and the repayment of face value about 62.3%, and together they give the headline figure. A quick check is to set the yield equal to the coupon: with both at 5% the price comes out at exactly $1,000.00, as it should for any bond whose coupon matches its yield.
Macaulay duration is the average time until you receive the bond's cash, weighted by how much each payment is worth today. The engine multiplies the present value of each payment by the year it arrives, adds those up, and divides by the price.
For the default bond the big weight sits at year 10, where the final coupon and the face value arrive together. That single payment is worth roughly 65% of the price. The earlier coupons pull the average forward, which is why the result is 8.17 years rather than 10. Working through the same sums independently gives 8.1745 years, matching the engine to the second decimal place.
Two simple cases confirm the logic. Set the coupon rate to zero and there is only one payment, so the duration is exactly 10 years, the same as the maturity. Raise the coupon to 8% and more of the value arrives early, so duration falls to 7.62 years. Higher coupons shorten duration; zero-coupon bonds have the longest duration for a given maturity.
Modified duration is Macaulay duration divided by one plus the yield. For the default that is 8.17 divided by 1.042, which gives the 7.84 years shown. Its job is practical: it estimates the percentage change in price for a small change in yield.
Read it as roughly 7.84% of price per 1 percentage point, or 100 bps, change in yield. On the $1,064.25 default price, a yield rise to 5.2% would be predicted to knock about $83.49 off the price. The calculator's own answer at 5.2% is lower by about $79.54, a fall of roughly 7.47%. Lowering the yield to 3.2% raises the price by about $87.74, well over the $83.49 the duration estimate suggests.
So duration gets the size of the move about right but is slightly too pessimistic on the way down and too modest on the way up. That gap is convexity, which the calculator reports on its own line.
Below the two durations the result shows a convexity of 76.98 years squared and an estimated price change of minus 7.46% for a 1% rise in yield, calculated from duration plus convexity. These two lines are what close the gap described above.
Convexity comes from the same cash flows as duration. For each payment, multiply its present value by t times t plus one, add them up, divide by the price and then by one plus the yield squared. Working through those sums independently for the default bond gives 76.98, matching the engine, using the same annual compounding.
The estimate line then applies the standard second-order formula: minus modified duration times the yield change, plus one half of convexity times the yield change squared. For a 1% rise that is minus 7.84% plus about 0.38%, giving the minus 7.46% shown. In money terms that is close to $79.39 off the $1,064.25 price, within a few cents of the exact $79.54 you get by repricing at 5.2%. Duration alone would have said $83.49.
The estimate only covers a rise in yield. For a 1% fall, flip the sign of the duration term but keep the convexity term positive: about plus 8.23%, or roughly $87.58, again very close to the exact repricing. Convexity always works in the holder's favour for a plain fixed-coupon bond, softening losses and adding to gains.
Current yield is the annual coupon divided by the price. With $50 of coupons and a $1,064.25 price, it is about 4.698%, shown rounded as 4.7%. It sits between the 5% coupon rate and the 4.2% yield to maturity.
It is not the return you would earn by holding to maturity. A buyer at the default price receives coupons worth 4.7% of what they paid, but at maturity gets back only $1,000, less than the purchase price. That loss of the premium, spread over 10 years, pulls the total return down to the 4.2% yield you entered. For a bond bought at a discount the opposite happens and the yield to maturity is above the current yield.
Because the display rounds to two decimal places, small changes in price may not show up in the current yield line. Raising the yield to 5.2% shows a current yield of 5.08%; lowering it to 3.2% shows 4.34%.
The engine assumes one coupon a year and discounts at the annual yield. Many government and corporate bonds pay twice a year, and their quoted yields are based on half-yearly periods. For those bonds the calculator's price will differ slightly from a market quote using the same coupon and yield, and its duration will be a little longer than a semi-annual calculation gives.
Because coupons are annual, maturity must be a whole number of years from 1 to 100. Entering 7.6 or 0.5 returns a message asking for whole years rather than a price. There is no accrued interest either, so the price is the value on a coupon date. Between coupon dates a real clean price and the invoice price differ, and this tool cannot show that.
For a bond bought between coupon dates, or one with an odd first or last period, round to the nearest whole year to get a ballpark figure, then check the exact price with a bond pricing tool that handles settlement dates and day count rules.
The first preset keeps the default bond but drops the yield to 3.2%. The price rises to $1,151.99, the current yield falls to 4.34%, and Macaulay duration edges up to 8.26 years with modified duration at 8. Convexity rises to 79.51 and the estimate for a further 1% rise in yield is minus 7.6%. That estimate is easy to test: moving from 3.2% back to the default 4.2% takes the price from $1,151.99 to $1,064.25, a fall of about 7.62%.
The second preset keeps the 4.2% yield but stretches maturity to 30 years. The price is $1,135.04, a bigger premium because the extra coupon income runs for longer. The sensitivity figures change far more. Macaulay duration roughly doubles to 16.98 years, modified duration is 16.3, and convexity jumps to 382.7. The estimated price change for a 1% rise is minus 14.38%, almost twice the 10 year bond's minus 7.46%.
Together the presets show which inputs drive risk: maturity matters most, then the level of yields and the coupon. Face value does not matter at all for the percentages. Doubling the face value doubles the price but leaves duration, convexity and current yield unchanged, because every cash flow scales by the same factor.
For the 30 year bond the estimate is less precise. Repricing at 5.2% gives a fall of about 14.55%, slightly more than the minus 14.38% estimate, because higher-order effects grow with maturity. For most planning purposes the estimate is still a good guide.
Both rate fields are percentages per year, so a 4.2% yield goes in as 4.2, not 0.042. Typing the decimal form would price the bond at a yield of almost zero. At exactly 0% yield the price is simply the sum of all payments, one and a half times face value for the default, and duration becomes the plain average payment time of 8.5 years.
The yield field also accepts negative values, which do occur in some markets. In that case modified duration comes out larger than Macaulay duration, because dividing by one plus a negative yield makes the number bigger. That is mathematically correct, not a fault.
Use the yield to maturity the market quotes for this specific bond, not a general interest rate. The coupon rate is fixed by the bond's terms and printed on its documents. Mixing them up flips the premium or discount and gives the wrong price direction. If the price you see elsewhere looks very different from the calculator's, check the payment frequency first, then whether the bond has a partial year left, which this model cannot price.