Underpayment due to RSU sale

I sold RSU last year and was assessed a penalty for tax underpayment. I sold more RSUs this year how to I caluculate the tax owed and how can I prepay to ensure no penalty this year.