Get your taxes done using TurboTax

The IRS says that the most accurate way is to determine the total number of allowances you should claim, and put them all on the higher earner and zero on the lower earner.

Note that an allowance is not just 1 dependent = 1 allowance.  Some dependents are worth 2 (if they are at the age to qualify for the $1000 child credit).  You can also get allowances for itemizing your deductions, and you lose allowances based on the wages of the two jobs.  The W-4 is just a tool to try and estimate close to the tax you expect to owe, and allowances are just numbers to help accomplish that.

Start with the worksheet on the W-4 form, if you go through it and can understand it, it will help understand the concept of allowances.  Then try the tools linked above (IRS site, Turbotax site) and see if they come close to each other.  If you are changing jobs or adding a job in the middle of the year, you may get one result that will work for the rest of this year, then need to run the calculation again in January 2017 for the next year.