Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 734381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:22:01+00:00 2026-05-14T07:22:01+00:00

I need an formula for determining a debt payoff plan where the following are

  • 0

I need an formula for determining a debt payoff plan where the following are known: number of payments, amount per payment, and principal and need to figure out what the interest rate would be from that. I am re-factoring existing code and the current method uses the following (compounded = 12;interest rate starts at .1) :

 while (counter < 100)
    {
        intermediatePayment = (interestRate*(principal/compounded))/(1 - (1/Math.Pow(interestRate/compounded + 1,(compounded*numberOfYears))));
        interestIncrement = Math.Abs(interestRate - previousRate)/2;
        previousRate = interestRate;

        if(intermediatePayment == payment)
            break;
        if (intermediatePayment > payment)
            interestRate -= interestIncrement;
        else
            interestRate += interestIncrement;
        counter++;
    }

Now I understand what this formula does but I would never be able to arrive at it myself. What’s here is actually an equation that is supposed to be used to determine monthly payment if interest rate,principal, and number of payments is known. It is using brute force and looping (at most 100 times) until the calculated payment equals the desired payment. It arrives at an answer usually after about 40-50 loops and that could be optimized by reducing significant digits.

Seems to me if we just solved for interestRate there would be no looping. Try as I might, I can’t get the equation to solve for I, so that’s my main question.

Now, if you understand the problem well enough and know financial formulas and compounding interest, you might provide me with an even better solution altogether, which would be awesome. I have done significant research myself and found tools but not the raw equation, or more often I find different formulas for determining interest related stuff but am not knowledgeable to retool them for my needs.

Basically I’ve spent too much time on this and my boss thinks since the loop works I need to leave it be or ask for help. Fair enough, so I am. 🙂

Here’s a more traditional layout of the formula if that helps any: https://i.stack.imgur.com/qoglB.png

And for test data: if

  • P=45500
  • c=12
  • y=3
  • m=1400

then

  • I = .0676

Thanks for the help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T07:22:01+00:00Added an answer on May 14, 2026 at 7:22 am

    If you attempt to solve the formula you linked to for I, the interest rate, you’ll find that you get a polynomial of degree cy+1, that is, the total number of payments plus one. It is difficult/impossible to find closed form solutions to high degree polynomials, so an approximation is the best you can do.

    The algorithm you’ve given has some nice properties: it is pretty clear what it is doing, and it gives the right answer in a reasonable amount of time. My attitude would therefore be “if it ain’t broke don’t try to fix it”.

    If it turned out that this algorithm was too slow for some reason then there are algorithms which converge to the right answer faster; you could work out what the polynomial you need to find roots of is, work out its derivative using simple calculus, and then use Newton’s Method to converge to the roots faster. But for this simple example where the answer only has to be accurate to four decimal places anyway, that seems like overkill.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am Need of Formula to Accurately Calculate Bandwith for 1 Gig Nic Card.
Need to locate the following pattern: The letter I followed by a space then
I need a formula to return the value of Data for the last match
I need a formula to extract the last two words in a cell using
I need a formula that is beyond me and my Excel skills, I need
I need a formula for showing results on my classifieds website. I am now
I need to develop a SQL Procedure,i am having 2 table one,with following details
I need to solve the following question which i can't get to work by
Assume a simple sheet like so: ------------- | 1 | a | Need formula
Here is 2 columns of data. I need to write a formula to compare

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.