Forum Discussion
Manual calculation formula for Duration
Presumably, you are asking about the Excel DURATION function (click here).
As usual, the Excel help page is woefully inadequate.
According to the help page, Excel DURATION calculates the Macaulay duration (click here).
If you are unfamiliar with the financial concept, be sure to also read the beginning of that wiki page (click here).
FWIW, you might also look at the implementation presented in a wallstreetmojo.com article (click here). See ERRATA, posted later.
I struggle with bond concepts. So I will not attempt to vet that information.
But looking briefly at the math formulas in the wiki page, it is obvious that, at the very least, they need to be modified to account for the various "day count" methods.
(Most presentations assume whole-year maturity and coupon schedules, so the "day count" method might not matter much -- except for accounting for leap years perhaps, but unlikely.)
In the "good old days", we might expect to find a description of the Excel implementation in the help page (albeit not always accurate) and/or a "KB" article.
I have not (yet) found anything like that from MSFT.