Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

132
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!