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...