dcsimg
Results 1 to 5 of 5

Thread: [RESOLVED] Compound Interest Over Period Less Than 1 Year

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2017
    Posts
    240

    Resolved [RESOLVED] Compound Interest Over Period Less Than 1 Year

    Compound Interest can be compounded over different periods
    such as daily, weekly, monthly, quarterly, yearly.
    The following code computes the interest for any of the above compounding periods but is yearly based.

    What I'd like to do is have any compounding period
    but instead of the result requiring at least 1 being entered for years, that a month or day value can be entered. For example
    if one has an annual rate of interest of 3 percent, compounded daily, but is earned only for a 3 month period, the returned result would be for that value.

    Code:
    Public Function CompoundFV(Principal As Currency, IntRate As Single, CompPeriods As Integer, Years As Integer) As Currency
    'Forumula:  Beginning Value * (1 + (interest rate/number of compounding periods per year))^(years * number of compounding periods per year) = Future Value
    
    CompoundFV = Principal * (1 + (IntRate / CompPeriods)) ^ (Years * CompPeriods)
    
    End Function

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    99,783

    Re: Compound Interest Over Period Less Than 1 Year

    The formula doesn't change. You would simply use a value for Years that is not whole, e.g. in your 3 month example you would use 0.25 for Years.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 2017
    Posts
    240

    Re: Compound Interest Over Period Less Than 1 Year

    jmcilhinney:

    Thanks. Have never seen a power as other than a whole number. Learned something.

  4. #4
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    99,783

    Re: [RESOLVED] Compound Interest Over Period Less Than 1 Year

    Sure you have, e.g. finding the square root of a number is raising it to the power of 1/2.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Feb 2017
    Posts
    240

    Re: [RESOLVED] Compound Interest Over Period Less Than 1 Year

    Never thought of it in that context before.
    But I get it.

    Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width