Formualizer Docs

NPER

Calculates the number of periods needed to satisfy a cash-flow target.

Use this to solve term length when periodic rate, payment, and value constraints are known.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=NPER(rate, pmt, pv, [fv], [type])

Arguments

ArgumentTypeRequiredDefault
ratenumberRequired—
pmtnumberRequired—
pvnumberRequired—
fvnumberOptional—
typenumberOptional—

Remarks

  • rate is the interest rate per period.
  • Cash-flow sign convention: at least one of pmt, pv, or fv should usually have opposite sign.
  • type = 0 means payments at period end; type != 0 means period start.

Error cases

  • Returns #NUM! when inputs imply no finite solution (for example, invalid logarithm domain).
  • Returns #NUM! when both rate = 0 and pmt = 0.

Examples

Estimate the payment count for a 1,200 balance with monthly payments.

Formula =NPER(0.05/12,-100,1200)

Expected result 12.3360195270412

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Move the payment date to the beginning of each month.

Formula =NPER(0.05/12,-100,1200,0,1)

Expected result 12.2835029522066

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

At zero interest the balance falls by the payment amount each month.

Formula =NPER(0,-100,1200)

Expected result 12

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

A nonzero balance cannot be retired with zero payments at zero interest.

Formula =NPER(0,0,1200)

Expected result #NUM!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Recover the 360 monthly payments of a 300,000 mortgage.

Formula =NPER(0.06/12, -1798.65157545827, 300000)

Expected result 360

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Find how many 250 payments retire a 5,000 balance at zero interest.

Formula =NPER(0, -250, 5000)

Expected result 20

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

Why does NPER return #NUM! for some sign combinations?

If the logarithm domain is non-positive (or rate=0 with pmt=0), there is no finite solution and #NUM! is returned.

Implementation

Engine source

On this page