What the % shall I use in estimating tax prepayment from stock gains? What if the sale is in the last quarter?

Hello everyone, I understand that I need to make advance federal tax payment if I have sizable gains from stock selling.  My specific questions are:

1. Do I need to prepay state tax as well?

2. Is it enough if I assume 15% tax on capital gain and 30% on short term gain?

3. What if the sale happens in Q4 (or more extremely, nearly year end)?  Since I would have no time to prepay, will I be charged penalty?

Thank you very much.