Module

x/financial/src/financial.ts>rate

A Zero-dependency TypeScript/JavaScript financial library (based on numpy-financial) for Node.js, Deno and the browser
Latest
function rate
import { rate } from "https://dotland.deno.dev/x/financial@v0.1.3/src/financial.ts";

Compute the rate of interest per period

Parameters

nper: number
  • Number of compounding periods
pmt: number
  • Payment
pv: number
  • Present value
fv: number
  • Future value
optional
when = [UNSUPPORTED]
  • When payments are due ('begin' or 'end')
optional
guess = [UNSUPPORTED]
  • Starting guess for solving the rate of interest
optional
tol = [UNSUPPORTED]
  • Required tolerance for the solution
optional
maxIter = [UNSUPPORTED]
  • Maximum iterations in finding the solution

Returns

number

the rate of interest per period (or NaN if it could not be computed within the number of iterations provided)