Bond Duration Cash-Flow Visualizer

Macaulay duration is the present-value-weighted average time to receipt of a bond's cash flows. Rather than a single maturity date, think of a bond as a stream of payments that arrive at different times. Duration answers the question: if you had to represent all those payments by a single date, what would it be? Formally, for a bond with \(n\) cash flows:

$$D_{\text{Mac}} = \frac{\displaystyle\sum_{t=1}^{n} t \cdot \frac{CF_t}{(1 + y/m)^t}}{P}$$

where \(CF_t\) is the cash flow at period \(t\), \(y\) is the yield to maturity, \(m\) is the coupon frequency, and \(P\) is the bond price. The numerator weights each time \(t\) by the present value of the cash flow received at that time; dividing by price gives a weighted average expressed in periods, then converted to years.

Modified duration is \(D_{\text{Mod}} = D_{\text{Mac}} / (1 + y/m)\). It measures the percentage price sensitivity to a small yield change: a 1 percentage-point rise in yield decreases the bond's price by approximately \(D_{\text{Mod}}\) percent.

The visualization

The bars show each cash flow as a fraction of the bond's total price (its present-value weight). Taller bars represent cash flows that matter more to the bond's current value. The orange dashed line marks the Macaulay duration — the literal "centre of gravity" of the cash-flow weights.

Coupon rate 5.0%
Yield to maturity (YTM) 5.0%
Years to maturity 10
Face value $1,000
Coupon frequency

Bond Metrics

Bond price $1,000.00
At Par
Macaulay duration 7.72 yrs
Modified duration 7.34 yrs
Years to maturity 10 yrs
Duration / Maturity 77.2%
Macaulay duration: DMac = Σ [ t × PV(CFt) ] / Price
Modified duration: DMod = DMac / (1 + y/m)
Price sensitivity: ΔP ≈ −DMod × P × Δy  (linear approximation)
Zero-coupon bond: DMac = maturity. Coupon bond: DMac < maturity.

Key takeaways

  1. Duration is not maturity. A coupon bond's duration is always shorter than its maturity because some cash flows arrive before the final repayment.
  2. Zero-coupon bonds are the exception. A zero-coupon bond has Macaulay duration exactly equal to its maturity because there is only one cash flow — the face value at maturity.
  3. Higher coupon rates shorten duration. Larger coupons shift the centre of gravity of cash flows earlier in time, reducing duration.
  4. Higher yields shorten duration. Discounting at a higher rate penalises distant cash flows more heavily, placing greater relative weight on near-term payments.
  5. Longer maturity increases duration, but with diminishing returns. At very long maturities (for coupon bonds) duration asymptotes — it does not grow without bound.

← Return to Investment Management Materials