There's a worksheet on your W-4, but I found that formula to lead to too much withholding (of course -- it's an interest free loan to the gubmint, ya idjit!).
I had to tweak my state withholding as I had to cough up $350 to those bastards this year. I'm still okay with federal in that we get a modest return -- not too much, TYVM.