Repository navigation
This is a full rewrite that updates function names and uses options-objects rather than positional arguments.
import { calculatePayment } from "@travishorn/financejs";
const payment = calculatePayment({
rate: 0.08 / 12,
periods: 10,
presentValue: 10000,
});
// -1037.0320893591638The old Excel-style API is still available via a subpath.
import { pmt } from "@travishorn/financejs/excel";
const payment = pmt(0.08 / 12, 10, 10000);
// -1037.0320893591638