The Excel Mduration function calculates the Modified Macaulay Duration of a security that pays periodic interest, assuming a par value of $100.
The syntax of the function is:
Where the arguments are as follows:
settlement    The settlement date of the security (i.e. the date that the coupon is purchased).  
maturity    The maturity date of the security (i.e. the date that the coupon expires).  
coupon    The security's annual coupon rate.  
yld    The security's annual yield.  
frequency   
The number of coupon payments per year. This must be one of the following:


[basis]   
An optional integer argument which specifies the financial day count basis that is used by the security. Possible values are:

Note that the date arguments should be supplied to the function as either:
Warning: If you attempt to input text representations of dates into Excel functions, they may be interpreted differently, depending on the date system and date interpretation settings on your computer.
The following spreadsheet uses the Excel Mduration function to calculate the modified Macaulay Duration of a security that with a settlement date 01Apr2015, a maturity date 31Mar2025 and a yield of 8%. The coupon rate is 10% and payments are made quarterly.
A  B  

1  Settlement Date:  01Apr2015 
2  Maturity Date:  31Mar2025 
3  =MDURATION( B1, B2, 10%, 8%, 4 ) 
The above Mduration function returns the value 6.540828452 years.
Note that, in the above Mduration function call:
Further examples of the Excel Mduration function are provided on the Microsoft Office website.
If you get an error from the Mduration function, this is likely to be one of the following:
#NUM!   
Occurs if either:

#VALUE!   
Occurs if either:
