Results 1 to 4 of 4

Math Help - Building a web based pension calculator

  1. #1
    Newbie
    Joined
    Jun 2009
    Posts
    1

    Building a web based pension calculator

    Hi there

    This is my first posting, so apologies if this is not the correct board or not a question members would respond to normally.

    We are currently trying to put together a web based pension calculator and am unsure about how to go about trying to put the equation together for our programmers to begin building it.

    The calculator itself is meant as an estimate only to give people an idea of how much they may need/how much of a shortfall they may have.

    The calculator will take into consideration:

    -current age
    - age of retirement
    -current salary
    -existing fund
    -target income in retirement per year/per annum
    -the ability to escalate contributions by the rate of inflation assuming that this is 2.5%

    - the ability to change the percentage of tax free cash
    - personal contributions, per month
    -the ability to delay starting your pension by a number of years



    with the hope to get an example of

    - total pension fund
    -tax free amount
    -projected income and percentage of target income
    -preojected income and percentage of target income if you delay by x years.

    Any help would be very much appreciated, even a point in the right direction!

    Many Thanks in advance
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member apcalculus's Avatar
    Joined
    Apr 2009
    From
    Boston
    Posts
    293
    Quote Originally Posted by lawley06 View Post
    Hi there

    This is my first posting, so apologies if this is not the correct board or not a question members would respond to normally.

    We are currently trying to put together a web based pension calculator and am unsure about how to go about trying to put the equation together for our programmers to begin building it.

    The calculator itself is meant as an estimate only to give people an idea of how much they may need/how much of a shortfall they may have.

    The calculator will take into consideration:

    -current age
    - age of retirement
    -current salary
    -existing fund
    -target income in retirement per year/per annum
    -the ability to escalate contributions by the rate of inflation assuming that this is 2.5%

    - the ability to change the percentage of tax free cash
    - personal contributions, per month
    -the ability to delay starting your pension by a number of years



    with the hope to get an example of

    - total pension fund
    -tax free amount
    -projected income and percentage of target income
    -preojected income and percentage of target income if you delay by x years.

    Any help would be very much appreciated, even a point in the right direction!

    Many Thanks in advance
    The first thing you need to decide is the programming language. There are quite a few options out there: Java, PHP, Perl, JavaScript ?? I am not an an expert in any of these but I am sure you can get a lot of help in a computer programming forum, like the coding forum.

    Good luck with the project!
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Sep 2009
    Posts
    7
    in perl:

    the following file is named math.cgi


    #!/usr/bin/perl -wT
    use CGI qw(:standard);

    param(currentsalary) = $currentsalary;
    param(currentcash) = $current_cash;
    param(age) = $age;
    param(retirement) = $retirement_age;
    param(inflation) = $inflation;

    #make inflation a decimal
    $inflation = ($inflation / 100);

    #starting total is whatever we were told
    $total += $current_cash;

    #loop placeholder because its easier
    $ageloop = $age;

    #loop because math is hard
    while ($ageloop /= $retirement_age){

    $ageloop++;

    #add this years salary
    $total = $total + $currentsalary;

    #INFLATION STRIKES! (the good kind)
    $total = $total + ($total * $inflation);
    }
    print "Content-type: text/html\n\n";
    print "Your total earnings: " + $total + "<br>";
    print "over " + ($retirement_age - $age) + " years" + "<br>";
    print "with " + ($inflation / 100) + "inflation rate." + "<br>";


    the following file is math.html

    <html><head><title>Test Form</title></head>
    <body>

    <form action="math.cgi" method="GET">
    Enter some text here:
    Current Salary: <input type="text" name="currentsalary" size="10"><br>
    Current Funds: <input type="text" name="currentcash" size="10"><br>
    Age: <input type="text" name="age" size="10"><br>
    Age at Which you will retire: <input type="text" name="retirement" size="10"><br>
    Inflation rate (%): <input type="text" name="inflation" size="10"><br>

    <input type="submit"><p>
    </form>

    </body></html>

    that might work. i didnt test it.

    i cant determine the tax-free amount without tax information
    what do you mean by delay of years?
    and what are the pension requirements.

    also, for this to work you have to have a web-server...
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Feb 2010
    Posts
    1
    I am new to forum so i don't know anything about perl......
    ...........

    Health Insurance TX | Texas Insurance Broker | Insurance Agency TX
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 2
    Last Post: May 6th 2012, 03:16 PM
  2. Height of a building
    Posted in the Geometry Forum
    Replies: 11
    Last Post: June 10th 2011, 05:25 PM
  3. NPV of a Building
    Posted in the Business Math Forum
    Replies: 6
    Last Post: April 13th 2010, 07:57 AM
  4. [SOLVED] Accumulating Pension Fund
    Posted in the Business Math Forum
    Replies: 1
    Last Post: July 3rd 2009, 09:29 PM
  5. Replies: 4
    Last Post: June 25th 2007, 09:14 AM

Search Tags


/mathhelpforum @mathhelpforum