Bond Duration Calculator & Convexity

Bond Duration Calculator & Convexity

Calculate Macaulay duration, modified duration, convexity, and DV01 for fixed-income bonds. Simulate yield curve shocks with exact Taylor series repricing.

Regime label

Sec core inputs

$ USD
$1,000
4.25%
10.00 Unit years
4.35%

Sec accrual portfolio

ACT_ACT
15%
0.0 (Badge quoted price)0.5 (Badge accrued)0.99 (Badge settlement total)
5,000 Unit bonds

Sec macro tax variables

Badge cfa spec
24%
Lbl tax free24%Lbl top fed
2.5%
Lbl stableLbl fed targetLbl elevated
Metric macaulay durationBadge cash flow horizon
8.166Unit years

Desc macaulay

Metric modified durationBadge linear sensitivity
7.992Unit years

Desc modified

Metric convexityBadge curvature
76.145Unit years sq

Desc convexity

Metric dv01 per bondBadge per bond risk
$0.7954

Desc dv01 bond

Metric clean price$991.98
Metric accrued interest$3.19
Metric dirty price$995.17
Metric dv01 portfolio$3,976.81

Chart title price yield

Chart desc price yield

Chart legend exactChart legend taylorChart legend linear
$1,272$1,143$1,014$885$7571.35%2.85%4.35%5.85%7.35%
0 Unit bps (4.35% Lbl ytm abbr)
Th exact price$995.17
Th linear price$995.17
Th convexity cushion+$0.00
Metric dv01 portfolio+$0

Tbl shock heading

Tbl shock desc

Th shock bpsTh new ytmTh exact priceTh linear priceTh taylor priceTh convexity cushionTh linear error
-300 Unit bps1.35%$1,271.71$1,233.78$1,267.88+$34.10-2.98%
-200 Unit bps2.35%$1,170.50$1,154.24$1,169.40+$15.16-1.39%
-100 Unit bps3.35%$1,078.63$1,074.70$1,078.49+$3.79-0.36%
-50 Unit bps3.85%$1,035.90$1,034.94$1,035.88+$0.95-0.09%
-25 Unit bps4.10%$1,015.29$1,015.05$1,015.29+$0.24-0.02%
+25 Unit bps4.60%$975.52$975.28$975.52+$0.24-0.02%
+50 Unit bps4.85%$956.33$955.40$956.35+$0.95-0.10%
+100 Unit bps5.35%$919.29$915.63$919.42+$3.79-0.40%
+200 Unit bps6.35%$850.26$836.09$851.25+$15.16-1.67%
+300 Unit bps7.35%$787.41$756.56$790.66+$34.10-3.92%

Disclaimer title Disclaimer text

Stat1 label+$83.46
+7.99% Lbl approx
Stat2 label$-75.87
-7.99% Lbl approx
Stat3 label+$3.79
0.381% Lbl gain

Client-Side Processing

High-performance calculation executed entirely in browser memory.

Zero Server Upload Privacy

All payloads remain strictly local with zero external server communication.

Production Ready Export

Clean, optimized output formats ready for immediate deployment.

Technical Reference & Architecture Guide

Bond Duration Calculator & Convexity Guide

Calculate Macaulay duration, modified duration, convexity, and DV01 for fixed-income bonds. Simulate yield curve shocks with exact Taylor series repricing.

Bond Duration Calculator & Convexity Guide — Client-Side In-Memory Architecture & Data Flow
Bond Duration Calculator & Convexity Guide — Client-Side In-Memory Architecture & Data Flow

Key Parameters & Controls

parValueCurrency ($ USD / EUR)

Nominal principal amount repaid at maturity, conventionally standardized at $1,000 for US corporate and municipal bonds or $100 for Treasury benchmarks. Serves as the par redemption base for all periodic coupon cash flows and terminal face value settlement.

Default: 1000
couponRateAnnual Percentage Rate (% APR)

Contractual nominal annual coupon rate paid by the bond issuer. Standard investment-grade benchmark debt trades between 2.0% and 6.5%, whereas high-yield corporate tranches exceed 7.0%. For original issue discount (OID) instruments and zero-coupon STRIPS, enter 0.0%.

Default: 5.0
ytmYield to Maturity (% Annualized)

Market discount rate and internal rate of return (IRR) required by investors under current term structure conditions. Par bonds trade at YTM equal to coupon rate; discount bonds trade at YTM > coupon; premium bonds trade at YTM < coupon. Mathematical boundary must strictly exceed -100%.

Default: 4.5
yearsToMaturityTenor (Years to Maturity)

Remaining calendar time until legal bond maturity and principal redemption. Liquid benchmark tenors align with US Treasury curves (2, 5, 7, 10, 20, and 30 years). Duration expands with maturity, while convexity scales non-linearly with approximately the square of maturity.

Default: 10.0
couponFrequencyCompounding Frequency (Periods / Year)

Annual coupon distribution schedule: 1 for European annual bullet bonds, 2 for US Treasury notes/bonds and corporate debentures (semi-annual), 4 for quarterly floating tranches, and 12 for monthly amortizing MBS securities. Higher frequency expedites cash-flow realization, decreasing duration.

Default: 2
yieldShockBpsInterest Rate Shock (Basis Points Δy)

Instantaneous parallel yield curve shift scenario (100 bps = 1.00% = 0.0100 decimal yield change). Standard regulatory stress tests (such as Basel III and Federal Reserve CCAR banking book scenarios) model instantaneous interest rate shocks ranging between ±50 bps and ±300 bps.

Default: 100

Pro Tips & Best Practices

Beware the Negative Convexity Trap in Callable Bonds and MBS

While vanilla sovereign and bullet corporate debt exhibit positive convexity (prices rise faster when rates drop than they fall when rates climb), callable bonds and agency mortgage-backed securities (MBS) flip into negative convexity as market yields drop below the coupon strike. Refinancing prepayment spikes compress upside price appreciation while leaving downside yield shock risk unhedged. Never use linear modified duration or standard convexity formulas for callable instruments—always calculate effective duration using option-adjusted spread (OAS) binomial lattice modeling.

Deep-Discount Long-Term Bonds Break the Linear Maturity Rule

While duration generally expands with maturity, deep-discount bonds (trading significantly below par with low coupons and high YTM) exhibit a mathematical reversal: duration peaks at intermediate horizons (typically 40–60 years) and then actually declines as maturity approaches infinity (consol perpetuities). For a perpetuity, Macaulay duration equals (1 + y)/y regardless of infinite tenor. When trading ultra-long sovereign debt (e.g., 50-year or 100-year tranches), verify whether your asset lies past this critical duration turnaround inflection point.

Compounding Basis Mismatch: Semi-Annual BEY vs Continuous Compounding

A frequent institutional hedge breakdown occurs when traders compute modified duration using semi-annual bond equivalent yield (BEY) compounding (ModD = MacD / (1 + y/2)) but model swap or futures hedges under continuously compounded money-market curves (where ModD = MacD). Under a 6.0% yield, this compounding mismatch introduces a 300 basis point (3%) valuation skew in cross-market DV01 neutralization, producing unintended basis risk in liability-driven investment (LDI) hedging.

Taylor Series Approximation Breakdown Under Macro Rate Regime Shifts

The second-order Taylor series approximation (%ΔP ≈ -ModD·Δy + 0.5·Convexity·(Δy)²) works with >98% accuracy for modest parallel shifts under ±100 bps. However, during systemic regime shifts (e.g., 300–500 bps tightening cycles or flight-to-safety liquidity panics), third-order terms (negative skewness and dispersion) cause significant divergence. For portfolio stress tests under extreme rate shocks, always reprice the bond's full discounted cash-flow schedule from scratch rather than relying on duration-convexity shortcuts.

Common Gotchas & Troubleshooting

⚠️Estimated Bond Repricing Exceeds Actual Market Valuation During Steep Yield Drops

This discrepancy occurs when applying simple first-order modified duration without convexity adjustment, or when evaluating a premium bond nearing its call date. First-order duration is a linear tangent line; for large yield drops (-200 bps), linear duration systematically underestimates positive price appreciation on non-callable debt. Add the second-order term: +0.5 × Convexity × (Δy)². If the bond is callable, the issue is structural price compression towards the call strike price; replace modified duration with effective duration derived from a numerical binomial interest rate tree.

⚠️Macaulay Duration Value Exceeds the Bond's Total Years to Maturity

Macaulay duration can mathematically never exceed maturity for non-leveraged fixed-rate bonds because the final principal cash flow anchors the maximum horizon. If your calculation yields MacD > Maturity, check two common data input errors: (1) coupon rate entered as a decimal (e.g., 0.05) instead of percentage or vice-versa relative to discount rate, or (2) annual coupon frequency variable set to zero, causing a division by zero error in the cash-flow time weighting algorithm. For zero-coupon bonds, MacD must strictly equal Maturity; for coupon bonds, MacD must be strictly less than Maturity.

⚠️DV01 Hedge Ratio Fails to Immunize Portfolio Against Yield Curve Twists

DV01 immunization strictly assumes a uniform parallel shift across all maturities on the zero-coupon spot curve. In reality, yield curves frequently undergo non-parallel twists: steepening (short rates drop relative to long rates), flattening, or butterfly curvature shocks. To immunize against non-parallel curve dynamics, decompose portfolio interest rate risk into Key Rate Durations (KRDs) across targeted liquid vertices (2Y, 5Y, 10Y, 30Y) and match dollar durations across each discrete tenor bucket rather than relying on a single aggregate portfolio DV01.

Frequently Asked Questions

What is the difference between Macaulay duration and modified duration?▼

Macaulay duration measures the weighted average time (in years) until an investor receives the bond's cash flows, where the weights are the present values of those cash flows. Modified duration takes Macaulay duration and divides it by (1 + y/m), where y is the yield to maturity and m is the compounding frequency per year. Modified duration measures the direct percentage price sensitivity of the bond with respect to a 100 bps (1%) change in yield.

How do you calculate bond convexity and why does it matter?▼

Convexity is the second derivative of bond price with respect to yield divided by the bond price. It captures the curvature of the non-linear price-yield curve. While modified duration assumes a straight linear relationship, actual bond prices increase more when interest rates drop than they fall when interest rates rise (for non-callable bonds). Incorporating convexity provides the second-order Taylor series adjustment, making price change estimates vastly more accurate for large yield shifts.

What is DV01 and how is dollar duration calculated?▼

DV01 (Dollar Value of an 01) is the monetary change in bond price resulting from a 1 basis point (0.01% or 0.0001) parallel shift in yield. It is calculated as DV01 = Bond Price × Modified Duration × 0.0001. Dollar duration is the price change for a full 1% (100 bps) shift, equal to DV01 × 100. Portfolio managers use DV01 to calculate the exact hedge ratio required using interest rate futures or interest rate swaps.

Why does a zero-coupon bond have a duration equal to its maturity?▼

A zero-coupon bond delivers 100% of its cash flow on the exact final maturity date with no interim coupon payments. Because there are no intermediate cash flows to pull the weighted average payment time forward, its Macaulay duration exactly equals its years to maturity (e.g., a 20-year zero-coupon bond has a Macaulay duration of exactly 20.0 years).

How do coupon rate and yield to maturity impact bond duration?▼

Higher coupon rates decrease duration because larger intermediate cash flows return principal earlier, shifting the cash-flow center of gravity forward. Higher yields to maturity also decrease duration because cash flows occurring far in the future are discounted at higher discount factors, diminishing their relative weight compared to earlier coupons.

How does the duration and convexity Taylor series estimate bond price changes?▼

Disclaimer: This tool is provided strictly for educational and informational purposes only and does not constitute formal financial advice or a binding loan commitment. Please consult a qualified financial advisor before making decisions. The combined formula is %ΔPrice ≈ -[Modified Duration × Δy] + [0.5 × Convexity × (Δy)²], where Δy is the decimal change in yield (e.g., +0.01 for +100 bps). For a +100 bp rate rise on a bond with ModD = 7.5 and Convexity = 70: Linear duration estimates a -7.50% drop, but the positive convexity adjustment adds +0.5 × 70 × (0.01)² = +0.35%, yielding an accurate net estimated price decline of -7.15%.

Related Tools & Utilities

All Tools →