In this short post, you’ll see how to calculate the bond duration. More specifically, you’ll see 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**t**= Time in years associated with each coupon payment_{i}

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

MacD ModD = (1+YTM/m)

## 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:

**t**= 0.5 years_{1 }**t**= 1 years_{2 }**t**= 1.5 years_{3 }**t**=_{4}**t**= 2 years_{n}

Pay special attention for the *last period* (**t _{4}**=

**t**= 2 years) which requires both coupon payment

_{n}*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**