The general calculation of Macaulay duration, MacDur, that also accounts for partial coupon periods if the calculation is done between coupon dates
where
- t is the number of days from the last coupon payment to the settlement date;
- T is the number of days in the coupon period;
- t/T is the fraction of the coupon period that has passed since the last payment;
- PMT is the coupon payment per period;
- FV is the future value paid at maturity, or the par value of the bond;
- r is the yield-to-maturity per period; and
- N is the number of evenly spaced periods to maturity as of the beginning of the current period.
Finally, another approach to calculating Macaulay duration is to use a closed-form equation derived using calculus and algebra,
where
- r is the yield-to-maturity per period;
- N is the number of evenly spaced periods to maturity as of the beginning of the current period;
- c is the coupon rate per period;
- t is the number of days from the last coupon payment to the settlement date; and
- T is the number of days in the coupon period.









