BedrockCalculator
Verified Primary-Source MathematicsVerified by Aapt Dubey, MBA (Marketing & Finance) Last verified August 30, 2026

Bond Modified Duration Calculator

Quick Answer: A $1,000 face, 5% semiannual-coupon bond with 10 years to maturity priced to a 6% yield has a modified duration of 7.67 years, a Macaulay duration of 7.89 years, a convexity of 71.79 and a price of $925.61. At a +100 basis point shock, duration alone predicts a $70.95 loss, the convexity correction adds back $3.32 for a $67.63 estimate, and the bond fully repriced at 7% actually falls $67.73.

Assumptions

Loading
$
%
%

Preset scenarios

Modified Duration (Years)
7.665
Macaulay Duration (Years)
7.895
Convexity
71.785
Bond Price
$925.61
DV01 (Price Change Per 1bp)
$0.71
Estimated Price Change
$-67.63
Estimated Percent Change
-7.31%
Duration-Only Estimate
$-70.95
Convexity Correction
$3.32
Exact Repriced Change
$-67.73
Error Left By Duration Alone
$3.22
Error Left After Convexity
$-0.10
Exact New Price
$857.88
Annual Coupon
$50.00

Duration-Only Vs Duration + Convexity Vs Exact

Remaining balanceCumulative principalCumulative interest
11 periods, peak $1

Duration, Convexity, And The Price Estimate They Produce

Showing 11 rows.

ComponentAmount
Bond price (dirty)$925.61
Macaulay duration (years)$7.89
Modified duration (years)$7.67
Convexity$71.79
DV01 (price change per 1bp)$0.71
Duration-only estimate at 100bps$-70.95
Convexity correction$3.32
Duration + convexity estimate$-67.63
Exact repriced change$-67.73
Error left by duration alone$3.22
Error left after convexity$-0.10
Quick Answer: A $1,000 face, 5% semiannual-coupon bond with 10 years to maturity priced to a 6% yield has a modified duration of 7.67 years, a Macaulay duration of 7.89 years, a convexity of 71.79 and a price of $925.61. At a +100 basis point shock, duration alone predicts a $70.95 loss, the convexity correction adds back $3.32 for a $67.63 estimate, and the bond fully repriced at 7% actually falls $67.73.

Overview

Modified duration is the single number a bond desk uses to answer "what happens to this price if yields move". It is the percentage price change per one percentage point of yield movement, and it is negative by convention: prices fall when yields rise.

It is also a first-order approximation. The relationship between price and yield is a convex curve, not a straight line, and modified duration is the tangent to that curve at the current yield. Follow a tangent far enough from the point of contact and it drifts away from the curve in one consistent direction. Because the price-yield curve is convex for an ordinary bond, the tangent always sits below the true curve. Duration alone therefore under-predicts the gain from a rate fall and over-predicts the loss from a rate rise.

Convexity is the second-order correction that closes most of that gap. It is why bond desks quote both figures, and why convexity is treated as a desirable property rather than a technicality: for an ordinary bond the correction is positive whichever direction rates move, because the term is scaled by the square of the yield change.

This calculator computes duration, convexity and the price from first principles, then puts three answers side by side at your chosen shock: what duration alone says, what duration plus convexity says, and what the bond is actually worth when fully re-discounted at the new yield. The two error columns show how much each approximation left on the table.

How This Is Calculated

Every cash flow is discounted individually. Nothing is interpolated.

P=t=1nCFt(1+y/f)tDmac=ttPV(CFt)P×fP = \sum_{t=1}^{n} \frac{CF_t}{(1 + y/f)^t} \qquad D_{mac} = \frac{\sum_t t \cdot PV(CF_t)}{P \times f}
Dmod=Dmac1+y/fC=tt(t+1)PV(CFt)P×f2×(1+y/f)2D_{mod} = \frac{D_{mac}}{1 + y/f} \qquad C = \frac{\sum_t t(t+1) \cdot PV(CF_t)}{P \times f^2 \times (1 + y/f)^2}
ΔPPDmodΔy+12C(Δy)2\frac{\Delta P}{P} \approx -D_{mod} \cdot \Delta y + \tfrac{1}{2} C (\Delta y)^2

Step 1 -- Build the cash flow schedule. The number of periods is years to maturity multiplied by the coupon frequency, rounded. Each period pays face value times the coupon rate divided by the frequency, and the final period adds the face value.

Step 2 -- Discount each cash flow. The periodic yield is the annual yield divided by the frequency. Each cash flow is divided by one plus that rate raised to its period number, and the sum is the price.

Step 3 -- Accumulate the duration numerator. Each cash flow's present value is multiplied by its period number and summed.

Step 4 -- Compute Macaulay duration in years. That numerator divided by price, then divided by the coupon frequency to convert periods into years.

Step 5 -- Convert to modified duration. Macaulay duration divided by one plus the periodic yield.

Step 6 -- Accumulate the convexity numerator. Each cash flow's present value multiplied by $t(t+1)$, summed, then divided by price, by the frequency squared, and by the square of one plus the periodic yield.

Step 7 -- Compute DV01. Price multiplied by modified duration, divided by 10,000. This is the dollar price change for a one basis point yield move.

Step 8 -- Apply the duration-only estimate. The negative of modified duration multiplied by the yield shift in decimal, multiplied by the price.

Step 9 -- Add the convexity term. One half of convexity multiplied by the square of the yield shift, added to the duration term before multiplying by price. The difference between this and step 8 is the convexity correction.

Step 10 -- Reprice the bond exactly. The entire cash flow schedule is re-discounted at the shocked yield from scratch, using the same pricer. The difference from the original price is the true answer.

Step 11 -- Report both errors. Exact change less the duration-only estimate, and exact change less the duration-plus-convexity estimate.

The accrued-interest fraction is fixed at zero in this calculator, so the clean and dirty prices are identical, and every duration figure is computed on that price.

Worked Example

Defaults: $1,000 face, 5% annual coupon paid semiannually, 6% yield to maturity, 10 years, +100 bps shock.

Step 1 -- Find the periodic terms. 20 periods, a coupon of $1,000 × 5% ÷ 2 = $25 per period, and a periodic yield of 6% ÷ 2 = 3.00%

Step 2 -- Discount every cash flow and sum. Nineteen coupons of $25 plus a final $1,025, discounted at 3% per period = $925.61

The bond trades below par because its 5% coupon is below the 6% market yield.

Step 3 -- Compute Macaulay duration. The present-value-weighted average time to cash flow is 7.8950 years

Step 4 -- Convert to modified duration. 7.8950 ÷ 1.03 = 7.6650 years

Step 5 -- Compute convexity. 71.7854

Step 6 -- Compute DV01. $925.61 × 7.6650 ÷ 10,000 = $0.71 per basis point

Step 7 -- Estimate the price change from duration alone. −7.6650 × 0.01 = −7.665%, and $925.61 × −7.665% = −$70.95

Step 8 -- Compute the convexity correction. 0.5 × 71.7854 × (0.01)² = 0.003589, and $925.61 × 0.3589% = +$3.32

Step 9 -- Combine the two terms. −$70.95 + $3.32 = −$67.63, a −7.31% price change

Step 10 -- Reprice the bond exactly at 7%. Re-discounting all 20 cash flows at 3.50% per period gives $857.88, a change of −$67.73

Step 11 -- Compare the errors. Duration alone: −$67.73 − (−$70.95) = $3.22 too pessimistic With convexity: −$67.73 − (−$67.63) = −$0.10 remaining, roughly a thirtieth of the error

What This Does Not Account For

  • Parallel shifts only. The yield shock is applied uniformly to the single yield to maturity. Real curves twist, steepen and flatten, and a portfolio hedged on parallel-shift duration is not hedged against a twist. Key rate durations are not computed here.
  • No accrued interest. The settlement fraction is fixed at zero, so the clean and dirty prices are equal and every figure sits on a coupon date. A bond priced between coupon dates has a different dirty price and a slightly different duration.
  • No option features. Callable, putable and convertible bonds have effective duration and can have negative convexity. This is a plain bullet bond model, and applying it to a callable bond will overstate duration once the bond trades near its call price.
  • No credit risk or spread duration. Everything is discounted at one yield. Spread-driven price moves are not separated from rate-driven ones.
  • No amortising or floating-rate structures. Mortgage-backed cash flows, sinking funds and floaters are outside the model.
  • Third-order and beyond. The estimate stops at the convexity term. The residual $0.10 at a 100 bps shock is that omission, and it grows with the cube of the yield move.
  • Rounding. Duration and convexity are carried at high precision; prices and dollar changes are rounded to the cent at each reporting step, so the two error columns can differ by a cent from a hand calculation.
  • The yield you enter is not sourced. No market data is embedded in this page.

Common Pitfalls

Treating modified duration as a percentage rather than a per-unit-yield sensitivity. A duration of 7.67 does not mean the bond falls 7.67%. It means it falls about 7.67% per 100 basis points. At a 25 bps move the estimate is roughly a quarter of that.

Using duration alone for large shocks. At 100 bps the duration-only error here is $3.22 on a $925.61 bond. Because the error scales with the square of the move, a 300 bps shock leaves an error roughly nine times as large. This is exactly why 2022 losses on long bonds surprised people who had only ever stress-tested small moves.

Confusing Macaulay and modified duration. Macaulay duration (7.89 years) is a weighted average time. Modified duration (7.67 years) is a price sensitivity. They differ by the factor $1 + y/f$, which grows as yields rise, so the gap widens in a high-rate environment.

Assuming a higher coupon means more rate risk. The opposite is true. A lower coupon pushes more of the bond's value out to the maturity payment, which lengthens duration. A 30-year 2% bond is the highest-duration ordinary shape there is.

Reading convexity as protection against loss. Convexity does not make losses smaller than they would otherwise be; it makes them smaller than duration alone predicts. The bond still falls $67.73 here.

Forgetting frequency. Semiannual is the US Treasury and corporate convention; most European government bonds pay annually. Changing the frequency changes the periodic discount rate and therefore both duration figures.

Frequently Asked Questions

What is the difference between Macaulay and modified duration?
Macaulay duration is the present-value-weighted average number of years until you receive the bond's cash flows. Modified duration is that figure divided by $(1 + y/f)$, and it measures percentage price change per unit of yield. At these inputs, 7.89 years and 7.67 years respectively.
How much does my bond fall if rates rise 1%?
At these defaults, about 7.31%, or $67.63 by the duration-plus-convexity estimate against a true $67.73. Duration alone would have said $70.95, which overstates the loss because it ignores the curvature of the price-yield relationship.
Why is convexity always a good thing to have?
The correction term is one half of convexity multiplied by the square of the yield change. A square is positive whichever way rates move, so for an ordinary bond with positive convexity the correction adds value on a rally and cushions the fall on a selloff. Callable bonds can have negative convexity, and that asymmetry is why they compensate you with a higher coupon.
What is DV01 and how is it different from duration?
DV01 is the dollar price change for a one basis point move: price times modified duration divided by 10,000, or $0.71 here. Duration is a percentage measure and is comparable across bonds; DV01 is a dollar measure and is what a trader actually hedges, because dollar risks are additive across a book and percentages are not.
Does a bond's face value change its duration?
No. Face value scales the price and the DV01 proportionally, but modified duration is a ratio and is unaffected. Coupon rate, yield, maturity and payment frequency are the four inputs that move it.
Why does the exact repricing differ from the estimate at all?
Because the Taylor expansion stops at the second order. Duration is the first derivative and convexity the second; the residual $0.10 here is everything from the third derivative onward. It grows with the cube of the yield move, which is why the approximation stays excellent for small shocks and degrades for large ones.

Sources

Modified duration is a closed-form definition rather than a published rate, so this page cites no statutory source. The implementation is in engine/primitives/bonds.ts and is covered by golden vectors in engine/vectors/bonds.test.ts.

  • Macaulay duration: $D_{mac} = \left(\sum_t t \cdot PV(CF_t)\right) / (P \times f)$, in years.
  • Modified duration: $D_{mod} = D_{mac} / (1 + y/f)$.
  • Convexity: $C = \left(\sum_t t(t+1) \cdot PV(CF_t)\right) / (P \times f^2 \times (1+y/f)^2)$.
  • Second-order price approximation: $\Delta P / P \approx -D_{mod}\,\Delta y + \tfrac{1}{2} C (\Delta y)^2$.
  • Face value, coupon, yield, maturity, frequency and the yield shock are all user inputs. No market data is embedded in this calculator.

Add This Website as Preferred Source on Google

See Bedrock Calculator first in your Search results & AI Overviews

Related calculators in this suite

Complementary financial planning tools