I recently did my W4 and the number of allowances I had is 2, but on the state withholding form, since the options were kind of different, I had 0 allowances to claim. Do I have to stay consistent for number of allowances I have for both state and federal withholding?
You can basically put in there whatever you want, in each one. It only defines how much taxes you prepay during the year.
The calculation is supposed to help you come up with a good estimate, but it’s use is not mandatory in any way.
If you estimate too low, the IRS will charge you interest on the missed tax; if you overpaid, it’s your own bad luck (free loan to the government). Otherwise nobody cares.
No, you do not have to have the same number of withholding allowances for state and federal taxes. Neither the state nor federal tax departments wil know or care, as long as a suitable amount of tax is withheld.
However, your payroll department needs to know what you want. Some states have their own form similar to W-4, while some states use the federal form. In the latter case, your payroll department will typically use the same information for both, unless you make it clear that you want them to be different. You may need to check with your payroll department to find out what their process is for setting them differently.