Interés simple
fin-simple-interestCalcula el interés simple I = P·r·t y monto total, con tiempo en años, meses o días. 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 valor futuro con interés compuesto (fin-compound-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 simple interest I = P·r·t and the total amount, with time in years, months or days (actual/365 or 360 basis). When: a money, tax or financial-math result has to be exact and reproducible (rounding, cents, rates). Not for: computing the future value with compound interest (fin-compound-interest). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| time | Yes | Time (number; required; min 0; max 100000). | |
| unit | No | Time unit (optional; one of: years, months, days; default "years"). | years |
| day_basis | No | Days per year (optional; one of: 365, 360; default "365"). | 365 |
| principal | Yes | Principal (number; required; min 0). | |
| annual_rate | Yes | Annual rate, decimal (number; required; min 0; max 10). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| total | No | ||
| interest | No |