It certainly is. Claiming 2 dependents on the W-4 means you will have less taken out in your withholdings. This is fine if you still have enough withholding to cover the taxes you owe. If you owe taxes at the end of the year it may be legal, but it may not be wise to claim those 2 dependent on the W-4.