#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
$arglist = $ENV{'QUERY_STRING'};
if ($arglist eq "")
{
print <<"FullForm";
Bob Dole's Tax Proposal
Bob Dole Tax Proposal
- a 15% across the board tax RATE cut (28% ==> 23.8%)
- a 50% cut in the capital gains tax
- a \$500 tax credit for each child
I made up this form to compare the changes
for my own income/deduction combination and thought I would write it
up as a HTML form. For more information on current taxes, see the
U.S. Department of the Treasury This form uses the 1996 tax
schedule. For details on the 1996 tax rates,
FullForm
}
else
{
print "Income Tax Comparisons";
print "Income Tax Comparisons
";
@f = split("&",$arglist);
for ($i=0; $i<=$#f; $i++)
{
($key,$val) = split("=",@f[$i]);
$val =~ s/%([\da-f]{1,2})/pack(C,hex($1))/eig;
$val =~ s/[ ,\$]//g;
if ($key =~ /in/) { $wage = $val; }
if ($key =~ /ty/) { $ty = $val; }
if ($key =~ /ch/) { $kids = $val; }
if ($key =~ /nw/) { $nwag = $val; }
if ($key =~ /cg/) { $gain = $val; }
if ($key =~ /id/) { $ided = $val; }
if ($key =~ /mc/) { $mort = $val; }
}
$typ = "Single";
@prc = (0.15,0.28,0.31,0.36,0.396);
for ($i=0; $i<=$#prc; $i++)
{
@dole[$i] = $prc[$i] * .85;
}
@lim = (0,24000,58150,121300,263750); $self = 2550; $stat = "A";
if ($ty =~ /Household/) {
$stat = "B"; $stdd = 17200; $typ = "Head of Household";
@lim = (0,32199,83050,134500,263750); $self = 2550;
}
if ($ty =~ /Jointly/) {
$stat = "C"; $stdd = 26200; $typ = "Married filing jointly";
@lim = (0,40100,96900,147700,263750); $self = 5100;
}
if ($ty =~ /Seperately/) {
$stat = "D"; $stdd = 13100; $typ = "Married filing seperately";
@lim = (0,20050,48450,73850,263750); $self = 2550;
}
$exem = $kids * 5300;
$gexem = $kids * 5000;
# Now for the Current Tax Law
print "
\n";
if ($ided + $mort < 1)
{
$ided = 4000; $mort = 0;
if ($stat eq "B") { $ided = 5900; }
if ($stat eq "C") { $ided = 6700; }
if ($stat eq "D") { $ided = 3350; }
print "Since you gave no itemized deductions, your standard ";
print "deduction of \$ $ided was used.\n";
}
$gross = $wage + $nwag + $gain;
$dole_gross = $wage + $nwag + $gain *.5;
$allow = 2550 * $kids + $self; $ided = $ided + $mort;
$ti = $gross - $ided - $allow;
$tt = $ti; $ct = 0; $rate = 0;
for ($i=4; $i>=0; $i--)
{
if ($ti > @lim[$i])
{
$tt = $tt - @lim[$i];
$ct = $ct + @prc[$i] * $tt;
$tt = @lim[$i];
if ($rate == 0) { $rate = @prc[$i] * 100; }
}
}
print "Under Current Taxation Laws:
\n";
print " Gross Income = \$ $gross \n";
print " Deductions = \$ $ided \n";
print " Exemptions = \$ $allow (\$2550/person incl. self for 1996) \n";
print " Taxable Income = \$ $ti \n";
print " Tax Bracket = $rate \% \n";
printf ("Your current income tax is \$ %9.2f
\n",$ct);
$ti = $dole_gross - $ided - $allow;
$tt = $ti; $ct = 0; $rate = 0;
for ($i=4; $i>=0; $i--)
{
if ($ti > @lim[$i])
{
$tt = $tt - @lim[$i];
$ct = $ct + @dole[$i] * $tt;
$tt = @lim[$i];
if ($rate == 0) { $rate = @dole[$i] * 100; }
}
}
$cc = $kids * 500; $ct = $ct - $cc;
print "
Under the Dole Plan:
\n";
print " Gross Income = \$ $dole_gross (lower due to 50% CG reduction)\n";
print " Deductions = \$ $ided \n";
print " Exemptions = \$ $allow (\$2550/person incl. self for 1996) \n";
print " Taxable Income = \$ $ti \n";
print " Tax Bracket = $rate \% \n";
print " Child Credit = \$ $cc \n";
printf ("Your Dole plan income tax is \$ %9.2f\n",$ct);
}