Skip to content

compoundInterest

compoundInterest(principal, rate, periods) → number · Financial

Calculate compound interest (total amount after compounding).

  • principal (required): initial amount

  • rate (required): interest rate per period as decimal

  • periods (required): number of compounding periods

bash
echo '{"principal": 1000, "rate": 0.05, "years": 10}' \
  | utlx -e 'compoundInterest($input.principal, $input.rate, $input.years)'
# 1628.89 (approximately)
utlx
{
  futureValue: compoundInterest($input.principal, $input.annualRate, $input.years)
}

Released under AGPL-3.0.