Interés compuesto
fin-compound-interestCalcula el valor futuro con interés compuesto A = P(1 + r/n)^(n·t), con aportes periódicos opcionales. Cuándo: un cálculo de dinero, impuestos o matemática financiera tiene que ser exacto y reproducible (redondeo, centavos, tasas). No para: calcular el interés simple I = P·r·t y monto total, con tiempo en años, meses o días (fin-simple-interest). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Computes the future value of a principal with compound interest A = P(1 + r/n)^(n·t), optional regular contributions at period end, and the interest earned. When: a money, tax or financial-math result has to be exact and reproducible (rounding, cents, rates). Not for: computing the simple interest I = P·r·t and the total amount, with time in years, months or days (fin-simple-interest). [EN completo / full EN: inputSchema.description]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| years | Yes | Years (number; required; min 0; max 1000). | |
| principal | Yes | Initial principal (number; required; min 0). | |
| annual_rate | Yes | Annual nominal rate, decimal (number; required; min 0; max 10). | |
| contribution | No | Contribution per period (number; optional; default 0; min 0). | |
| compounds_per_year | No | Compounding periods per year (integer; optional; default 12; min 1; max 365). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| future_value | No | ||
| interest_earned | No | ||
| total_contributed | No |