How to Calculate the Bond Duration (example included)

In this short post, I’ll show you how to calculate the bond duration. More specifically, I’ll show you how to calculate the:

  • Macaulay duration; and
  • Modified duration

To start, here is the formula that you can use to calculate the Macaulay duration (MacD):

          (t1*FV)(C)                  (tn*FV)(C)           (tn*FV)   
MacD = (m*PV)(1+YTM/m)mt1  + ... + (m*PV)(1+YTM/m)mtn  + (PV)(1+YTM/m)mtn

Where:

  • m = Number of payments per period
  • YTM = Yield to Maturity
  • PV = Bond price
  • FV = Bond face value
  • C = Coupon rate
  • ti = Time in years associated with each coupon payment

Once you calculated the Macaulay duration, you can then apply the following formula to get the Modified Duration (ModD):

          MacD   
ModD =  (1+YTM/m)

In the next section, I’ll review a simple example to show you how to calculate the bond duration.

Example of calculating the bond duration

Imagine that you have a bond, where the:

  • Coupon rate is 6% with semiannually payments
  • Yield to maturity (YTM) is 8%
  • Bond’s price is 963.7
  • Bond’s face value is 1000
  • Bond matures in 2 years

(1) What is the bond’s Macaulay duration?
(2) What is the bond’s Modified duration?

The Solution – Calculating the Macaulay duration

Since we are dealing with semiannually payments each year, then the number of payments per period (i.e., per year) is 2. Therefore, for our example, m = 2.

Here is a summary of all the components that can be used to calculate Macaulay duration:

  • m = Number of payments per period = 2
  • YTM = Yield to Maturity = 8% or 0.08
  • PV = Bond price = 963.7
  • FV = Bond face value = 1000
  • C = Coupon rate = 6% or 0.06

Additionally, since the bond matures in 2 years, then for semiannual bond you’ll have a total of 4 coupon payments (one payment every 6 months), such that:

  • t1 = 0.5 years
  • t2 = 1 years
  • t3 = 1.5 years
  • t4=tn= 2 years

Pay special attention for the last period (t4=tn= 2 years) which requires both coupon payment as well as final principal repayment.

Recall that the formula to calculate Macaulay duration (MacD) is:

          (t1*FV)(C)                  (tn*FV)(C)           (tn*FV)   
MacD = (m*PV)(1+YTM/m)mt1  + ... + (m*PV)(1+YTM/m)mtn  + (PV)(1+YTM/m)mtn

Let’s now plug all those components within the MacD formula:

          (0.5*1000)(0.06)           (1*1000)(0.06)           (1.5*1000)(0.06)          (2*1000)(0.06)            (2*1000)      
MacD = (2*963.7)(1+0.08/2)2*0.5  + (2*963.7)(1+0.08/2)2*1 + (2*963.7)(1+0.08/2)2*1.5 + (2*963.7)(1+0.08/2)2*2 + (963.7)(1+0.08/2)2*2

MacD = 0.01496 + 0.02878 + 0.04151 + 0.05322 + 1.7740 = 1.9124

Now let’s see how to calculate the Modified duration.

Calculating the Modified duration

To calculate the Modified duration (ModD), you’ll need to use this formula:

          MacD   
ModD =  (1+YTM/m)

In the context of our example:

          1.9124   
ModD =  (1+0.08/2)  

The Modified duration is therefore =  1.838

Conclusion

Calculating bond duration can be a tedious task, especially if you have a bond with a maturity far into the future. Luckily, there are tools that can help you calculate the bond duration.

Note that if the bond’s price is not provided, you may refer to the following source that explains how to calculate the bond’s price.