npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

calcfi-amortization

v0.1.0

Published

Generate a complete amortization schedule for a fixed-rate loan. Returns list of payments with monthly principal, interest, and remaining ba

Readme

calcfi-amortization

Generate a full amortization schedule for a fixed-rate loan: payment, principal, interest, balance per period. MIT.

CalcFi Amortization Schedule Generator — a single-purpose, MIT-licensed helper for Generate a complete amortization schedule for a fixed-rate loan. Returns list of payments with monthly principal, interest, and remaining balance.

License: MIT ORCID CalcFi

What this does

Generate a complete amortization schedule for a fixed-rate loan. Returns list of payments with monthly principal, interest, and remaining balance.

Formula — Per-period principal + interest split:

interest_i = balance_(i-1) × r;  principal_i = M − interest_i

Primary source: Standard amortization formula

Install

npm install calcfi-amortization

Usage

import { amortizationSchedule } from "calcfi-amortization";

const sched = amortizationSchedule(400_000, 0.065, 30);
sched[0]; // { period, payment, principal, interest, balance }

Live calculator

Try the interactive web calculator with full UI at https://calcfi.app/calculators/mortgage-amortization — no signup required.

Why this package exists

Most personal-finance calculators are buried in advertising-heavy lead-generation sites. The math is freely published by federal agencies and textbooks, but the implementations are wrapped in proprietary opaque code. CalcFi publishes these utility libraries to make every formula:

  1. Reproducible — show the math
  2. Cited — link to primary sources
  3. Free — MIT license, no paid tier
  4. Auditable — every line of code is open source

The math here is undergraduate-level. The contribution is the citation discipline and the open distribution.

Part of the CalcFi ecosystem

This package is one of 8 single-purpose helper utilities. Cross-mesh:

Sibling Python packages

  • calcfi-mortgage-payment — Standard amortizing-loan monthly payment formula. Free, cited, MIT.
  • calcfi-compound-interest — Compound interest with periodic contributions. Future value, present value, time-to-target. Free, MIT.
  • calcfi-rule-of-72 — Rule of 72 — approximate years to double an investment at a given rate. Plus exact ln(2) version. MIT.
  • calcfi-apr-apy — Convert between APR (simple annual rate) and APY (effective annual yield including compounding). MIT.
  • calcfi-real-return — Inflation-adjusted (real) return from nominal return. Formula: real = (1+nominal)/(1+inflation) − 1. MIT.
  • calcfi-tax-bracket — US federal income tax bracket math — marginal rate, effective rate, total tax owed. 2024-2026 brackets per IRS Rev. Proc. MIT.
  • calcfi-debt-payoff — Snowball vs avalanche debt payoff strategies. Compute months and total interest. MIT.

Sibling npm packages

  • calcfi-mortgage-payment — Standard amortizing-loan monthly payment formula. Free, cited, MIT.
  • calcfi-compound-interest — Compound interest with periodic contributions. Future value, present value, time-to-target. Free, MIT.
  • calcfi-rule-of-72 — Rule of 72 — approximate years to double an investment at a given rate. Plus exact ln(2) version. MIT.
  • calcfi-apr-apy — Convert between APR (simple annual rate) and APY (effective annual yield including compounding). MIT.
  • calcfi-real-return — Inflation-adjusted (real) return from nominal return. Formula: real = (1+nominal)/(1+inflation) − 1. MIT.
  • calcfi-tax-bracket — US federal income tax bracket math — marginal rate, effective rate, total tax owed. 2024-2026 brackets per IRS Rev. Proc. MIT.
  • calcfi-debt-payoff — Snowball vs avalanche debt payoff strategies. Compute months and total interest. MIT.

Companion data

The mortgage rate, inflation, Treasury yield, and macro data used to validate these calculators are published as CalcFi Open Data — 34 free CC BY 4.0 time series, 117,956 observations, 5 permanent DOIs.

Calculators on CalcFi (free, no signup)

Every formula in these packages has a live web calculator at calcfi.app:

License

MIT. Author: Jere Salmisto (ORCID 0009-0000-0916-8684), founder of CalcFi. Based in Helsinki, Finland.

Citation

If you cite this package in research:

Salmisto, J. (2026). calcfi-amortization: CalcFi Amortization Schedule Generator.
DOI: 10.6084/m9.figshare.32332290 (parent CalcFi Open Data dataset).
Available: https://calcfi.app/calculators/mortgage-amortization

Or use the CITATION.cff on the parent dataset for the BibTeX entry.