Bond Duration Calculator

Measure a bond’s interest rate sensitivity with Macaulay and modified duration. Enter coupon rate, yield, maturity, and payment frequency to see how cash flows are weighted over time and how price responds to changes in yield.

Tip: Use the same yield you would use for pricing the bond, then compare duration across bonds to understand relative interest rate risk.
Important: Duration is an approximation. Large yield changes, embedded options, or credit events can cause actual price moves to differ from the simple duration-based estimate. Use this tool as a guide, not a guarantee.

Bond duration formulas

Duration is a core concept in fixed income risk management. It measures how sensitive a bond’s price is to changes in yield and provides a time-weighted view of when cash flows are received. This calculator focuses on Macaulay duration and modified duration, the most widely used measures for plain-vanilla bonds.

1. Cash flow structure

Coupon per period = Face value × (Annual coupon rate ÷ Payments per year)
Number of periods = Years to maturity × Payments per year

Cash flow at each period t (1 ≤ t < N):
CF_t = Coupon per period

Final period (t = N):
CF_N = Coupon per period + Face value
        

These cash flows represent the regular coupon payments plus the principal repayment at maturity.

2. Present value of cash flows and price

Let y = yield to maturity (annual, decimal)
m = payments per year
Period yield = y ÷ m

Price = Σ [ CF_t ÷ (1 + Period yield)^t ], for t = 1 to N
        

The bond’s price is the sum of each cash flow discounted back to the present using the period yield.

3. Macaulay duration

Time in years at period t:
T_t = t ÷ m

Weight of cash flow t:
w_t = PV(CF_t) ÷ Price

Macaulay duration (in years):
D_Mac = Σ [ T_t × w_t ], for t = 1 to N
        

Macaulay duration is the weighted average time until cash flows are received, with weights based on present value.

4. Modified duration

Modified duration:
D_Mod = D_Mac ÷ (1 + y ÷ m)
        

Modified duration adjusts Macaulay duration for yield and payment frequency. It approximates the percentage price change for a 1 percentage point change in yield.

5. Price change approximation

Approximate price change:
ΔP / P ≈ − D_Mod × Δy

Where:
Δy = change in yield (decimal)
        

This linear approximation is most accurate for small yield changes and plain-vanilla bonds without embedded options.

How bond duration captures interest rate risk

Duration is often described as the “effective maturity” of a bond, but it is more precise than simply counting years. It tells you how long, on average, it takes to receive the bond’s cash flows, and how sensitive the price is to changes in yield. For investors building portfolios, duration is a key tool for aligning interest rate risk with their views and constraints.

Macaulay vs modified duration

Macaulay duration is expressed in years and is calculated as the weighted average time to receive each cash flow. The weights are based on the present value of each cash flow relative to the bond’s price. Modified duration takes Macaulay duration and adjusts it for the bond’s yield and payment frequency. The result is a measure that directly links yield changes to price changes: a modified duration of 7 implies roughly a 7% price move for a 1 percentage point change in yield, all else equal.

How the calculator models duration

When you enter face value, coupon rate, yield, years to maturity, and payment frequency, the calculator constructs the bond’s cash flow schedule. It then discounts each cash flow using the period yield implied by your annual yield input. The sum of these present values is the bond’s theoretical price. Each cash flow’s present value is divided by the price to obtain a weight, and the time in years for that cash flow is multiplied by its weight. Summing these contributions yields Macaulay duration. Finally, the tool divides Macaulay duration by (1 + yield ÷ payments per year) to obtain modified duration.

Worked example

Consider a 10-year bond with a face value of $1,000 and a 5% annual coupon, paid semiannually. The yield to maturity is 4.5% annual. You enter:

  • Face value: $1,000
  • Coupon rate: 5%
  • Years to maturity: 10
  • Yield to maturity: 4.5%
  • Payments per year: 2 (semiannual)

The calculator builds 20 semiannual coupon payments of $25 and a final payment of $1,025 at maturity. It discounts each cash flow using a period yield of 4.5% ÷ 2 = 2.25% per half-year. The present values sum to the bond’s price. Each cash flow’s present value is weighted by its time in years (period ÷ 2), and the weighted average time might come out around 7.8 years. Dividing by (1 + 0.045 ÷ 2) yields a modified duration slightly lower than 7.8, which you can use to approximate price changes.

Using duration in portfolios

Duration is especially useful when you manage a portfolio of bonds or bond funds. By comparing durations, you can see which holdings are more sensitive to rate moves. Longer-duration bonds will experience larger price swings when yields change, while shorter-duration bonds are more stable. Many investors target a specific portfolio duration that matches their investment horizon or risk tolerance. For example, a conservative investor might prefer a duration of 3–4 years, while a more aggressive investor might accept a duration of 7–10 years.

Practical tips

  • Use duration as a first-order measure of interest rate risk. For large yield changes or complex bonds, supplement it with scenario analysis.
  • Combine this tool with a yield-to-maturity calculator to see how price, yield, and duration interact.
  • Remember that credit risk and liquidity can also affect price moves—duration focuses on interest rate risk only.
  • For zero-coupon bonds, duration equals maturity, making them highly sensitive to rate changes compared with coupon-paying bonds of the same maturity.

Frequently Asked Questions

Why is duration lower than maturity?

Coupon payments bring cash flows forward in time, so the weighted average time to receive cash is shorter than the final maturity date. Only zero-coupon bonds have duration equal to maturity.

How accurate is the price change approximation?

Duration provides a linear approximation that works best for small yield changes and plain-vanilla bonds. For large moves or bonds with embedded options, actual price changes may differ.

What does a modified duration of 6 mean?

It means the bond’s price is expected to change by roughly 6% for a 1 percentage point change in yield, assuming other factors remain constant.

Can I use this for floating-rate bonds?

This tool assumes fixed coupons. Floating-rate bonds require more complex modeling because coupons reset with reference rates, which changes cash flows and duration over time.

Is this financial advice?

No. This tool is for education and planning. It helps you understand interest rate risk, but it is not personalized financial advice. Consider speaking with a qualified advisor before making investment decisions.

Can I export the duration schedule?

Yes. Use the Export CSV button to download the cash flow and weight schedule. You can import it into a spreadsheet to compare bonds or build custom charts.

Related tools