duration vs. weighted average life?

I’m trying to understand the difference of duration and WAL in terms of how they are calculated (not their ultimate use). From what I think I understand, duration is calculated as the time to the maturity weighted by the present value of the cash flows (principal and interest). WAL is the time to maturity weighted by undiscounted principal flows. Is this correct?

Correct. WAL (or just average life) is more used for MBS to measure the effect on prepayment (thus shorten its life). Duration is used in connection of measurement of interest rate risk. Your definition refers to Macaulay duration. This duration is not appropriate for MBS since it assumes that when interest rates change, the cash flows do not change. One will use effective duration instead for measuring MBS’s duration.

Great, thanks.