I don't see anything wrong in the code, maybe it's the input ur entering for this calculation that's too small
//calculations
stateTax = .03 * ((double)amt - (600 * amt2));
The equation will surely give a negative value if the income are too small right
I tried putting the minimum value of 600 for a dependant of 1,and it runs just ok
If u don't want it to go negative, just put an if clause to prevent it
