Bond Duration and Convexity Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

What duration and convexity measure

Duration summarizes a bond’s interest-rate sensitivity. It is commonly reported in years, but it is built from cash flows that occur in discrete coupon periods. The most common definitions are:

Convexity captures the curvature of the price–yield relationship. Adding convexity to a duration-based estimate improves accuracy when yield changes are not tiny.

Inputs (and unit conventions)

Core formulas used

Let:

Bond price (present value) is:

P = t=1 n CF t (1+y) t

Macaulay duration in periods is the PV-weighted average of t:

DMac,periods = (∑ t × PV(CFt)) / P

Converted to years:

DMac,years = DMac,periods / m

Modified duration (reported in years here) is:

DMod = DMac,years / (1 + y)

Convexity (one common discrete-compounding form) is:

Cx = [∑ t(t+1) × PV(CFt)] / [P × (1 + y)2]

Estimating the price impact of a yield shock

For a yield change Δy (in decimal terms, e.g., 1% = 0.01), a Taylor approximation for percentage price change is:

ΔP / P ≈ −DMod × Δy + ½ × Cx × (Δy)2

Interpretation: positive Δy (yields rise) tends to reduce price; convexity offsets some of that decline and boosts gains when yields fall.

How to interpret the results

Worked example

Suppose:

The calculator discounts each $25 coupon and the final ($25 + $1,000) redemption at (1 + 0.021)t, sums them to get price P, and then forms PV weights to compute duration and convexity.

If you also enter a yield shock of +1.00% (Δy = 0.01), the tool uses:

ΔP / P ≈ −DMod·0.01 + ½·Cx·(0.01)2

This gives a quick estimate of the percentage price change without fully repricing the bond at the shocked yield. For larger shocks, this approximation is usually better than duration-only, but still not exact.

Comparison table: duration vs convexity (what each adds)

Metric What it measures Typical unit Best use
Macaulay duration PV-weighted average timing of cash flows Years Comparing cash-flow timing; linking to modified duration
Modified duration First-order price sensitivity to yield % price change per 1.00 (i.e., 100%) yield change; commonly interpreted per 1% Quick small-move price impact estimate
Convexity Second-order curvature of price–yield Depends on convention (often “per yield-squared”) Improving estimates for non-trivial yield moves; comparing curvature across bonds

Assumptions and limitations (important)

References (definitions)

These are standard fixed-income definitions commonly taught in bond math and professional finance curricula (e.g., CFA Program fixed-income readings and widely used bond mathematics texts).

Duration assumes equal spacing between coupon payments. Enter zero in the yield change field if you only need duration and convexity.

Fill in the bond details to see duration.

Embed this calculator

Copy and paste the HTML below to add the Bond Duration and Convexity Calculator - Measure Interest Rate Risk to your website.