Skip to main content

Compound interest with periodic contributions. Future value, present value, time-to-target. Free, MIT.

Project description

calcfi-compound-interest

Compound interest with periodic contributions. Future value, present value, time-to-target. Free, MIT.

CalcFi Compound Interest Calculator — a single-purpose, MIT-licensed helper for Compute future value of regular contributions at compound rate (FV = PMT × [(1+r)^n − 1] / r), plus present value, time-to-target, and per-decade contribution breakdowns.

License: MIT ORCID CalcFi

What this does

Compute future value of regular contributions at compound rate (FV = PMT × [(1+r)^n − 1] / r), plus present value, time-to-target, and per-decade contribution breakdowns.

Formula — Future value with regular contributions:

FV = PMT × [(1+r)^n − 1] / r

Primary source: Standard textbook compound interest formula

Install

pip install calcfi-compound-interest

Usage

from calcfi_compound_interest import future_value

# $500/month at 8% for 30 years
fv = future_value(500, 0.08, 30)
# ~745,180

Live calculator

Try the interactive web calculator with full UI at https://calcfi.app/calculators/compound-interest — 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-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-amortization — Generate a full amortization schedule for a fixed-rate loan: payment, principal, interest, balance per period. 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-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-amortization — Generate a full amortization schedule for a fixed-rate loan: payment, principal, interest, balance per period. 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-compound-interest: CalcFi Compound Interest Calculator.
DOI: 10.6084/m9.figshare.32332290 (parent CalcFi Open Data dataset).
Available: https://calcfi.app/calculators/compound-interest

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

calcfi_compound_interest-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

calcfi_compound_interest-0.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file calcfi_compound_interest-0.1.0.tar.gz.

File metadata

  • Download URL: calcfi_compound_interest-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for calcfi_compound_interest-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f917923805ae63d38c6da93e5bb445212fbc08e03fc9c08a9ba62755b088868a
MD5 3c11171d7a0c9049f2edfcb49022e2c6
BLAKE2b-256 09044c59868a4f59165ca360ae89e8ed8fedc2adec80ea0a3cf7edb6eada4ad9

See more details on using hashes here.

File details

Details for the file calcfi_compound_interest-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for calcfi_compound_interest-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0acae487c73ce037e41166a0d9e22d9815e9d131fabc65531e340feef18cd034
MD5 a10e3b16581f80c76c9459c4e113f73f
BLAKE2b-256 8dd42cfeb52a6cd220c84125140ab8eb0b456fdac10c10d2625522d190b3b350

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page