Estimated Taxes: Safe harbor and W2 withholdings? Is there a "safe harbor" rule for Massachusetts state taxes?

I know that Federal "safe harbor" rule for avoiding penalties on estimated taxes is simply to make sure you pay 110% of total tax owed from the previous year divided in 4 equal payments. The safe harbor is based on line 24 - total tax. Should the 110% of total tax owed from the previous year divided by 4 equal payments include or exclude any W2 withholdings from paychecks? What if you don't know exactly how much is going to be withheld from future paychecks to factor this into the safe harbor amount?

 

When also paying state estimate taxes for Massachusetts, is there a similar "safe harbor" rule for avoiding penalties on estimated taxes for Massachusetts? If so, what is the calculation?