Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

136
Vistas
Calculating compound interest while underlying interest rate is increasing at a constant rate

Question:
How do I calculate the compound interest when the underlying interest rate is also increasing by a constant growth rate (e.g. 10%) annually?

Example:
$1000, interest rate 5% annually, for a period of 5 years.
This how I would calculate the compound interest:
Compound Interest
let principal = 1000;
let n = 1;
let t = 5;
let rate = 10;
let r = rate/100;
let compoundInterest = principal*Math.pow((1+r/n),nt);

But now I actually want the rate itself to increase by 10% each year after the first year has passed.
First year: 5%
Second year: 5% + (5 * 0,1) = 5,5%
Third year: 5,5% + (5,5 * 0,1) = 6,05%

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Given the starting conditions:

let startingPrincipal = 1000;
let numberOfYears = 5;
let startingRate = 10;
let rateIncreaseRate = 10;

You can calculate the interest yearly for each of the years, feeding it the updated balance, and new interest rate. I simplified the formula since you have yearly compounding and the calculation for each period is just 1. Let me know if you want to be able to compound differently within the year.

let yearlyInterest = startingRate;
let currentBalance = startingPrincipal;
for (let i = 0; i < numberOfYears; i++) {
    currentBalance *= 1 + yearlyInterest / 100;
    yearlyInterest *= 1 + rateIncreaseRate / 100;
}

console.log(currentBalance);

Output:

1777.9906868317107

Which you can round or trunc as needed by your requirements.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda