With one compounding period per year, periods = years.

With 4 compounding periods per year, periods = quarters, and so on.

Example

Assume you have $5,000 to invest at an annual rate of 5%.

Excel NPER function

With these inputs, PDURATION returns 166.70 periods.

Since interest is compounded monthly, periods correspond to months.

To convert to years, the formula in F6 is:

NPER Function