Java - Simple Tax Calculator using If and if else statements
<p>Newb Java programmer here,
Why isn't this calculator calculating?</p>

<p>The program should input Income from the user, and then Output their Federal Tax based on the calculations.</p>

<p><strong>Federal Tax Rules:</strong>
15% on the first $45,282 of taxable income, +
20.5% on the next $45,281 of taxable income (on the portion of taxable income over $45,282 up to
$90,563), +
26% on the next $49,825 of taxable income (on the portion of taxable income over $90,563 up to
$140,388), +</p>

<p>Input: <br/>
Enter mark: 85 <br/>
Output: <br/>
Grade is: A <br/>
Input: <br/>
Enter mark: 110 <br/>
Output: <br/>
Enter a value between 0 and 100 <br/>
Input: <br/>
Enter mark: 79.5 <br/>
Output: <br/>
Grade is: B+ <br/>
Input: <br/>
Enter mark: -10 <br/>
Output: <br/>
Enter a value between 0 and 100
29% on the next $59,612 of taxable income (on the portion of taxable income over $140,388 up to
$200,000), +
33% of taxable income over $200,000.</p>

<pre><code>package practiceproblab4;

import java.util.Scanner;
/**
 *
 * @author JAVA NEWB
 */
public class PracticeProbLab4 {

/**
 * @param args the command line arguments
 */
public static void main(String[] args)
{

Scanner sc = new Scanner(System.in);
System.out.println("Enter your Income: ");
String In = sc.nextLine();
Double Income = Double.parseDouble(In);

calculateAndPrintTax(Income);
System.out.println("Your taxes are: " + TotalTax);
}

static double calculateAndPrintTax(double Income, double Tax)
{
    double tax;
    double difftax1;
    double difftax2;
    double difftax3;
    double difftax4;
    double TotalTax;

    if ((Income &gt;= 45282) &amp;&amp; (Income &lt;= 200000))
    {
        if(Income&lt;=45282)
        {
            tax = 45282 * 0.15;
            TotalTax = tax;
        }
        else if (Income &gt; 45282 &amp;&amp; Income &lt;= 90653)
        {
            tax = 45282 * 0.15;
            difftax1 = (Income - 45282)* .205;
            TotalTax = tax + difftax1;
        }
        else if ((Income &gt;90563) &amp;&amp; (Income &lt;= 140388))
        {
            tax = 45282 * 0.15;
            difftax1 = (Income - 45282) * .205;
            difftax2 = (Income - 90563) * 0.26;
            TotalTax = tax + difftax1 + difftax2;
        }
        else if ((Income &gt; 140388) &amp;&amp; (&lt;= 200000))
        {
            tax = 45282 * 0.15;
            difftax1 = (Income - 45282) * .205;
            difftax2 = (Income - 90563) * 0.26;
            difftax3 = (Income - 140388) * 0.29;
            TotalTax = tax + difftax1 + difftax2 + difftax3;
        }
        else if ((Income &gt; 200000))
        {
            tax = 45282 * 0.15;
            difftax1 = (Income - 45282) * .205;
            difftax2 = (Income - 90563) * 0.26;
            difftax3 = (Income - 140388) * 0.29;
            difftax4 = (Income - 200000) * 0.33;
            TotalTax = tax + difftax1 + difftax2 + difftax3 + difftax4;
        }
    else ((Income &gt; 200000))
            {    
            tax = 45282 * 0.15;
            difftax1 = (Income - 45282) * .205;
            difftax2 = (Income - 90563) * 0.26;
            difftax3 = (Income - 140388) * 0.29;
            difftax4 = (Income - 200000) * 0.33;
            TotalTax = tax + difftax1 + difftax2 + difftax3 + difftax4;
            return TotalTax;
            }
    }
}
}
</code></pre>