Bonds
How To Calculate The Convexity
Convexity measures how much a bond's price curve bends, which is the part of a price move that duration alone misses. It is the second-order correction to the linear duration estimate, and it matters most when yields move by more than a few basis points. The worked model below is a two-period teaching approximation, not investment advice, chosen so that every term can be followed by hand.
Last updated
Quick Answer
C = (sum of t(t+1) x PV(CF_t)) / (Price x (1 + y)^2)
- C
- Convexity of the bond
- t
- Time until a cash flow arrives, in years
- PV(CF_t)
- Present value of the cash flow paid at time t
- Price
- Bond price, the sum of the discounted cash flows
- y
- Yield per period as a decimal
Discount each cash flow, multiply by t times (t+1), sum the results and divide by price times (1 + y)^2. The two-year bond with coupon 5, face value 100 and a 3% yield has convexity of about 5.4793. For a one percentage point yield rise, duration alone predicts a change of about -1.9689 and the convexity term adds about +0.0284, giving about -1.9405.
What Is The Convexity?
Convexity describes the curvature of the relationship between a bond's price and its yield. Duration is the first derivative of that relationship, measuring the slope; convexity is the second derivative, measuring how quickly the slope itself changes. Because a plain bond's price-yield curve bends towards the investor, positive convexity softens losses when yields rise and enlarges gains when yields fall. The number is quoted in years squared, although many screens simply show the figure. In the two-period teaching model used here it works out at about 5.4793.
The standard formula adds each cash flow's present value multiplied by t(t+1), then divides by the price times (1 + y)^2. It comes from differentiating the discounted cash-flow sum twice with respect to yield. At t = 1 the multiplier is 1 x 2 = 2; at t = 2 it is 2 x 3 = 6. The distant final payment therefore contributes three times as much per unit of present value as the early coupon does. Convexity is consequently more sensitive to the principal repayment than duration is.
The arithmetic is easy to follow with the default inputs. At a 3% yield the year-one present value is 5 / 1.03 = 4.8544 and the year-two present value is 105 / 1.03^2 = 98.9726. The numerator is 2 x 4.8544 + 6 x 98.9726 = 603.5442. The denominator is the price of 103.8269 times 1.03^2, which is exactly 110.15 in this model. Dividing gives 603.5442 / 110.15 = 5.4793.
The reason for computing convexity is the price-change approximation. A small yield change of delta y changes the price by roughly minus modified duration times delta y times price, plus one half of convexity times delta y squared times price. The second term is the convexity adjustment. For a one percentage point rise here, delta y is 0.01, so the duration-only term is about -1.9689 while the correction is about +0.0284. Adding them gives an estimated change of about -1.9405 on a price near 103.83.
The direction of the correction is often misremembered, so it is worth stating plainly. Convexity is positive for this bond, and it makes a predicted price fall smaller in magnitude than the straight duration estimate. When yields fall, the same positive term makes the predicted gain larger. When yields rise, it does not reverse the loss, it merely reduces it. The bond still falls when rates go up; convexity only says the straight line was too pessimistic.
Convexity itself moves as the yield changes, and it moves in the opposite direction from what people sometimes expect. In this model it is about 5.7018 at a 1% yield, 5.4793 at 3% and about 5.2694 at 5%, so a higher yield means lower convexity. Discounting at a higher rate shrinks the distant final payment, which is the very cash flow that carries the largest t(t+1) weight. The sensitivity of the price to yield therefore becomes slightly less curved at higher yields. This is a useful cross-check: if a change of input makes convexity rise when the yield rises, something has been entered backwards.
Because the adjustment depends on delta y squared, doubling the yield move quadruples the convexity contribution while only doubling the duration term. That is why convexity is nearly invisible for tiny moves and increasingly important for large ones. A one basis point move leaves the second-order term negligible; a two hundred basis point move makes it a meaningful share of the answer. Any rule that uses duration alone is implicitly a small-move rule. The calculator keeps the one point move fixed so that the three outputs can be compared on exactly the same shock.
This page uses a two-period teaching approximation and is not investment advice. It assumes annual coupons, a single flat yield, a five-unit coupon and a face value of 100, with no accrued interest, settlement adjustments or day-count conventions. Real bonds usually pay semiannually, and the convexity formula must then be rebuilt with half-year periods and a periodic yield. Callable bonds introduce negative convexity near the call price, and credit spreads and curve shape are not captured here at all.
In practice convexity is used to compare bonds with similar duration but different cash-flow patterns, and to improve the estimate of a price move before a trade. Asset-liability managers sometimes match both duration and convexity so that a rate shift leaves a funded position more nearly unchanged. The measure is still a local, second-order Taylor approximation, so very large moves bring in third-order effects that one number cannot describe. Positive convexity is also not free: more convex bonds often trade at a lower yield, and transaction costs and liquidity are outside the model entirely. Treat the figure as one term in a risk assessment rather than a complete valuation.
Formula
C = (sum over t of t(t+1) x PV(CF_t)) / (P x (1+y)^2)
Formula page →Weight each discounted cash flow by t(t+1), add the terms and divide by price times one plus the yield squared. The t(t+1) factor comes from differentiating the price twice.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| C | Convexity | years^2 | The curvature of the price-yield relationship, quoted in years squared. |
| PV(CF_t) | Present value of the cash flow at time t | currency | The payment at t discounted at the yield; the final year includes the face value. |
| P | Bond price | currency | The sum of discounted cash flows, also the scaling factor in the denominator. |
Adjustment = 0.5 x C x (delta y)^2 x P
Formula page →Multiply one half of convexity by the square of the yield change and by the bond price. The squared change makes this term grow much faster than the linear duration term for large moves.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| C | Convexity | years^2 | The value computed by the main formula, for the current yield. |
| delta y | Change in yield as a decimal | decimal | A one percentage point rise is 0.01, never 1; a basis point is 0.0001. |
| P | Bond price | currency | The price before the yield move, used to scale the percentage effect into currency. |
delta P ~ -D_mod x delta y x P + 0.5 x C x (delta y)^2 x P
Formula page →Combine the linear duration estimate with the convexity correction. The first term carries the sign of the rate move; the second is positive for a bond with positive convexity whatever the direction of delta y.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| delta P | Estimated price change | currency | The approximate change in the bond's price after the yield move. |
| D_mod | Modified duration | years | Macaulay duration divided by one plus the yield; about 1.8964 in the default model. |
| C | Convexity | years^2 | The curvature term that corrects the linear approximation. |
How To Calculate The Convexity
- 1
Express the yield as a decimal
The yield field is a percentage that the engine divides by 100, so a quoted 3% becomes 0.03 in the formula. Adding 1 gives the discount base 1.03, and squaring it gives 1.0609. Never write the yield as 3 in a discount factor, and never multiply by 100 again inside an expression.
- 2
Discount the two cash flows
The year-one cash flow is the coupon of 5 and the year-two cash flow is the coupon plus the face value, 105. Divide by 1.03 and by 1.03^2 to obtain present values of 4.8544 and 98.9726. Their sum, 103.8269, is the bond price used in the denominator.
- 3
Build the convexity numerator
Attach the t(t+1) multiplier to each present value: 2 for year one and 6 for year two. The weighted sum is 2 x 4.8544 + 6 x 98.9726 = 603.5442. Notice how heavily the final repayment dominates, because it carries both a large present value and the larger multiplier.
- 4
Divide by price times the squared base
The denominator is the price times (1 + y)^2, which is 103.8269 x 1.0609 = 110.15 in this model. Dividing 603.5442 by 110.15 gives convexity of about 5.4793. At a 5% yield the same procedure gives about 5.2694, so convexity falls as yield rises.
- 5
Apply the one percentage point adjustment
For a rise of one percentage point, delta y is 0.01. The duration-only estimate is about -1.9689 on a price near 103.83, and adding one half of convexity times 0.01 squared times the price contributes about +0.0284. The combined estimate is about -1.9405, a slightly smaller fall than duration alone predicted.
Examples
Example 1: Default case — coupon 5, face 100, yield 3%
- yieldRate
- 3%
- coupon
- 5
- faceValue
- 100
| Step | Calculation | Result |
|---|---|---|
| Yield as a decimal | 3 / 100 | 0.03 |
| Year-one present value | 5 / 1.03 | 4.8544 |
| Year-two present value | 105 / 1.03^2 | 98.9726 |
| Convexity numerator | 2 x 4.8544 + 6 x 98.9726 | 603.5442 |
| Convexity | 603.5442 / 110.15 | 5.4793 |
Result: Convexity is about 5.4793 for the two-period bond at a 3% yield.
Example 2: Higher yield — coupon 5, face 100, yield 5%
- yieldRate
- 5%
- coupon
- 5
- faceValue
- 100
| Step | Calculation | Result |
|---|---|---|
| Yield as a decimal | 5 / 100 | 0.05 |
| Year-one present value | 5 / 1.05 | 4.7619 |
| Year-two present value | 105 / 1.05^2 | 95.2381 |
| Convexity numerator | 2 x 4.7619 + 6 x 95.2381 | 580.9524 |
| Convexity | 580.9524 / 110.25 | 5.2694 |
Result: At a 5% yield convexity falls to about 5.2694, lower than the 5.4793 measured at 3%.
Example 3: Estimated price change — a one point yield rise at 3%
- yieldRate
- 3%
- coupon
- 5
- faceValue
- 100
| Step | Calculation | Result |
|---|---|---|
| Duration-only term | -1.8964 x 0.01 x 103.8269 | -1.9689 |
| Convexity term | 0.5 x 5.4793 x 0.01^2 x 103.8269 | 0.0284 |
| Combined estimate | -1.9689 + 0.0284 | -1.9405 |
Result: The estimated price change is about -1.9405 on a price near 103.83, smaller in magnitude than the duration-only fall of about -1.9689.
Calculator
Convexity (years squared)
5.4793
- Convexity adjustment for a one point rise
- 0.0284
- Duration-only price change for a one point rise
- -1.9689
- Combined price change for a one point rise
- -1.9405
Values update as you type. This calculator covers the single scenario its formula assumes — see Common Mistakes for what it leaves out.
Prefer a full-width tool? Open the The Convexity calculator page.
Common Mistakes
Mixing up convexity with duration
Duration is the slope of the price-yield curve and convexity is its curvature. A common error is to treat the convexity figure as a percentage price sensitivity and apply it alone. The convexity term is always a correction to the duration estimate, never a replacement for it.
Using t(t-1) instead of t(t+1)
The second derivative produces t(t+1), giving multipliers of 2 and 6 for the first two years. Writing t(t-1) would give zero for year one and 2 for year two, removing most of the correction. Check the multiplicity against a known two-period case before trusting a different formula.
Dropping the face value from the final cash flow
The year-two payment is the coupon plus the principal, 105 rather than 5. Because that cash flow carries the larger t(t+1) multiplier, omitting the principal collapses the numerator and understates convexity badly. Write the full cash-flow timeline before discounting.
Entering one percentage point as 1 instead of 0.01
The yield change in the adjustment is a decimal, so a one point rise is 0.01 and one basis point is 0.0001. Using 1 makes the convexity correction ten thousand times too large and reverses the direction of the answer. The squared term makes this mistake especially expensive.
Thinking convexity increases the loss when yields rise
For a bond with positive convexity the correction is positive whichever way yields move. It makes a predicted fall smaller and a predicted gain larger. The bond still loses value when rates rise; convexity only says that the straight duration line overstated how much.
Applying the annual teaching formula to real bonds
Most bonds pay semiannually, so the periods and the periodic yield must be rebuilt, and callable bonds can show negative convexity near the call price. This two-period model is for teaching and is not investment advice. For a live trade use a pricing library and include credit spreads, accrued interest and curve shape.
FAQ
What is convexity in plain terms?
It is a measure of how much a bond's price curve bends as yield changes. Duration tells you the slope at the current yield; convexity tells you how that slope is changing. A higher positive number means the curve bends more sharply in the investor's favour.
How does convexity improve a duration-based estimate?
Duration gives a straight-line estimate of the price change. Adding one half of convexity times the yield change squared times the price corrects for the curve. In the default model the straight estimate is about -1.9689 for a one point rise and the corrected estimate is about -1.9405.
What happens to convexity when the yield rises?
It falls. At a 1% yield this model gives about 5.7018, at 3% about 5.4793 and at 5% about 5.2694. A higher discount rate shrinks the distant final payment, which is the cash flow with the largest t(t+1) weight, so the price curve becomes less strongly curved.
Does a positive convexity correction mean the price can rise when yields rise?
No. For ordinary bonds the price still falls when yields rise. The convexity term is positive but smaller than the negative duration term for normal yield moves, so it only reduces the size of the fall. The direction of the price move is set by duration.
Does this calculator model a real, tradable bond?
No. It is a two-period teaching approximation with annual coupons and a flat yield, provided for education and not investment advice. Real bonds usually pay semiannually and may be callable, and a live estimate needs accrued interest, credit spreads and a proper yield curve.
Why is the convexity term squared, and what are the units?
The term uses delta y squared because it is the second-order term in a Taylor expansion of the price-yield function. Doubling the yield move therefore quadruples this correction while only doubling the duration term. Convexity itself is conventionally quoted in years squared, though many systems show a bare number.
References
- [1]Wikipedia, Bond duration — https://en.wikipedia.org/wiki/Bond_duration
- [2]Wikipedia, Convexity (finance) — https://en.wikipedia.org/wiki/Convexity_(finance)
- [3]Wikipedia, Bond — https://en.wikipedia.org/wiki/Bond
