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 6530359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:44:45+00:00 2026-05-25T09:44:45+00:00

I am currently trying to calculate a monthly payment plan in C# given a

  • 0

I am currently trying to calculate a monthly payment plan in C# given a loan amount, a rate, and a duration in years.

My professor provided a executable version of the assignment, but with no code.
Along with that he has given us the formula to calculate monthly payments:

enter image description here

To get the APR, the user entered the Percentage in a text box and I divided the number by 100 to get it in a decimal.

To get the Duration, the user entered the Years in a text box and I the multiplied the number by 12 to get it in months.

My C# code looks like this:

payment = (loanAmount*aprPercent) / (1-Math.Pow((1+aprPercent), -durationMonths));

I have triple checked to see that that code follows the formula my professor provided.

Yet when I use the exact same input in my professors executable as I do in my application the numbers are way off.

For Example:
I enter 12% APR, 12 Years Duration, and 12 Dollar LoanAmount on both mine and my professors application. His comes to a $0.16 monthly payment and mine comes to a $1.44 monthly payment.

Remember that I did devide 12%/100 to get a .12 for aprPercent. And multiplied 12*12 to get durationMonths. So I do not see why our outputs are way different.

Please note that this is not the extent of my assignment, this is just a part of the assignment that I need to figure out before I can finish the rest of the assignment. It is due friday of next week, so I did not procrastinate. I am not trying to use the people of StackOverflow to solve my homework for me, I am using them as a resource to help me solve my issue and will state this thread in the comments of my application.

  • 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-25T09:44:46+00:00Added an answer on May 25, 2026 at 9:44 am

    You should be using the monthly percentage figure for the rate, not the yearly one. This is fairly evident since, at $1.44 a month, you’d pay off your loan in about nine months rather than twelve years 🙂

    12% p.a. gives you a yearly aprPercent of 0.12 but the monthly equivalent is 0.12 / 12 = 0.01:

        12 x 0.01
      ------------
              -144
      1 - 1.01
    
    
            0.12
    = ---------------
      1 - 0.238628425
    
    
          0.12
    = -----------
      0.761371575
    
    
    = 0.157610297
    

    Or sixteen cents, as your educator has told you.

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

Sidebar

Related Questions

I am currently trying out Project Euler and one of the question is calculate
I am currently trying to calculate rigid transformation between two point sets so I
I am currently trying to develop an algorithm to calculate which known locations are
I' trying to use window.pageYOffset & window.scrollMaxY to calculate the current page progress. This
I currently trying to find a solution, how to ensure that a test fails
I'm currently trying to read in an XML file, make some minor changes (alter
I'm currently trying out db4o (the java version) and I pretty much like what
I'm currently trying to build a personal website to create a presence on the
I'm currently trying to port a SIP stack library (pjSIP) to the PSP Console
I'm currently trying to get into the Java EE development with the Spring framework.

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.